The Beman Project: Bringing Standard Libraries to the Next Levelstd::string s; // Output the pair in the form {n, s}. } ## Highlights | lit discussion In-depth analysis of the lit testing framework - Demonstrates the kinds of discussions we’re having. - What Laura Savino The Beman Project # Considering Lit for the Beman Project Date: 2024-07-26 Author: David Sankel ## Abstract The LLVM Integrated Tester (lit) is being proposed as the recommended test framework 2024 kickoff, Louis Dionne recommended adoption of the LLVM Integrated Tester (lit). The benefits of lit are two fold: 1) Lit's negative-compilation tests allow verification of expected compilation failures;0 码力 | 53 页 | 7.38 MB | 1 年前3
Nim 2.0.8 Manual50 const `assert` = true assert `assert` ## String literals Terminal symbol in the grammar: STR LIT. String literals can be delimited by matching double quotes, and can contain the following escape zero as a terminator. ## Triple quoted string literals Terminal symbol in the grammar: TRIPLESTR_LIT. String literals can also be delimited by three double quotes "'" ... "'"" "long string within quotes" ## Raw string literals Terminal symbol in the grammar: RSTR_LIT. There are also raw string literals that are preceded with the letter r (or R) and are delimited by0 码力 | 132 页 | 5.73 MB | 1 年前3
Nim 2.0.2 中文手册'let' == 50 const 'assert' = true assert 'assert' ## 字符串字面值 语法中的终结符号: STR LIT. 字符串可以用配对的双引号来分隔,可以包含以下 escape sequences "转义字符": |转义字符|含义| |---|---| |\\p|平台特定的换行符: Windows 中的所有十六进制数字都用于字母元素| Nim 中的字符串可以包含任意 8-bit 值,甚至嵌入零,然而,某此操作可能会将第一个二进制零解释为终止符。 ## 三 重引用字符串字面值 语法中的终结符号: TRIPLESTR_LIT. 字符串字面值也可以用三个双引号 """ ... """ 来分隔,这种形式支持多行,可以包含 ",并且不解释任何转义字符,为了方便,开头 """ ""long string within quotes"" 产生: "引号内的长字符串" ## 原始字符串字面值 语法中的终结符号: RSTR_LIT。 还有原始字符串字面值,前面为字母 r 或 R,并匹配一对双引号普通字符串,它不解释转义字符,这在正则表达式或 Windows 的路径中使用时很方便。 var f = openFile(r"C:\texts\text0 码力 | 127 页 | 7.05 MB | 1 年前3
Expressive Compile-time Parsersparser: text %= lexeme[+(char_-<')]; node %= xml | text; start_tag %='<' >> !lit('//') >> lexeme[+(char_-'>)'] >> ''; end_tag = "> dec_channels="dsl::times<3">(dsl::q, dsl::sep(dsl::comma)); auto fnc_color = LEXY_LIT("rgb") >> dsl::parenthesized(dec_channels); return hex_color | fnc_color; }; using int_parser >> ",_lit >> double_parser; tuple v2 = seq_parser("42,13.37_ctx).value(); auto list_parser = *(int_praser >> +", _lit); fixed_vec v3 0 码力 | 134 页 | 1.73 MB | 1 年前3
Go Programmingerror. func newVal(lit string) Value { x, err := strconv.Atoi(lit) if err == nil { return Int(x) } return Error(fmt.Sprintf("illegal literal %s", lit)) } The evaluator just more lines in newVal. func newVal(lit string) Value { x, err := strconv.Atoi(lit) if err == nil { return Int(x) } s, err := strconv.Unquote(lit) if err == nil { return return String(s) } return Error(fmt.Sprintf("illegal literal %s", lit)) } We've added strings by just adding strings. This happens because of Go's implicit interface satisfaction.0 码力 | 60 页 | 1.04 MB | 2 年前3
Agda User Manual v2.5.4.2Elims delta/iota-redex | Con ConHead Args | Lam ArgInfo (Abs Term) Relevance is ignored | Lit Literal | Pi (Dom Type) (Abs Type) dependent function space | Sort Sort | Level Level | MetaV where con : (c : Name) (ps : List (Arg Pattern)) → Pattern dot : Pattern var : (s : String) → Pattern lit : (l : Literal) → Pattern proj : (f : Name) → Pattern absurd : Pattern {-# BUILTIN AGDAPATTERN Pattern AGDAPATCON con #-} {-# BUILTIN AGDAPATDOT dot #-} {-# BUILTIN AGDAPATVAR var #-} {-# BUILTIN AGDAPATLIT lit #-} {-# BUILTIN AGDAPATPROJ proj #-} {-# BUILTIN AGDAPATABSURD absurd #-} ## Name abstraction data0 码力 | 216 页 | 207.61 KB | 2 年前3
Agda User Manual v2.5.4.1Elims delta/iota-redex | Con ConHead Args | Lam ArgInfo (Abs Term) Relevance is ignored | Lit Literal | Pi (Dom Type) (Abs Type) dependent function space | Sort Sort | Level Level | MetaV where con : (c : Name) (ps : List (Arg Pattern)) → Pattern dot : Pattern var : (s : String) → Pattern lit : (l : Literal) → Pattern proj : (f : Name) → Pattern absurd : Pattern {-# BUILTIN AGDAPATTERN Pattern AGDAPATCON con #-} {-# BUILTIN AGDAPATDOT dot #-} {-# BUILTIN AGDAPATVAR var #-} {-# BUILTIN AGDAPATLIT lit #-} {-# BUILTIN AGDAPATPROJ proj #-} {-# BUILTIN AGDAPATABSURD absurd #-} ## Name abstraction data0 码力 | 216 页 | 207.64 KB | 2 年前3
Agda User Manual v2.5.4where con : (c : Name) (ps : List (Arg Pattern)) → Pattern dot : Pattern var : (s : String) → Pattern lit : (l : Literal) → Pattern (continues on next page) proj : (f : Name) → Pattern absurd : Pattern {-# AGDAPATCON con #-} {-# BUILTIN AGDAPATDOT dot #-} {-# BUILTIN AGDAPATVAR var #-} {-# BUILTIN AGDAPATLIT lit #-} {-# BUILTIN AGDAPATPROJ proj #-} {-# BUILTIN AGDAPATABSURD absurd #-} (continued from previous : List (Arg Term)) → Term pi : (a : Arg Type) (b : Abs Type) → Term agda-sort : (s : Sort) → Term lit : (l : Literal) → Term meta : (x : Meta) → List (Arg Term) → Term unknown : Term -- Treated as '_'0 码力 | 155 页 | 668.67 KB | 2 年前3
Agda User Manual v2.5.4.1where con : (c : Name) (ps : List (Arg Pattern)) → Pattern dot : Pattern var : (s : String) → Pattern lit : (l : Literal) → Pattern (continues on next page) proj : (f : Name) → Pattern absurd : Pattern {-# AGDAPATCON con #-} {-# BUILTIN AGDAPATDOT dot #-} {-# BUILTIN AGDAPATVAR var #-} {-# BUILTIN AGDAPATLIT lit #-} {-# BUILTIN AGDAPATPROJ proj #-} {-# BUILTIN AGDAPATABSURD absurd #-} (continued from previous : List (Arg Term)) → Term pi : (a : Arg Type) (b : Abs Type) → Term agda-sort : (s : Sort) → Term lit : (l : Literal) → Term meta : (x : Meta) → List (Arg Term) → Term unknown : Term -- Treated as '_'0 码力 | 155 页 | 668.90 KB | 2 年前3
Agda User Manual v2.5.4.2where con : (c : Name) (ps : List (Arg Pattern)) → Pattern dot : Pattern var : (s : String) → Pattern lit : (l : Literal) → Pattern (continues on next page) proj : (f : Name) → Pattern absurd : Pattern {-# AGDAPATCON con #-} {-# BUILTIN AGDAPATDOT dot #-} {-# BUILTIN AGDAPATVAR var #-} {-# BUILTIN AGDAPATLIT lit #-} {-# BUILTIN AGDAPATPROJ proj #-} {-# BUILTIN AGDAPATABSURD absurd #-} (continued from previous : List (Arg Term)) → Term pi : (a : Arg Type) (b : Abs Type) → Term agda-sort : (s : Sort) → Term lit : (l : Literal) → Term meta : (x : Meta) → List (Arg Term) → Term unknown : Term -- Treated as '_'0 码力 | 155 页 | 668.75 KB | 2 年前3
共 142 条
- 1
- 2
- 3
- 4
- 5
- 6
- 15
相关搜索词
Beman ProjectLitGTestCTestCMakeGuardsLocksModule systemIdentifiersString type编译指示类型定义模块导入异常处理转换器Expressive Compile-time ParsersMetaprogramming TricksAPI DesignReflectionDomain Specific LanguagesGo语言并发类型方法结构体Agda函数定义类型检查模块系统递归Language ReferenceInstallationToolsDocumentationlibrary managementtype checkingcode examplescompilationType CheckingInteractive EditingHoleAutomatic Proof SearchLibrary ManagementCompilersHighlightDocumentation Generation













