mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-10 07:04:22 +00:00
Merge #11632
11632: Bring back syntax highlighting in test data r=matklad a=matklad cc #11597 bors r+ 🤖 Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
commit
2eb312a444
715 changed files with 24858 additions and 48830 deletions
|
@ -16,7 +16,7 @@ use crate::{LexedStr, TopEntryPoint};
|
|||
fn lex_ok() {
|
||||
for case in TestCase::list("lexer/ok") {
|
||||
let actual = lex(&case.text);
|
||||
expect_file![case.txt].assert_eq(&actual)
|
||||
expect_file![case.rast].assert_eq(&actual)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@ fn lex_ok() {
|
|||
fn lex_err() {
|
||||
for case in TestCase::list("lexer/err") {
|
||||
let actual = lex(&case.text);
|
||||
expect_file![case.txt].assert_eq(&actual)
|
||||
expect_file![case.rast].assert_eq(&actual)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,7 @@ fn parse_ok() {
|
|||
for case in TestCase::list("parser/ok") {
|
||||
let (actual, errors) = parse(TopEntryPoint::SourceFile, &case.text);
|
||||
assert!(!errors, "errors in an OK file {}:\n{}", case.rs.display(), actual);
|
||||
expect_file![case.txt].assert_eq(&actual);
|
||||
expect_file![case.rast].assert_eq(&actual);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -57,7 +57,7 @@ fn parse_inline_ok() {
|
|||
for case in TestCase::list("parser/inline/ok") {
|
||||
let (actual, errors) = parse(TopEntryPoint::SourceFile, &case.text);
|
||||
assert!(!errors, "errors in an OK file {}:\n{}", case.rs.display(), actual);
|
||||
expect_file![case.txt].assert_eq(&actual);
|
||||
expect_file![case.rast].assert_eq(&actual);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -66,7 +66,7 @@ fn parse_err() {
|
|||
for case in TestCase::list("parser/err") {
|
||||
let (actual, errors) = parse(TopEntryPoint::SourceFile, &case.text);
|
||||
assert!(errors, "no errors in an ERR file {}:\n{}", case.rs.display(), actual);
|
||||
expect_file![case.txt].assert_eq(&actual)
|
||||
expect_file![case.rast].assert_eq(&actual)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -75,7 +75,7 @@ fn parse_inline_err() {
|
|||
for case in TestCase::list("parser/inline/err") {
|
||||
let (actual, errors) = parse(TopEntryPoint::SourceFile, &case.text);
|
||||
assert!(errors, "no errors in an ERR file {}:\n{}", case.rs.display(), actual);
|
||||
expect_file![case.txt].assert_eq(&actual)
|
||||
expect_file![case.rast].assert_eq(&actual)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -137,7 +137,7 @@ fn parse(entry: TopEntryPoint, text: &str) -> (String, bool) {
|
|||
#[derive(PartialEq, Eq, PartialOrd, Ord)]
|
||||
struct TestCase {
|
||||
rs: PathBuf,
|
||||
txt: PathBuf,
|
||||
rast: PathBuf,
|
||||
text: String,
|
||||
}
|
||||
|
||||
|
@ -155,9 +155,9 @@ impl TestCase {
|
|||
let path = file.path();
|
||||
if path.extension().unwrap_or_default() == "rs" {
|
||||
let rs = path;
|
||||
let txt = rs.with_extension("txt");
|
||||
let rast = rs.with_extension("rast");
|
||||
let text = fs::read_to_string(&rs).unwrap();
|
||||
res.push(TestCase { rs, txt, text });
|
||||
res.push(TestCase { rs, rast, text });
|
||||
}
|
||||
}
|
||||
res.sort();
|
||||
|
|
48
crates/parser/test_data/lexer/err/empty_exponent.rast
Normal file
48
crates/parser/test_data/lexer/err/empty_exponent.rast
Normal file
|
@ -0,0 +1,48 @@
|
|||
FLOAT_NUMBER "0e" error: Missing digits after the exponent symbol
|
||||
WHITESPACE "\n"
|
||||
FLOAT_NUMBER "0E" error: Missing digits after the exponent symbol
|
||||
WHITESPACE "\n\n"
|
||||
FLOAT_NUMBER "42e+" error: Missing digits after the exponent symbol
|
||||
WHITESPACE "\n"
|
||||
FLOAT_NUMBER "42e-" error: Missing digits after the exponent symbol
|
||||
WHITESPACE "\n"
|
||||
FLOAT_NUMBER "42E+" error: Missing digits after the exponent symbol
|
||||
WHITESPACE "\n"
|
||||
FLOAT_NUMBER "42E-" error: Missing digits after the exponent symbol
|
||||
WHITESPACE "\n\n"
|
||||
INT_NUMBER "42"
|
||||
DOT "."
|
||||
IDENT "e"
|
||||
PLUS "+"
|
||||
WHITESPACE "\n"
|
||||
INT_NUMBER "42"
|
||||
DOT "."
|
||||
IDENT "e"
|
||||
MINUS "-"
|
||||
WHITESPACE "\n"
|
||||
INT_NUMBER "42"
|
||||
DOT "."
|
||||
IDENT "E"
|
||||
PLUS "+"
|
||||
WHITESPACE "\n"
|
||||
INT_NUMBER "42"
|
||||
DOT "."
|
||||
IDENT "E"
|
||||
MINUS "-"
|
||||
WHITESPACE "\n\n"
|
||||
FLOAT_NUMBER "42.2e+" error: Missing digits after the exponent symbol
|
||||
WHITESPACE "\n"
|
||||
FLOAT_NUMBER "42.2e-" error: Missing digits after the exponent symbol
|
||||
WHITESPACE "\n"
|
||||
FLOAT_NUMBER "42.2E+" error: Missing digits after the exponent symbol
|
||||
WHITESPACE "\n"
|
||||
FLOAT_NUMBER "42.2E-" error: Missing digits after the exponent symbol
|
||||
WHITESPACE "\n\n"
|
||||
FLOAT_NUMBER "42.2e+f32" error: Missing digits after the exponent symbol
|
||||
WHITESPACE "\n"
|
||||
FLOAT_NUMBER "42.2e-f32" error: Missing digits after the exponent symbol
|
||||
WHITESPACE "\n"
|
||||
FLOAT_NUMBER "42.2E+f32" error: Missing digits after the exponent symbol
|
||||
WHITESPACE "\n"
|
||||
FLOAT_NUMBER "42.2E-f32" error: Missing digits after the exponent symbol
|
||||
WHITESPACE "\n"
|
26
crates/parser/test_data/lexer/err/empty_int.rast
Normal file
26
crates/parser/test_data/lexer/err/empty_int.rast
Normal file
|
@ -0,0 +1,26 @@
|
|||
INT_NUMBER "0b" error: Missing digits after the integer base prefix
|
||||
WHITESPACE "\n"
|
||||
INT_NUMBER "0o" error: Missing digits after the integer base prefix
|
||||
WHITESPACE "\n"
|
||||
INT_NUMBER "0x" error: Missing digits after the integer base prefix
|
||||
WHITESPACE "\n\n"
|
||||
INT_NUMBER "0b_" error: Missing digits after the integer base prefix
|
||||
WHITESPACE "\n"
|
||||
INT_NUMBER "0o_" error: Missing digits after the integer base prefix
|
||||
WHITESPACE "\n"
|
||||
INT_NUMBER "0x_" error: Missing digits after the integer base prefix
|
||||
WHITESPACE "\n\n"
|
||||
INT_NUMBER "0bnoDigit" error: Missing digits after the integer base prefix
|
||||
WHITESPACE "\n"
|
||||
INT_NUMBER "0onoDigit" error: Missing digits after the integer base prefix
|
||||
WHITESPACE "\n"
|
||||
INT_NUMBER "0xnoDigit" error: Missing digits after the integer base prefix
|
||||
WHITESPACE "\n\n"
|
||||
INT_NUMBER "0xG" error: Missing digits after the integer base prefix
|
||||
WHITESPACE "\n"
|
||||
INT_NUMBER "0xg" error: Missing digits after the integer base prefix
|
||||
WHITESPACE "\n\n"
|
||||
INT_NUMBER "0x_g" error: Missing digits after the integer base prefix
|
||||
WHITESPACE "\n"
|
||||
INT_NUMBER "0x_G" error: Missing digits after the integer base prefix
|
||||
WHITESPACE "\n"
|
|
@ -0,0 +1,4 @@
|
|||
LIFETIME_IDENT "'1" error: Lifetime name cannot start with a number
|
||||
WHITESPACE "\n"
|
||||
LIFETIME_IDENT "'1lifetime" error: Lifetime name cannot start with a number
|
||||
WHITESPACE "\n"
|
|
@ -0,0 +1 @@
|
|||
COMMENT "/*" error: Missing trailing `*/` symbols to terminate the block comment
|
|
@ -0,0 +1 @@
|
|||
COMMENT "/* comment\n" error: Missing trailing `*/` symbols to terminate the block comment
|
|
@ -0,0 +1 @@
|
|||
BYTE "b'" error: Missing trailing `'` symbol to terminate the byte literal
|
|
@ -0,0 +1 @@
|
|||
BYTE_STRING "b\"" error: Missing trailing `"` symbol to terminate the byte string literal
|
|
@ -0,0 +1 @@
|
|||
BYTE_STRING "b\"\\x7f" error: Missing trailing `"` symbol to terminate the byte string literal
|
|
@ -0,0 +1 @@
|
|||
BYTE_STRING "b\"🦀" error: Missing trailing `"` symbol to terminate the byte string literal
|
|
@ -0,0 +1 @@
|
|||
BYTE_STRING "b\"\\" error: Missing trailing `"` symbol to terminate the byte string literal
|
|
@ -0,0 +1 @@
|
|||
BYTE_STRING "b\"\\\"" error: Missing trailing `"` symbol to terminate the byte string literal
|
|
@ -0,0 +1 @@
|
|||
BYTE_STRING "b\"\\n" error: Missing trailing `"` symbol to terminate the byte string literal
|
|
@ -0,0 +1 @@
|
|||
BYTE_STRING "b\" " error: Missing trailing `"` symbol to terminate the byte string literal
|
|
@ -0,0 +1 @@
|
|||
BYTE_STRING "b\"\\u{20AA}" error: Missing trailing `"` symbol to terminate the byte string literal
|
|
@ -0,0 +1 @@
|
|||
BYTE "b'\\x7f" error: Missing trailing `'` symbol to terminate the byte literal
|
|
@ -0,0 +1 @@
|
|||
BYTE "b'🦀" error: Missing trailing `'` symbol to terminate the byte literal
|
|
@ -0,0 +1 @@
|
|||
BYTE "b'\\" error: Missing trailing `'` symbol to terminate the byte literal
|
|
@ -0,0 +1 @@
|
|||
BYTE "b'\\n" error: Missing trailing `'` symbol to terminate the byte literal
|
|
@ -0,0 +1 @@
|
|||
BYTE "b'\\'" error: Missing trailing `'` symbol to terminate the byte literal
|
|
@ -0,0 +1 @@
|
|||
BYTE "b' " error: Missing trailing `'` symbol to terminate the byte literal
|
|
@ -0,0 +1 @@
|
|||
BYTE "b'\\u{20AA}" error: Missing trailing `'` symbol to terminate the byte literal
|
|
@ -0,0 +1 @@
|
|||
CHAR "'" error: Missing trailing `'` symbol to terminate the character literal
|
|
@ -0,0 +1 @@
|
|||
CHAR "'\\x7f" error: Missing trailing `'` symbol to terminate the character literal
|
|
@ -0,0 +1 @@
|
|||
CHAR "'🦀" error: Missing trailing `'` symbol to terminate the character literal
|
|
@ -0,0 +1 @@
|
|||
CHAR "'\\" error: Missing trailing `'` symbol to terminate the character literal
|
|
@ -0,0 +1 @@
|
|||
CHAR "'\\n" error: Missing trailing `'` symbol to terminate the character literal
|
|
@ -0,0 +1 @@
|
|||
CHAR "'\\'" error: Missing trailing `'` symbol to terminate the character literal
|
|
@ -0,0 +1 @@
|
|||
CHAR "' " error: Missing trailing `'` symbol to terminate the character literal
|
|
@ -0,0 +1 @@
|
|||
CHAR "'\\u{20AA}" error: Missing trailing `'` symbol to terminate the character literal
|
|
@ -0,0 +1 @@
|
|||
COMMENT "/* /* /*\n" error: Missing trailing `*/` symbols to terminate the block comment
|
|
@ -0,0 +1 @@
|
|||
COMMENT "/** /*! /* comment */ */\n" error: Missing trailing `*/` symbols to terminate the block comment
|
|
@ -0,0 +1 @@
|
|||
BYTE_STRING "br##\"" error: Missing trailing `"` with `#` symbols to terminate the raw byte string literal
|
|
@ -0,0 +1 @@
|
|||
BYTE_STRING "br##\"\\x7f" error: Missing trailing `"` with `#` symbols to terminate the raw byte string literal
|
|
@ -0,0 +1 @@
|
|||
BYTE_STRING "br##\"🦀" error: Missing trailing `"` with `#` symbols to terminate the raw byte string literal
|
|
@ -0,0 +1 @@
|
|||
BYTE_STRING "br##\"\\" error: Missing trailing `"` with `#` symbols to terminate the raw byte string literal
|
|
@ -0,0 +1 @@
|
|||
BYTE_STRING "br##\"\\n" error: Missing trailing `"` with `#` symbols to terminate the raw byte string literal
|
|
@ -0,0 +1 @@
|
|||
BYTE_STRING "br##\" " error: Missing trailing `"` with `#` symbols to terminate the raw byte string literal
|
|
@ -0,0 +1 @@
|
|||
BYTE_STRING "br##\"\\u{20AA}" error: Missing trailing `"` with `#` symbols to terminate the raw byte string literal
|
|
@ -0,0 +1 @@
|
|||
STRING "r##\"" error: Missing trailing `"` with `#` symbols to terminate the raw string literal
|
|
@ -0,0 +1 @@
|
|||
STRING "r##\"\\x7f" error: Missing trailing `"` with `#` symbols to terminate the raw string literal
|
|
@ -0,0 +1 @@
|
|||
STRING "r##\"🦀" error: Missing trailing `"` with `#` symbols to terminate the raw string literal
|
|
@ -0,0 +1 @@
|
|||
STRING "r##\"\\" error: Missing trailing `"` with `#` symbols to terminate the raw string literal
|
|
@ -0,0 +1 @@
|
|||
STRING "r##\"\\n" error: Missing trailing `"` with `#` symbols to terminate the raw string literal
|
|
@ -0,0 +1 @@
|
|||
STRING "r##\" " error: Missing trailing `"` with `#` symbols to terminate the raw string literal
|
|
@ -0,0 +1 @@
|
|||
STRING "r##\"\\u{20AA}" error: Missing trailing `"` with `#` symbols to terminate the raw string literal
|
|
@ -0,0 +1 @@
|
|||
STRING "\"" error: Missing trailing `"` symbol to terminate the string literal
|
|
@ -0,0 +1 @@
|
|||
STRING "\"\\x7f" error: Missing trailing `"` symbol to terminate the string literal
|
|
@ -0,0 +1 @@
|
|||
STRING "\"🦀" error: Missing trailing `"` symbol to terminate the string literal
|
|
@ -0,0 +1 @@
|
|||
STRING "\"\\" error: Missing trailing `"` symbol to terminate the string literal
|
|
@ -0,0 +1 @@
|
|||
STRING "\"\\\"" error: Missing trailing `"` symbol to terminate the string literal
|
|
@ -0,0 +1 @@
|
|||
STRING "\"\\n" error: Missing trailing `"` symbol to terminate the string literal
|
|
@ -0,0 +1 @@
|
|||
STRING "\" " error: Missing trailing `"` symbol to terminate the string literal
|
|
@ -0,0 +1 @@
|
|||
STRING "\"\\u{20AA}" error: Missing trailing `"` symbol to terminate the string literal
|
|
@ -0,0 +1 @@
|
|||
BYTE_STRING "br##" error: Missing `"` symbol after `#` symbols to begin the raw byte string literal
|
|
@ -0,0 +1,9 @@
|
|||
BYTE_STRING "br## " error: Missing `"` symbol after `#` symbols to begin the raw byte string literal
|
||||
IDENT "I"
|
||||
WHITESPACE " "
|
||||
IDENT "lack"
|
||||
WHITESPACE " "
|
||||
IDENT "a"
|
||||
WHITESPACE " "
|
||||
IDENT "quote"
|
||||
BANG "!"
|
|
@ -0,0 +1 @@
|
|||
STRING "r##" error: Missing `"` symbol after `#` symbols to begin the raw string literal
|
|
@ -0,0 +1,9 @@
|
|||
STRING "r## " error: Missing `"` symbol after `#` symbols to begin the raw string literal
|
||||
IDENT "I"
|
||||
WHITESPACE " "
|
||||
IDENT "lack"
|
||||
WHITESPACE " "
|
||||
IDENT "a"
|
||||
WHITESPACE " "
|
||||
IDENT "quote"
|
||||
BANG "!"
|
6
crates/parser/test_data/lexer/ok/block_comment.rast
Normal file
6
crates/parser/test_data/lexer/ok/block_comment.rast
Normal file
|
@ -0,0 +1,6 @@
|
|||
COMMENT "/* */"
|
||||
WHITESPACE "\n"
|
||||
COMMENT "/**/"
|
||||
WHITESPACE "\n"
|
||||
COMMENT "/* /* */ */"
|
||||
WHITESPACE "\n"
|
22
crates/parser/test_data/lexer/ok/byte_strings.rast
Normal file
22
crates/parser/test_data/lexer/ok/byte_strings.rast
Normal file
|
@ -0,0 +1,22 @@
|
|||
BYTE "b''"
|
||||
WHITESPACE " "
|
||||
BYTE "b'x'"
|
||||
WHITESPACE " "
|
||||
BYTE_STRING "b\"foo\""
|
||||
WHITESPACE " "
|
||||
BYTE_STRING "br\"\""
|
||||
WHITESPACE "\n"
|
||||
BYTE "b''suf"
|
||||
WHITESPACE " "
|
||||
BYTE_STRING "b\"\"ix"
|
||||
WHITESPACE " "
|
||||
BYTE_STRING "br\"\"br"
|
||||
WHITESPACE "\n"
|
||||
BYTE "b'\\n'"
|
||||
WHITESPACE " "
|
||||
BYTE "b'\\\\'"
|
||||
WHITESPACE " "
|
||||
BYTE "b'\\''"
|
||||
WHITESPACE " "
|
||||
BYTE "b'hello'"
|
||||
WHITESPACE "\n"
|
16
crates/parser/test_data/lexer/ok/chars.rast
Normal file
16
crates/parser/test_data/lexer/ok/chars.rast
Normal file
|
@ -0,0 +1,16 @@
|
|||
CHAR "'x'"
|
||||
WHITESPACE " "
|
||||
CHAR "' '"
|
||||
WHITESPACE " "
|
||||
CHAR "'0'"
|
||||
WHITESPACE " "
|
||||
CHAR "'hello'"
|
||||
WHITESPACE " "
|
||||
CHAR "'\\x7f'"
|
||||
WHITESPACE " "
|
||||
CHAR "'\\n'"
|
||||
WHITESPACE " "
|
||||
CHAR "'\\\\'"
|
||||
WHITESPACE " "
|
||||
CHAR "'\\''"
|
||||
WHITESPACE "\n"
|
3
crates/parser/test_data/lexer/ok/hello.rast
Normal file
3
crates/parser/test_data/lexer/ok/hello.rast
Normal file
|
@ -0,0 +1,3 @@
|
|||
IDENT "hello"
|
||||
WHITESPACE " "
|
||||
IDENT "world"
|
14
crates/parser/test_data/lexer/ok/ident.rast
Normal file
14
crates/parser/test_data/lexer/ok/ident.rast
Normal file
|
@ -0,0 +1,14 @@
|
|||
IDENT "foo"
|
||||
WHITESPACE " "
|
||||
IDENT "foo_"
|
||||
WHITESPACE " "
|
||||
IDENT "_foo"
|
||||
WHITESPACE " "
|
||||
UNDERSCORE "_"
|
||||
WHITESPACE " "
|
||||
IDENT "__"
|
||||
WHITESPACE " "
|
||||
IDENT "x"
|
||||
WHITESPACE " "
|
||||
IDENT "привет"
|
||||
WHITESPACE "\n"
|
64
crates/parser/test_data/lexer/ok/keywords.rast
Normal file
64
crates/parser/test_data/lexer/ok/keywords.rast
Normal file
|
@ -0,0 +1,64 @@
|
|||
ASYNC_KW "async"
|
||||
WHITESPACE " "
|
||||
FN_KW "fn"
|
||||
WHITESPACE " "
|
||||
USE_KW "use"
|
||||
WHITESPACE " "
|
||||
STRUCT_KW "struct"
|
||||
WHITESPACE " "
|
||||
TRAIT_KW "trait"
|
||||
WHITESPACE " "
|
||||
ENUM_KW "enum"
|
||||
WHITESPACE " "
|
||||
IMPL_KW "impl"
|
||||
WHITESPACE " "
|
||||
TRUE_KW "true"
|
||||
WHITESPACE " "
|
||||
FALSE_KW "false"
|
||||
WHITESPACE " "
|
||||
AS_KW "as"
|
||||
WHITESPACE " "
|
||||
EXTERN_KW "extern"
|
||||
WHITESPACE " "
|
||||
CRATE_KW "crate"
|
||||
WHITESPACE "\n"
|
||||
MOD_KW "mod"
|
||||
WHITESPACE " "
|
||||
PUB_KW "pub"
|
||||
WHITESPACE " "
|
||||
SELF_KW "self"
|
||||
WHITESPACE " "
|
||||
SUPER_KW "super"
|
||||
WHITESPACE " "
|
||||
IN_KW "in"
|
||||
WHITESPACE " "
|
||||
WHERE_KW "where"
|
||||
WHITESPACE " "
|
||||
FOR_KW "for"
|
||||
WHITESPACE " "
|
||||
LOOP_KW "loop"
|
||||
WHITESPACE " "
|
||||
WHILE_KW "while"
|
||||
WHITESPACE " "
|
||||
IF_KW "if"
|
||||
WHITESPACE " "
|
||||
MATCH_KW "match"
|
||||
WHITESPACE " "
|
||||
CONST_KW "const"
|
||||
WHITESPACE "\n"
|
||||
STATIC_KW "static"
|
||||
WHITESPACE " "
|
||||
MUT_KW "mut"
|
||||
WHITESPACE " "
|
||||
TYPE_KW "type"
|
||||
WHITESPACE " "
|
||||
REF_KW "ref"
|
||||
WHITESPACE " "
|
||||
LET_KW "let"
|
||||
WHITESPACE " "
|
||||
ELSE_KW "else"
|
||||
WHITESPACE " "
|
||||
MOVE_KW "move"
|
||||
WHITESPACE " "
|
||||
RETURN_KW "return"
|
||||
WHITESPACE "\n"
|
8
crates/parser/test_data/lexer/ok/lifetimes.rast
Normal file
8
crates/parser/test_data/lexer/ok/lifetimes.rast
Normal file
|
@ -0,0 +1,8 @@
|
|||
LIFETIME_IDENT "'a"
|
||||
WHITESPACE " "
|
||||
LIFETIME_IDENT "'foo"
|
||||
WHITESPACE " "
|
||||
LIFETIME_IDENT "'foo_bar_baz"
|
||||
WHITESPACE " "
|
||||
LIFETIME_IDENT "'_"
|
||||
WHITESPACE "\n"
|
57
crates/parser/test_data/lexer/ok/numbers.rast
Normal file
57
crates/parser/test_data/lexer/ok/numbers.rast
Normal file
|
@ -0,0 +1,57 @@
|
|||
INT_NUMBER "0"
|
||||
WHITESPACE " "
|
||||
INT_NUMBER "00"
|
||||
WHITESPACE " "
|
||||
INT_NUMBER "0_"
|
||||
WHITESPACE " "
|
||||
FLOAT_NUMBER "0."
|
||||
WHITESPACE " "
|
||||
INT_NUMBER "0z"
|
||||
WHITESPACE "\n"
|
||||
INT_NUMBER "01790"
|
||||
WHITESPACE " "
|
||||
INT_NUMBER "0b1790"
|
||||
WHITESPACE " "
|
||||
INT_NUMBER "0o1790"
|
||||
WHITESPACE " "
|
||||
INT_NUMBER "0x1790aAbBcCdDeEfF"
|
||||
WHITESPACE " "
|
||||
INT_NUMBER "001279"
|
||||
WHITESPACE " "
|
||||
INT_NUMBER "0_1279"
|
||||
WHITESPACE " "
|
||||
FLOAT_NUMBER "0.1279"
|
||||
WHITESPACE " "
|
||||
FLOAT_NUMBER "0e1279"
|
||||
WHITESPACE " "
|
||||
FLOAT_NUMBER "0E1279"
|
||||
WHITESPACE "\n"
|
||||
INT_NUMBER "0"
|
||||
DOT "."
|
||||
DOT "."
|
||||
INT_NUMBER "2"
|
||||
WHITESPACE "\n"
|
||||
INT_NUMBER "0"
|
||||
DOT "."
|
||||
IDENT "foo"
|
||||
L_PAREN "("
|
||||
R_PAREN ")"
|
||||
WHITESPACE "\n"
|
||||
FLOAT_NUMBER "0e+1"
|
||||
WHITESPACE "\n"
|
||||
INT_NUMBER "0"
|
||||
DOT "."
|
||||
IDENT "e"
|
||||
PLUS "+"
|
||||
INT_NUMBER "1"
|
||||
WHITESPACE "\n"
|
||||
FLOAT_NUMBER "0.0E-2"
|
||||
WHITESPACE "\n"
|
||||
FLOAT_NUMBER "0___0.10000____0000e+111__"
|
||||
WHITESPACE "\n"
|
||||
INT_NUMBER "1i64"
|
||||
WHITESPACE " "
|
||||
FLOAT_NUMBER "92.0f32"
|
||||
WHITESPACE " "
|
||||
INT_NUMBER "11__s"
|
||||
WHITESPACE "\n"
|
2
crates/parser/test_data/lexer/ok/raw_ident.rast
Normal file
2
crates/parser/test_data/lexer/ok/raw_ident.rast
Normal file
|
@ -0,0 +1,2 @@
|
|||
IDENT "r#raw_ident"
|
||||
WHITESPACE "\n"
|
2
crates/parser/test_data/lexer/ok/raw_strings.rast
Normal file
2
crates/parser/test_data/lexer/ok/raw_strings.rast
Normal file
|
@ -0,0 +1,2 @@
|
|||
STRING "r###\"this is a r##\"raw\"## string\"###"
|
||||
WHITESPACE "\n"
|
22
crates/parser/test_data/lexer/ok/single_line_comments.rast
Normal file
22
crates/parser/test_data/lexer/ok/single_line_comments.rast
Normal file
|
@ -0,0 +1,22 @@
|
|||
SHEBANG "#!/usr/bin/env bash"
|
||||
WHITESPACE "\n"
|
||||
COMMENT "// hello"
|
||||
WHITESPACE "\n"
|
||||
COMMENT "//! World"
|
||||
WHITESPACE "\n"
|
||||
COMMENT "//!! Inner line doc"
|
||||
WHITESPACE "\n"
|
||||
COMMENT "/// Outer line doc"
|
||||
WHITESPACE "\n"
|
||||
COMMENT "//// Just a comment"
|
||||
WHITESPACE "\n\n"
|
||||
COMMENT "//"
|
||||
WHITESPACE "\n"
|
||||
COMMENT "//!"
|
||||
WHITESPACE "\n"
|
||||
COMMENT "//!!"
|
||||
WHITESPACE "\n"
|
||||
COMMENT "///"
|
||||
WHITESPACE "\n"
|
||||
COMMENT "////"
|
||||
WHITESPACE "\n"
|
8
crates/parser/test_data/lexer/ok/strings.rast
Normal file
8
crates/parser/test_data/lexer/ok/strings.rast
Normal file
|
@ -0,0 +1,8 @@
|
|||
STRING "\"hello\""
|
||||
WHITESPACE " "
|
||||
STRING "r\"world\""
|
||||
WHITESPACE " "
|
||||
STRING "\"\\n\\\"\\\\no escape\""
|
||||
WHITESPACE " "
|
||||
STRING "\"multi\nline\""
|
||||
WHITESPACE "\n"
|
77
crates/parser/test_data/lexer/ok/symbols.rast
Normal file
77
crates/parser/test_data/lexer/ok/symbols.rast
Normal file
|
@ -0,0 +1,77 @@
|
|||
SEMICOLON ";"
|
||||
WHITESPACE " "
|
||||
COMMA ","
|
||||
WHITESPACE " "
|
||||
L_PAREN "("
|
||||
WHITESPACE " "
|
||||
R_PAREN ")"
|
||||
WHITESPACE " "
|
||||
L_CURLY "{"
|
||||
WHITESPACE " "
|
||||
R_CURLY "}"
|
||||
WHITESPACE " "
|
||||
L_BRACK "["
|
||||
WHITESPACE " "
|
||||
R_BRACK "]"
|
||||
WHITESPACE " "
|
||||
L_ANGLE "<"
|
||||
WHITESPACE " "
|
||||
R_ANGLE ">"
|
||||
WHITESPACE " "
|
||||
AT "@"
|
||||
WHITESPACE " "
|
||||
POUND "#"
|
||||
WHITESPACE " "
|
||||
TILDE "~"
|
||||
WHITESPACE " "
|
||||
QUESTION "?"
|
||||
WHITESPACE " "
|
||||
DOLLAR "$"
|
||||
WHITESPACE " "
|
||||
AMP "&"
|
||||
WHITESPACE " "
|
||||
PIPE "|"
|
||||
WHITESPACE " "
|
||||
PLUS "+"
|
||||
WHITESPACE " "
|
||||
STAR "*"
|
||||
WHITESPACE " "
|
||||
SLASH "/"
|
||||
WHITESPACE " "
|
||||
CARET "^"
|
||||
WHITESPACE " "
|
||||
PERCENT "%"
|
||||
WHITESPACE "\n"
|
||||
DOT "."
|
||||
WHITESPACE " "
|
||||
DOT "."
|
||||
DOT "."
|
||||
WHITESPACE " "
|
||||
DOT "."
|
||||
DOT "."
|
||||
DOT "."
|
||||
WHITESPACE " "
|
||||
DOT "."
|
||||
DOT "."
|
||||
EQ "="
|
||||
WHITESPACE "\n"
|
||||
COLON ":"
|
||||
WHITESPACE " "
|
||||
COLON ":"
|
||||
COLON ":"
|
||||
WHITESPACE "\n"
|
||||
EQ "="
|
||||
WHITESPACE " "
|
||||
EQ "="
|
||||
R_ANGLE ">"
|
||||
WHITESPACE "\n"
|
||||
BANG "!"
|
||||
WHITESPACE " "
|
||||
BANG "!"
|
||||
EQ "="
|
||||
WHITESPACE "\n"
|
||||
MINUS "-"
|
||||
WHITESPACE " "
|
||||
MINUS "-"
|
||||
R_ANGLE ">"
|
||||
WHITESPACE "\n"
|
12
crates/parser/test_data/lexer/ok/whitespace.rast
Normal file
12
crates/parser/test_data/lexer/ok/whitespace.rast
Normal file
|
@ -0,0 +1,12 @@
|
|||
IDENT "a"
|
||||
WHITESPACE " "
|
||||
IDENT "b"
|
||||
WHITESPACE " "
|
||||
IDENT "c"
|
||||
WHITESPACE "\n"
|
||||
IDENT "d"
|
||||
WHITESPACE "\n\n"
|
||||
IDENT "e"
|
||||
WHITESPACE "\t"
|
||||
IDENT "f"
|
||||
WHITESPACE "\n"
|
|
@ -1,34 +1,34 @@
|
|||
SOURCE_FILE@0..34
|
||||
STRUCT@0..34
|
||||
STRUCT_KW@0..6 "struct"
|
||||
WHITESPACE@6..7 " "
|
||||
NAME@7..8
|
||||
IDENT@7..8 "S"
|
||||
WHITESPACE@8..9 " "
|
||||
RECORD_FIELD_LIST@9..34
|
||||
L_CURLY@9..10 "{"
|
||||
WHITESPACE@10..15 "\n "
|
||||
RECORD_FIELD@15..21
|
||||
NAME@15..16
|
||||
IDENT@15..16 "a"
|
||||
COLON@16..17 ":"
|
||||
WHITESPACE@17..18 " "
|
||||
PATH_TYPE@18..21
|
||||
PATH@18..21
|
||||
PATH_SEGMENT@18..21
|
||||
NAME_REF@18..21
|
||||
IDENT@18..21 "u32"
|
||||
WHITESPACE@21..26 "\n "
|
||||
RECORD_FIELD@26..32
|
||||
NAME@26..27
|
||||
IDENT@26..27 "b"
|
||||
COLON@27..28 ":"
|
||||
WHITESPACE@28..29 " "
|
||||
PATH_TYPE@29..32
|
||||
PATH@29..32
|
||||
PATH_SEGMENT@29..32
|
||||
NAME_REF@29..32
|
||||
IDENT@29..32 "u32"
|
||||
WHITESPACE@32..33 "\n"
|
||||
R_CURLY@33..34 "}"
|
||||
error 21..21: expected COMMA
|
||||
SOURCE_FILE
|
||||
STRUCT
|
||||
STRUCT_KW "struct"
|
||||
WHITESPACE " "
|
||||
NAME
|
||||
IDENT "S"
|
||||
WHITESPACE " "
|
||||
RECORD_FIELD_LIST
|
||||
L_CURLY "{"
|
||||
WHITESPACE "\n "
|
||||
RECORD_FIELD
|
||||
NAME
|
||||
IDENT "a"
|
||||
COLON ":"
|
||||
WHITESPACE " "
|
||||
PATH_TYPE
|
||||
PATH
|
||||
PATH_SEGMENT
|
||||
NAME_REF
|
||||
IDENT "u32"
|
||||
WHITESPACE "\n "
|
||||
RECORD_FIELD
|
||||
NAME
|
||||
IDENT "b"
|
||||
COLON ":"
|
||||
WHITESPACE " "
|
||||
PATH_TYPE
|
||||
PATH
|
||||
PATH_SEGMENT
|
||||
NAME_REF
|
||||
IDENT "u32"
|
||||
WHITESPACE "\n"
|
||||
R_CURLY "}"
|
||||
error 21: expected COMMA
|
||||
|
|
|
@ -1,34 +0,0 @@
|
|||
SOURCE_FILE
|
||||
STRUCT
|
||||
STRUCT_KW "struct"
|
||||
WHITESPACE " "
|
||||
NAME
|
||||
IDENT "S"
|
||||
WHITESPACE " "
|
||||
RECORD_FIELD_LIST
|
||||
L_CURLY "{"
|
||||
WHITESPACE "\n "
|
||||
RECORD_FIELD
|
||||
NAME
|
||||
IDENT "a"
|
||||
COLON ":"
|
||||
WHITESPACE " "
|
||||
PATH_TYPE
|
||||
PATH
|
||||
PATH_SEGMENT
|
||||
NAME_REF
|
||||
IDENT "u32"
|
||||
WHITESPACE "\n "
|
||||
RECORD_FIELD
|
||||
NAME
|
||||
IDENT "b"
|
||||
COLON ":"
|
||||
WHITESPACE " "
|
||||
PATH_TYPE
|
||||
PATH
|
||||
PATH_SEGMENT
|
||||
NAME_REF
|
||||
IDENT "u32"
|
||||
WHITESPACE "\n"
|
||||
R_CURLY "}"
|
||||
error 21: expected COMMA
|
|
@ -1,18 +1,18 @@
|
|||
SOURCE_FILE@0..21
|
||||
ERROR@0..2
|
||||
IF_KW@0..2 "if"
|
||||
WHITESPACE@2..3 " "
|
||||
ERROR@3..8
|
||||
MATCH_KW@3..8 "match"
|
||||
WHITESPACE@8..10 "\n\n"
|
||||
STRUCT@10..21
|
||||
STRUCT_KW@10..16 "struct"
|
||||
WHITESPACE@16..17 " "
|
||||
NAME@17..18
|
||||
IDENT@17..18 "S"
|
||||
WHITESPACE@18..19 " "
|
||||
RECORD_FIELD_LIST@19..21
|
||||
L_CURLY@19..20 "{"
|
||||
R_CURLY@20..21 "}"
|
||||
error 0..0: expected an item
|
||||
error 3..3: expected an item
|
||||
SOURCE_FILE
|
||||
ERROR
|
||||
IF_KW "if"
|
||||
WHITESPACE " "
|
||||
ERROR
|
||||
MATCH_KW "match"
|
||||
WHITESPACE "\n\n"
|
||||
STRUCT
|
||||
STRUCT_KW "struct"
|
||||
WHITESPACE " "
|
||||
NAME
|
||||
IDENT "S"
|
||||
WHITESPACE " "
|
||||
RECORD_FIELD_LIST
|
||||
L_CURLY "{"
|
||||
R_CURLY "}"
|
||||
error 0: expected an item
|
||||
error 3: expected an item
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
SOURCE_FILE
|
||||
ERROR
|
||||
IF_KW "if"
|
||||
WHITESPACE " "
|
||||
ERROR
|
||||
MATCH_KW "match"
|
||||
WHITESPACE "\n\n"
|
||||
STRUCT
|
||||
STRUCT_KW "struct"
|
||||
WHITESPACE " "
|
||||
NAME
|
||||
IDENT "S"
|
||||
WHITESPACE " "
|
||||
RECORD_FIELD_LIST
|
||||
L_CURLY "{"
|
||||
R_CURLY "}"
|
||||
error 0: expected an item
|
||||
error 3: expected an item
|
|
@ -1,45 +1,45 @@
|
|||
SOURCE_FILE@0..42
|
||||
SHEBANG@0..20 "#!/use/bin/env rusti"
|
||||
WHITESPACE@20..21 "\n"
|
||||
ATTR@21..23
|
||||
POUND@21..22 "#"
|
||||
BANG@22..23 "!"
|
||||
ERROR@23..24
|
||||
SLASH@23..24 "/"
|
||||
USE@24..28
|
||||
USE_KW@24..27 "use"
|
||||
ERROR@27..28
|
||||
SLASH@27..28 "/"
|
||||
MACRO_CALL@28..31
|
||||
PATH@28..31
|
||||
PATH_SEGMENT@28..31
|
||||
NAME_REF@28..31
|
||||
IDENT@28..31 "bin"
|
||||
ERROR@31..32
|
||||
SLASH@31..32 "/"
|
||||
MACRO_CALL@32..35
|
||||
PATH@32..35
|
||||
PATH_SEGMENT@32..35
|
||||
NAME_REF@32..35
|
||||
IDENT@32..35 "env"
|
||||
WHITESPACE@35..36 " "
|
||||
MACRO_CALL@36..41
|
||||
PATH@36..41
|
||||
PATH_SEGMENT@36..41
|
||||
NAME_REF@36..41
|
||||
IDENT@36..41 "rusti"
|
||||
WHITESPACE@41..42 "\n"
|
||||
error 23..23: expected `[`
|
||||
error 23..23: expected an item
|
||||
error 27..27: expected one of `*`, `::`, `{`, `self`, `super` or an identifier
|
||||
error 28..28: expected SEMICOLON
|
||||
error 31..31: expected BANG
|
||||
error 31..31: expected `{`, `[`, `(`
|
||||
error 31..31: expected SEMICOLON
|
||||
error 31..31: expected an item
|
||||
error 35..35: expected BANG
|
||||
error 35..35: expected `{`, `[`, `(`
|
||||
error 35..35: expected SEMICOLON
|
||||
error 41..41: expected BANG
|
||||
error 41..41: expected `{`, `[`, `(`
|
||||
error 41..41: expected SEMICOLON
|
||||
SOURCE_FILE
|
||||
SHEBANG "#!/use/bin/env rusti"
|
||||
WHITESPACE "\n"
|
||||
ATTR
|
||||
POUND "#"
|
||||
BANG "!"
|
||||
ERROR
|
||||
SLASH "/"
|
||||
USE
|
||||
USE_KW "use"
|
||||
ERROR
|
||||
SLASH "/"
|
||||
MACRO_CALL
|
||||
PATH
|
||||
PATH_SEGMENT
|
||||
NAME_REF
|
||||
IDENT "bin"
|
||||
ERROR
|
||||
SLASH "/"
|
||||
MACRO_CALL
|
||||
PATH
|
||||
PATH_SEGMENT
|
||||
NAME_REF
|
||||
IDENT "env"
|
||||
WHITESPACE " "
|
||||
MACRO_CALL
|
||||
PATH
|
||||
PATH_SEGMENT
|
||||
NAME_REF
|
||||
IDENT "rusti"
|
||||
WHITESPACE "\n"
|
||||
error 23: expected `[`
|
||||
error 23: expected an item
|
||||
error 27: expected one of `*`, `::`, `{`, `self`, `super` or an identifier
|
||||
error 28: expected SEMICOLON
|
||||
error 31: expected BANG
|
||||
error 31: expected `{`, `[`, `(`
|
||||
error 31: expected SEMICOLON
|
||||
error 31: expected an item
|
||||
error 35: expected BANG
|
||||
error 35: expected `{`, `[`, `(`
|
||||
error 35: expected SEMICOLON
|
||||
error 41: expected BANG
|
||||
error 41: expected `{`, `[`, `(`
|
||||
error 41: expected SEMICOLON
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
SOURCE_FILE
|
||||
SHEBANG "#!/use/bin/env rusti"
|
||||
WHITESPACE "\n"
|
||||
ATTR
|
||||
POUND "#"
|
||||
BANG "!"
|
||||
ERROR
|
||||
SLASH "/"
|
||||
USE
|
||||
USE_KW "use"
|
||||
ERROR
|
||||
SLASH "/"
|
||||
MACRO_CALL
|
||||
PATH
|
||||
PATH_SEGMENT
|
||||
NAME_REF
|
||||
IDENT "bin"
|
||||
ERROR
|
||||
SLASH "/"
|
||||
MACRO_CALL
|
||||
PATH
|
||||
PATH_SEGMENT
|
||||
NAME_REF
|
||||
IDENT "env"
|
||||
WHITESPACE " "
|
||||
MACRO_CALL
|
||||
PATH
|
||||
PATH_SEGMENT
|
||||
NAME_REF
|
||||
IDENT "rusti"
|
||||
WHITESPACE "\n"
|
||||
error 23: expected `[`
|
||||
error 23: expected an item
|
||||
error 27: expected one of `*`, `::`, `{`, `self`, `super` or an identifier
|
||||
error 28: expected SEMICOLON
|
||||
error 31: expected BANG
|
||||
error 31: expected `{`, `[`, `(`
|
||||
error 31: expected SEMICOLON
|
||||
error 31: expected an item
|
||||
error 35: expected BANG
|
||||
error 35: expected `{`, `[`, `(`
|
||||
error 35: expected SEMICOLON
|
||||
error 41: expected BANG
|
||||
error 41: expected `{`, `[`, `(`
|
||||
error 41: expected SEMICOLON
|
|
@ -1,39 +1,39 @@
|
|||
SOURCE_FILE@0..40
|
||||
STRUCT@0..39
|
||||
STRUCT_KW@0..6 "struct"
|
||||
WHITESPACE@6..7 " "
|
||||
NAME@7..8
|
||||
IDENT@7..8 "S"
|
||||
WHITESPACE@8..9 " "
|
||||
RECORD_FIELD_LIST@9..39
|
||||
L_CURLY@9..10 "{"
|
||||
WHITESPACE@10..15 "\n "
|
||||
RECORD_FIELD@15..21
|
||||
NAME@15..16
|
||||
IDENT@15..16 "a"
|
||||
COLON@16..17 ":"
|
||||
WHITESPACE@17..18 " "
|
||||
PATH_TYPE@18..21
|
||||
PATH@18..21
|
||||
PATH_SEGMENT@18..21
|
||||
NAME_REF@18..21
|
||||
IDENT@18..21 "i32"
|
||||
COMMA@21..22 ","
|
||||
WHITESPACE@22..27 "\n "
|
||||
RECORD_FIELD@27..36
|
||||
NAME@27..28
|
||||
IDENT@27..28 "b"
|
||||
COLON@28..29 ":"
|
||||
WHITESPACE@29..30 " "
|
||||
PATH_TYPE@30..36
|
||||
PATH@30..36
|
||||
PATH_SEGMENT@30..36
|
||||
NAME_REF@30..36
|
||||
IDENT@30..36 "String"
|
||||
COMMA@36..37 ","
|
||||
WHITESPACE@37..38 "\n"
|
||||
R_CURLY@38..39 "}"
|
||||
ERROR@39..40
|
||||
SEMICOLON@39..40 ";"
|
||||
error 39..39: expected item, found `;`
|
||||
SOURCE_FILE
|
||||
STRUCT
|
||||
STRUCT_KW "struct"
|
||||
WHITESPACE " "
|
||||
NAME
|
||||
IDENT "S"
|
||||
WHITESPACE " "
|
||||
RECORD_FIELD_LIST
|
||||
L_CURLY "{"
|
||||
WHITESPACE "\n "
|
||||
RECORD_FIELD
|
||||
NAME
|
||||
IDENT "a"
|
||||
COLON ":"
|
||||
WHITESPACE " "
|
||||
PATH_TYPE
|
||||
PATH
|
||||
PATH_SEGMENT
|
||||
NAME_REF
|
||||
IDENT "i32"
|
||||
COMMA ","
|
||||
WHITESPACE "\n "
|
||||
RECORD_FIELD
|
||||
NAME
|
||||
IDENT "b"
|
||||
COLON ":"
|
||||
WHITESPACE " "
|
||||
PATH_TYPE
|
||||
PATH
|
||||
PATH_SEGMENT
|
||||
NAME_REF
|
||||
IDENT "String"
|
||||
COMMA ","
|
||||
WHITESPACE "\n"
|
||||
R_CURLY "}"
|
||||
ERROR
|
||||
SEMICOLON ";"
|
||||
error 39: expected item, found `;`
|
||||
consider removing this semicolon
|
||||
|
|
|
@ -1,39 +0,0 @@
|
|||
SOURCE_FILE
|
||||
STRUCT
|
||||
STRUCT_KW "struct"
|
||||
WHITESPACE " "
|
||||
NAME
|
||||
IDENT "S"
|
||||
WHITESPACE " "
|
||||
RECORD_FIELD_LIST
|
||||
L_CURLY "{"
|
||||
WHITESPACE "\n "
|
||||
RECORD_FIELD
|
||||
NAME
|
||||
IDENT "a"
|
||||
COLON ":"
|
||||
WHITESPACE " "
|
||||
PATH_TYPE
|
||||
PATH
|
||||
PATH_SEGMENT
|
||||
NAME_REF
|
||||
IDENT "i32"
|
||||
COMMA ","
|
||||
WHITESPACE "\n "
|
||||
RECORD_FIELD
|
||||
NAME
|
||||
IDENT "b"
|
||||
COLON ":"
|
||||
WHITESPACE " "
|
||||
PATH_TYPE
|
||||
PATH
|
||||
PATH_SEGMENT
|
||||
NAME_REF
|
||||
IDENT "String"
|
||||
COMMA ","
|
||||
WHITESPACE "\n"
|
||||
R_CURLY "}"
|
||||
ERROR
|
||||
SEMICOLON ";"
|
||||
error 39: expected item, found `;`
|
||||
consider removing this semicolon
|
|
@ -1,15 +1,15 @@
|
|||
SOURCE_FILE@0..12
|
||||
USE@0..12
|
||||
USE_KW@0..3 "use"
|
||||
WHITESPACE@3..4 " "
|
||||
USE_TREE@4..11
|
||||
PATH@4..11
|
||||
PATH@4..7
|
||||
PATH_SEGMENT@4..7
|
||||
NAME_REF@4..7
|
||||
IDENT@4..7 "foo"
|
||||
COLON2@7..9 "::"
|
||||
ERROR@9..11
|
||||
INT_NUMBER@9..11 "92"
|
||||
SEMICOLON@11..12 ";"
|
||||
error 9..9: expected identifier
|
||||
SOURCE_FILE
|
||||
USE
|
||||
USE_KW "use"
|
||||
WHITESPACE " "
|
||||
USE_TREE
|
||||
PATH
|
||||
PATH
|
||||
PATH_SEGMENT
|
||||
NAME_REF
|
||||
IDENT "foo"
|
||||
COLON2 "::"
|
||||
ERROR
|
||||
INT_NUMBER "92"
|
||||
SEMICOLON ";"
|
||||
error 9: expected identifier
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
SOURCE_FILE
|
||||
USE
|
||||
USE_KW "use"
|
||||
WHITESPACE " "
|
||||
USE_TREE
|
||||
PATH
|
||||
PATH
|
||||
PATH_SEGMENT
|
||||
NAME_REF
|
||||
IDENT "foo"
|
||||
COLON2 "::"
|
||||
ERROR
|
||||
INT_NUMBER "92"
|
||||
SEMICOLON ";"
|
||||
error 9: expected identifier
|
|
@ -1,62 +1,62 @@
|
|||
SOURCE_FILE@0..54
|
||||
FN@0..31
|
||||
ATTR@0..18
|
||||
POUND@0..1 "#"
|
||||
L_BRACK@1..2 "["
|
||||
META@2..17
|
||||
PATH@2..5
|
||||
PATH_SEGMENT@2..5
|
||||
NAME_REF@2..5
|
||||
IDENT@2..5 "foo"
|
||||
TOKEN_TREE@5..17
|
||||
L_PAREN@5..6 "("
|
||||
IDENT@6..9 "foo"
|
||||
COMMA@9..10 ","
|
||||
WHITESPACE@10..11 " "
|
||||
PLUS@11..12 "+"
|
||||
COMMA@12..13 ","
|
||||
WHITESPACE@13..14 " "
|
||||
INT_NUMBER@14..16 "92"
|
||||
R_PAREN@16..17 ")"
|
||||
R_BRACK@17..18 "]"
|
||||
WHITESPACE@18..19 "\n"
|
||||
FN_KW@19..21 "fn"
|
||||
WHITESPACE@21..22 " "
|
||||
NAME@22..25
|
||||
IDENT@22..25 "foo"
|
||||
PARAM_LIST@25..27
|
||||
L_PAREN@25..26 "("
|
||||
R_PAREN@26..27 ")"
|
||||
WHITESPACE@27..28 " "
|
||||
BLOCK_EXPR@28..31
|
||||
STMT_LIST@28..31
|
||||
L_CURLY@28..29 "{"
|
||||
WHITESPACE@29..30 "\n"
|
||||
R_CURLY@30..31 "}"
|
||||
WHITESPACE@31..34 "\n\n\n"
|
||||
ATTR@34..53
|
||||
POUND@34..35 "#"
|
||||
L_BRACK@35..36 "["
|
||||
META@36..53
|
||||
PATH@36..39
|
||||
PATH_SEGMENT@36..39
|
||||
NAME_REF@36..39
|
||||
IDENT@36..39 "foo"
|
||||
TOKEN_TREE@39..53
|
||||
L_PAREN@39..40 "("
|
||||
WHITESPACE@40..41 "\n"
|
||||
FN_KW@41..43 "fn"
|
||||
WHITESPACE@43..44 " "
|
||||
IDENT@44..47 "foo"
|
||||
TOKEN_TREE@47..49
|
||||
L_PAREN@47..48 "("
|
||||
R_PAREN@48..49 ")"
|
||||
WHITESPACE@49..50 " "
|
||||
TOKEN_TREE@50..53
|
||||
L_CURLY@50..51 "{"
|
||||
WHITESPACE@51..52 "\n"
|
||||
R_CURLY@52..53 "}"
|
||||
WHITESPACE@53..54 "\n"
|
||||
error 53..53: expected R_PAREN
|
||||
error 53..53: expected `]`
|
||||
error 53..53: expected an item
|
||||
SOURCE_FILE
|
||||
FN
|
||||
ATTR
|
||||
POUND "#"
|
||||
L_BRACK "["
|
||||
META
|
||||
PATH
|
||||
PATH_SEGMENT
|
||||
NAME_REF
|
||||
IDENT "foo"
|
||||
TOKEN_TREE
|
||||
L_PAREN "("
|
||||
IDENT "foo"
|
||||
COMMA ","
|
||||
WHITESPACE " "
|
||||
PLUS "+"
|
||||
COMMA ","
|
||||
WHITESPACE " "
|
||||
INT_NUMBER "92"
|
||||
R_PAREN ")"
|
||||
R_BRACK "]"
|
||||
WHITESPACE "\n"
|
||||
FN_KW "fn"
|
||||
WHITESPACE " "
|
||||
NAME
|
||||
IDENT "foo"
|
||||
PARAM_LIST
|
||||
L_PAREN "("
|
||||
R_PAREN ")"
|
||||
WHITESPACE " "
|
||||
BLOCK_EXPR
|
||||
STMT_LIST
|
||||
L_CURLY "{"
|
||||
WHITESPACE "\n"
|
||||
R_CURLY "}"
|
||||
WHITESPACE "\n\n\n"
|
||||
ATTR
|
||||
POUND "#"
|
||||
L_BRACK "["
|
||||
META
|
||||
PATH
|
||||
PATH_SEGMENT
|
||||
NAME_REF
|
||||
IDENT "foo"
|
||||
TOKEN_TREE
|
||||
L_PAREN "("
|
||||
WHITESPACE "\n"
|
||||
FN_KW "fn"
|
||||
WHITESPACE " "
|
||||
IDENT "foo"
|
||||
TOKEN_TREE
|
||||
L_PAREN "("
|
||||
R_PAREN ")"
|
||||
WHITESPACE " "
|
||||
TOKEN_TREE
|
||||
L_CURLY "{"
|
||||
WHITESPACE "\n"
|
||||
R_CURLY "}"
|
||||
WHITESPACE "\n"
|
||||
error 53: expected R_PAREN
|
||||
error 53: expected `]`
|
||||
error 53: expected an item
|
||||
|
|
|
@ -1,62 +0,0 @@
|
|||
SOURCE_FILE
|
||||
FN
|
||||
ATTR
|
||||
POUND "#"
|
||||
L_BRACK "["
|
||||
META
|
||||
PATH
|
||||
PATH_SEGMENT
|
||||
NAME_REF
|
||||
IDENT "foo"
|
||||
TOKEN_TREE
|
||||
L_PAREN "("
|
||||
IDENT "foo"
|
||||
COMMA ","
|
||||
WHITESPACE " "
|
||||
PLUS "+"
|
||||
COMMA ","
|
||||
WHITESPACE " "
|
||||
INT_NUMBER "92"
|
||||
R_PAREN ")"
|
||||
R_BRACK "]"
|
||||
WHITESPACE "\n"
|
||||
FN_KW "fn"
|
||||
WHITESPACE " "
|
||||
NAME
|
||||
IDENT "foo"
|
||||
PARAM_LIST
|
||||
L_PAREN "("
|
||||
R_PAREN ")"
|
||||
WHITESPACE " "
|
||||
BLOCK_EXPR
|
||||
STMT_LIST
|
||||
L_CURLY "{"
|
||||
WHITESPACE "\n"
|
||||
R_CURLY "}"
|
||||
WHITESPACE "\n\n\n"
|
||||
ATTR
|
||||
POUND "#"
|
||||
L_BRACK "["
|
||||
META
|
||||
PATH
|
||||
PATH_SEGMENT
|
||||
NAME_REF
|
||||
IDENT "foo"
|
||||
TOKEN_TREE
|
||||
L_PAREN "("
|
||||
WHITESPACE "\n"
|
||||
FN_KW "fn"
|
||||
WHITESPACE " "
|
||||
IDENT "foo"
|
||||
TOKEN_TREE
|
||||
L_PAREN "("
|
||||
R_PAREN ")"
|
||||
WHITESPACE " "
|
||||
TOKEN_TREE
|
||||
L_CURLY "{"
|
||||
WHITESPACE "\n"
|
||||
R_CURLY "}"
|
||||
WHITESPACE "\n"
|
||||
error 53: expected R_PAREN
|
||||
error 53: expected `]`
|
||||
error 53: expected an item
|
|
@ -1,74 +1,74 @@
|
|||
SOURCE_FILE@0..74
|
||||
STRUCT@0..73
|
||||
STRUCT_KW@0..6 "struct"
|
||||
WHITESPACE@6..7 " "
|
||||
NAME@7..8
|
||||
IDENT@7..8 "S"
|
||||
WHITESPACE@8..9 " "
|
||||
RECORD_FIELD_LIST@9..73
|
||||
L_CURLY@9..10 "{"
|
||||
WHITESPACE@10..15 "\n "
|
||||
RECORD_FIELD@15..21
|
||||
NAME@15..16
|
||||
IDENT@15..16 "f"
|
||||
COLON@16..17 ":"
|
||||
WHITESPACE@17..18 " "
|
||||
PATH_TYPE@18..21
|
||||
PATH@18..21
|
||||
PATH_SEGMENT@18..21
|
||||
NAME_REF@18..21
|
||||
IDENT@18..21 "u32"
|
||||
COMMA@21..22 ","
|
||||
WHITESPACE@22..27 "\n "
|
||||
VISIBILITY@27..30
|
||||
PUB_KW@27..30 "pub"
|
||||
WHITESPACE@30..31 " "
|
||||
ERROR@31..33
|
||||
INT_NUMBER@31..33 "92"
|
||||
WHITESPACE@33..38 "\n "
|
||||
ERROR@38..39
|
||||
PLUS@38..39 "+"
|
||||
WHITESPACE@39..40 " "
|
||||
ERROR@40..41
|
||||
MINUS@40..41 "-"
|
||||
WHITESPACE@41..42 " "
|
||||
ERROR@42..43
|
||||
STAR@42..43 "*"
|
||||
WHITESPACE@43..48 "\n "
|
||||
RECORD_FIELD@48..58
|
||||
VISIBILITY@48..51
|
||||
PUB_KW@48..51 "pub"
|
||||
WHITESPACE@51..52 " "
|
||||
NAME@52..53
|
||||
IDENT@52..53 "x"
|
||||
COLON@53..54 ":"
|
||||
WHITESPACE@54..55 " "
|
||||
PATH_TYPE@55..58
|
||||
PATH@55..58
|
||||
PATH_SEGMENT@55..58
|
||||
NAME_REF@55..58
|
||||
IDENT@55..58 "u32"
|
||||
COMMA@58..59 ","
|
||||
WHITESPACE@59..64 "\n "
|
||||
RECORD_FIELD@64..70
|
||||
NAME@64..65
|
||||
IDENT@64..65 "z"
|
||||
COLON@65..66 ":"
|
||||
WHITESPACE@66..67 " "
|
||||
PATH_TYPE@67..70
|
||||
PATH@67..70
|
||||
PATH_SEGMENT@67..70
|
||||
NAME_REF@67..70
|
||||
IDENT@67..70 "f64"
|
||||
COMMA@70..71 ","
|
||||
WHITESPACE@71..72 "\n"
|
||||
R_CURLY@72..73 "}"
|
||||
WHITESPACE@73..74 "\n"
|
||||
error 31..31: expected field declaration
|
||||
error 33..33: expected COMMA
|
||||
error 38..38: expected field declaration
|
||||
error 39..39: expected COMMA
|
||||
error 40..40: expected field declaration
|
||||
error 41..41: expected COMMA
|
||||
error 42..42: expected field declaration
|
||||
error 43..43: expected COMMA
|
||||
SOURCE_FILE
|
||||
STRUCT
|
||||
STRUCT_KW "struct"
|
||||
WHITESPACE " "
|
||||
NAME
|
||||
IDENT "S"
|
||||
WHITESPACE " "
|
||||
RECORD_FIELD_LIST
|
||||
L_CURLY "{"
|
||||
WHITESPACE "\n "
|
||||
RECORD_FIELD
|
||||
NAME
|
||||
IDENT "f"
|
||||
COLON ":"
|
||||
WHITESPACE " "
|
||||
PATH_TYPE
|
||||
PATH
|
||||
PATH_SEGMENT
|
||||
NAME_REF
|
||||
IDENT "u32"
|
||||
COMMA ","
|
||||
WHITESPACE "\n "
|
||||
VISIBILITY
|
||||
PUB_KW "pub"
|
||||
WHITESPACE " "
|
||||
ERROR
|
||||
INT_NUMBER "92"
|
||||
WHITESPACE "\n "
|
||||
ERROR
|
||||
PLUS "+"
|
||||
WHITESPACE " "
|
||||
ERROR
|
||||
MINUS "-"
|
||||
WHITESPACE " "
|
||||
ERROR
|
||||
STAR "*"
|
||||
WHITESPACE "\n "
|
||||
RECORD_FIELD
|
||||
VISIBILITY
|
||||
PUB_KW "pub"
|
||||
WHITESPACE " "
|
||||
NAME
|
||||
IDENT "x"
|
||||
COLON ":"
|
||||
WHITESPACE " "
|
||||
PATH_TYPE
|
||||
PATH
|
||||
PATH_SEGMENT
|
||||
NAME_REF
|
||||
IDENT "u32"
|
||||
COMMA ","
|
||||
WHITESPACE "\n "
|
||||
RECORD_FIELD
|
||||
NAME
|
||||
IDENT "z"
|
||||
COLON ":"
|
||||
WHITESPACE " "
|
||||
PATH_TYPE
|
||||
PATH
|
||||
PATH_SEGMENT
|
||||
NAME_REF
|
||||
IDENT "f64"
|
||||
COMMA ","
|
||||
WHITESPACE "\n"
|
||||
R_CURLY "}"
|
||||
WHITESPACE "\n"
|
||||
error 31: expected field declaration
|
||||
error 33: expected COMMA
|
||||
error 38: expected field declaration
|
||||
error 39: expected COMMA
|
||||
error 40: expected field declaration
|
||||
error 41: expected COMMA
|
||||
error 42: expected field declaration
|
||||
error 43: expected COMMA
|
||||
|
|
|
@ -1,74 +0,0 @@
|
|||
SOURCE_FILE
|
||||
STRUCT
|
||||
STRUCT_KW "struct"
|
||||
WHITESPACE " "
|
||||
NAME
|
||||
IDENT "S"
|
||||
WHITESPACE " "
|
||||
RECORD_FIELD_LIST
|
||||
L_CURLY "{"
|
||||
WHITESPACE "\n "
|
||||
RECORD_FIELD
|
||||
NAME
|
||||
IDENT "f"
|
||||
COLON ":"
|
||||
WHITESPACE " "
|
||||
PATH_TYPE
|
||||
PATH
|
||||
PATH_SEGMENT
|
||||
NAME_REF
|
||||
IDENT "u32"
|
||||
COMMA ","
|
||||
WHITESPACE "\n "
|
||||
VISIBILITY
|
||||
PUB_KW "pub"
|
||||
WHITESPACE " "
|
||||
ERROR
|
||||
INT_NUMBER "92"
|
||||
WHITESPACE "\n "
|
||||
ERROR
|
||||
PLUS "+"
|
||||
WHITESPACE " "
|
||||
ERROR
|
||||
MINUS "-"
|
||||
WHITESPACE " "
|
||||
ERROR
|
||||
STAR "*"
|
||||
WHITESPACE "\n "
|
||||
RECORD_FIELD
|
||||
VISIBILITY
|
||||
PUB_KW "pub"
|
||||
WHITESPACE " "
|
||||
NAME
|
||||
IDENT "x"
|
||||
COLON ":"
|
||||
WHITESPACE " "
|
||||
PATH_TYPE
|
||||
PATH
|
||||
PATH_SEGMENT
|
||||
NAME_REF
|
||||
IDENT "u32"
|
||||
COMMA ","
|
||||
WHITESPACE "\n "
|
||||
RECORD_FIELD
|
||||
NAME
|
||||
IDENT "z"
|
||||
COLON ":"
|
||||
WHITESPACE " "
|
||||
PATH_TYPE
|
||||
PATH
|
||||
PATH_SEGMENT
|
||||
NAME_REF
|
||||
IDENT "f64"
|
||||
COMMA ","
|
||||
WHITESPACE "\n"
|
||||
R_CURLY "}"
|
||||
WHITESPACE "\n"
|
||||
error 31: expected field declaration
|
||||
error 33: expected COMMA
|
||||
error 38: expected field declaration
|
||||
error 39: expected COMMA
|
||||
error 40: expected field declaration
|
||||
error 41: expected COMMA
|
||||
error 42: expected field declaration
|
||||
error 43: expected COMMA
|
|
@ -1,33 +1,33 @@
|
|||
SOURCE_FILE@0..31
|
||||
ERROR@0..1
|
||||
R_CURLY@0..1 "}"
|
||||
WHITESPACE@1..3 "\n\n"
|
||||
STRUCT@3..12
|
||||
STRUCT_KW@3..9 "struct"
|
||||
WHITESPACE@9..10 " "
|
||||
NAME@10..11
|
||||
IDENT@10..11 "S"
|
||||
SEMICOLON@11..12 ";"
|
||||
WHITESPACE@12..14 "\n\n"
|
||||
ERROR@14..15
|
||||
R_CURLY@14..15 "}"
|
||||
WHITESPACE@15..17 "\n\n"
|
||||
FN@17..27
|
||||
FN_KW@17..19 "fn"
|
||||
WHITESPACE@19..20 " "
|
||||
NAME@20..23
|
||||
IDENT@20..23 "foo"
|
||||
PARAM_LIST@23..25
|
||||
L_PAREN@23..24 "("
|
||||
R_PAREN@24..25 ")"
|
||||
BLOCK_EXPR@25..27
|
||||
STMT_LIST@25..27
|
||||
L_CURLY@25..26 "{"
|
||||
R_CURLY@26..27 "}"
|
||||
WHITESPACE@27..29 "\n\n"
|
||||
ERROR@29..30
|
||||
R_CURLY@29..30 "}"
|
||||
WHITESPACE@30..31 "\n"
|
||||
error 0..0: unmatched `}`
|
||||
error 14..14: unmatched `}`
|
||||
error 29..29: unmatched `}`
|
||||
SOURCE_FILE
|
||||
ERROR
|
||||
R_CURLY "}"
|
||||
WHITESPACE "\n\n"
|
||||
STRUCT
|
||||
STRUCT_KW "struct"
|
||||
WHITESPACE " "
|
||||
NAME
|
||||
IDENT "S"
|
||||
SEMICOLON ";"
|
||||
WHITESPACE "\n\n"
|
||||
ERROR
|
||||
R_CURLY "}"
|
||||
WHITESPACE "\n\n"
|
||||
FN
|
||||
FN_KW "fn"
|
||||
WHITESPACE " "
|
||||
NAME
|
||||
IDENT "foo"
|
||||
PARAM_LIST
|
||||
L_PAREN "("
|
||||
R_PAREN ")"
|
||||
BLOCK_EXPR
|
||||
STMT_LIST
|
||||
L_CURLY "{"
|
||||
R_CURLY "}"
|
||||
WHITESPACE "\n\n"
|
||||
ERROR
|
||||
R_CURLY "}"
|
||||
WHITESPACE "\n"
|
||||
error 0: unmatched `}`
|
||||
error 14: unmatched `}`
|
||||
error 29: unmatched `}`
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
SOURCE_FILE
|
||||
ERROR
|
||||
R_CURLY "}"
|
||||
WHITESPACE "\n\n"
|
||||
STRUCT
|
||||
STRUCT_KW "struct"
|
||||
WHITESPACE " "
|
||||
NAME
|
||||
IDENT "S"
|
||||
SEMICOLON ";"
|
||||
WHITESPACE "\n\n"
|
||||
ERROR
|
||||
R_CURLY "}"
|
||||
WHITESPACE "\n\n"
|
||||
FN
|
||||
FN_KW "fn"
|
||||
WHITESPACE " "
|
||||
NAME
|
||||
IDENT "foo"
|
||||
PARAM_LIST
|
||||
L_PAREN "("
|
||||
R_PAREN ")"
|
||||
BLOCK_EXPR
|
||||
STMT_LIST
|
||||
L_CURLY "{"
|
||||
R_CURLY "}"
|
||||
WHITESPACE "\n\n"
|
||||
ERROR
|
||||
R_CURLY "}"
|
||||
WHITESPACE "\n"
|
||||
error 0: unmatched `}`
|
||||
error 14: unmatched `}`
|
||||
error 29: unmatched `}`
|
|
@ -1,81 +1,80 @@
|
|||
SOURCE_FILE@0..95
|
||||
FN@0..12
|
||||
FN_KW@0..2 "fn"
|
||||
WHITESPACE@2..3 " "
|
||||
NAME@3..6
|
||||
IDENT@3..6 "foo"
|
||||
PARAM_LIST@6..8
|
||||
L_PAREN@6..7 "("
|
||||
R_PAREN@7..8 ")"
|
||||
WHITESPACE@8..9 " "
|
||||
BLOCK_EXPR@9..12
|
||||
STMT_LIST@9..12
|
||||
L_CURLY@9..10 "{"
|
||||
WHITESPACE@10..11 "\n"
|
||||
R_CURLY@11..12 "}"
|
||||
WHITESPACE@12..14 "\n\n"
|
||||
MACRO_CALL@14..19
|
||||
PATH@14..17
|
||||
PATH_SEGMENT@14..17
|
||||
NAME_REF@14..17
|
||||
IDENT@14..17 "bar"
|
||||
TOKEN_TREE@17..19
|
||||
L_PAREN@17..18 "("
|
||||
R_PAREN@18..19 ")"
|
||||
WHITESPACE@19..20 " "
|
||||
ERROR@20..80
|
||||
L_CURLY@20..21 "{"
|
||||
WHITESPACE@21..26 "\n "
|
||||
IF_EXPR@26..78
|
||||
IF_KW@26..28 "if"
|
||||
WHITESPACE@28..29 " "
|
||||
CONDITION@29..33
|
||||
LITERAL@29..33
|
||||
TRUE_KW@29..33 "true"
|
||||
WHITESPACE@33..34 " "
|
||||
BLOCK_EXPR@34..51
|
||||
STMT_LIST@34..51
|
||||
L_CURLY@34..35 "{"
|
||||
WHITESPACE@35..44 "\n "
|
||||
LITERAL@44..45
|
||||
INT_NUMBER@44..45 "1"
|
||||
WHITESPACE@45..50 "\n "
|
||||
R_CURLY@50..51 "}"
|
||||
WHITESPACE@51..52 " "
|
||||
ELSE_KW@52..56 "else"
|
||||
WHITESPACE@56..57 " "
|
||||
BLOCK_EXPR@57..78
|
||||
STMT_LIST@57..78
|
||||
L_CURLY@57..58 "{"
|
||||
WHITESPACE@58..67 "\n "
|
||||
BIN_EXPR@67..72
|
||||
LITERAL@67..68
|
||||
INT_NUMBER@67..68 "2"
|
||||
WHITESPACE@68..69 " "
|
||||
PLUS@69..70 "+"
|
||||
WHITESPACE@70..71 " "
|
||||
LITERAL@71..72
|
||||
INT_NUMBER@71..72 "3"
|
||||
WHITESPACE@72..77 "\n "
|
||||
R_CURLY@77..78 "}"
|
||||
WHITESPACE@78..79 "\n"
|
||||
R_CURLY@79..80 "}"
|
||||
WHITESPACE@80..82 "\n\n"
|
||||
FN@82..94
|
||||
FN_KW@82..84 "fn"
|
||||
WHITESPACE@84..85 " "
|
||||
NAME@85..88
|
||||
IDENT@85..88 "baz"
|
||||
PARAM_LIST@88..90
|
||||
L_PAREN@88..89 "("
|
||||
R_PAREN@89..90 ")"
|
||||
WHITESPACE@90..91 " "
|
||||
BLOCK_EXPR@91..94
|
||||
STMT_LIST@91..94
|
||||
L_CURLY@91..92 "{"
|
||||
WHITESPACE@92..93 "\n"
|
||||
R_CURLY@93..94 "}"
|
||||
WHITESPACE@94..95 "\n"
|
||||
error 17..17: expected BANG
|
||||
error 19..19: expected SEMICOLON
|
||||
error 20..20: expected an item
|
||||
SOURCE_FILE
|
||||
FN
|
||||
FN_KW "fn"
|
||||
WHITESPACE " "
|
||||
NAME
|
||||
IDENT "foo"
|
||||
PARAM_LIST
|
||||
L_PAREN "("
|
||||
R_PAREN ")"
|
||||
WHITESPACE " "
|
||||
BLOCK_EXPR
|
||||
STMT_LIST
|
||||
L_CURLY "{"
|
||||
WHITESPACE "\n"
|
||||
R_CURLY "}"
|
||||
WHITESPACE "\n\n"
|
||||
MACRO_CALL
|
||||
PATH
|
||||
PATH_SEGMENT
|
||||
NAME_REF
|
||||
IDENT "bar"
|
||||
TOKEN_TREE
|
||||
L_PAREN "("
|
||||
R_PAREN ")"
|
||||
WHITESPACE " "
|
||||
ERROR
|
||||
L_CURLY "{"
|
||||
WHITESPACE "\n "
|
||||
IF_EXPR
|
||||
IF_KW "if"
|
||||
WHITESPACE " "
|
||||
LITERAL
|
||||
TRUE_KW "true"
|
||||
WHITESPACE " "
|
||||
BLOCK_EXPR
|
||||
STMT_LIST
|
||||
L_CURLY "{"
|
||||
WHITESPACE "\n "
|
||||
LITERAL
|
||||
INT_NUMBER "1"
|
||||
WHITESPACE "\n "
|
||||
R_CURLY "}"
|
||||
WHITESPACE " "
|
||||
ELSE_KW "else"
|
||||
WHITESPACE " "
|
||||
BLOCK_EXPR
|
||||
STMT_LIST
|
||||
L_CURLY "{"
|
||||
WHITESPACE "\n "
|
||||
BIN_EXPR
|
||||
LITERAL
|
||||
INT_NUMBER "2"
|
||||
WHITESPACE " "
|
||||
PLUS "+"
|
||||
WHITESPACE " "
|
||||
LITERAL
|
||||
INT_NUMBER "3"
|
||||
WHITESPACE "\n "
|
||||
R_CURLY "}"
|
||||
WHITESPACE "\n"
|
||||
R_CURLY "}"
|
||||
WHITESPACE "\n\n"
|
||||
FN
|
||||
FN_KW "fn"
|
||||
WHITESPACE " "
|
||||
NAME
|
||||
IDENT "baz"
|
||||
PARAM_LIST
|
||||
L_PAREN "("
|
||||
R_PAREN ")"
|
||||
WHITESPACE " "
|
||||
BLOCK_EXPR
|
||||
STMT_LIST
|
||||
L_CURLY "{"
|
||||
WHITESPACE "\n"
|
||||
R_CURLY "}"
|
||||
WHITESPACE "\n"
|
||||
error 17: expected BANG
|
||||
error 19: expected SEMICOLON
|
||||
error 20: expected an item
|
||||
|
|
|
@ -1,80 +0,0 @@
|
|||
SOURCE_FILE
|
||||
FN
|
||||
FN_KW "fn"
|
||||
WHITESPACE " "
|
||||
NAME
|
||||
IDENT "foo"
|
||||
PARAM_LIST
|
||||
L_PAREN "("
|
||||
R_PAREN ")"
|
||||
WHITESPACE " "
|
||||
BLOCK_EXPR
|
||||
STMT_LIST
|
||||
L_CURLY "{"
|
||||
WHITESPACE "\n"
|
||||
R_CURLY "}"
|
||||
WHITESPACE "\n\n"
|
||||
MACRO_CALL
|
||||
PATH
|
||||
PATH_SEGMENT
|
||||
NAME_REF
|
||||
IDENT "bar"
|
||||
TOKEN_TREE
|
||||
L_PAREN "("
|
||||
R_PAREN ")"
|
||||
WHITESPACE " "
|
||||
ERROR
|
||||
L_CURLY "{"
|
||||
WHITESPACE "\n "
|
||||
IF_EXPR
|
||||
IF_KW "if"
|
||||
WHITESPACE " "
|
||||
LITERAL
|
||||
TRUE_KW "true"
|
||||
WHITESPACE " "
|
||||
BLOCK_EXPR
|
||||
STMT_LIST
|
||||
L_CURLY "{"
|
||||
WHITESPACE "\n "
|
||||
LITERAL
|
||||
INT_NUMBER "1"
|
||||
WHITESPACE "\n "
|
||||
R_CURLY "}"
|
||||
WHITESPACE " "
|
||||
ELSE_KW "else"
|
||||
WHITESPACE " "
|
||||
BLOCK_EXPR
|
||||
STMT_LIST
|
||||
L_CURLY "{"
|
||||
WHITESPACE "\n "
|
||||
BIN_EXPR
|
||||
LITERAL
|
||||
INT_NUMBER "2"
|
||||
WHITESPACE " "
|
||||
PLUS "+"
|
||||
WHITESPACE " "
|
||||
LITERAL
|
||||
INT_NUMBER "3"
|
||||
WHITESPACE "\n "
|
||||
R_CURLY "}"
|
||||
WHITESPACE "\n"
|
||||
R_CURLY "}"
|
||||
WHITESPACE "\n\n"
|
||||
FN
|
||||
FN_KW "fn"
|
||||
WHITESPACE " "
|
||||
NAME
|
||||
IDENT "baz"
|
||||
PARAM_LIST
|
||||
L_PAREN "("
|
||||
R_PAREN ")"
|
||||
WHITESPACE " "
|
||||
BLOCK_EXPR
|
||||
STMT_LIST
|
||||
L_CURLY "{"
|
||||
WHITESPACE "\n"
|
||||
R_CURLY "}"
|
||||
WHITESPACE "\n"
|
||||
error 17: expected BANG
|
||||
error 19: expected SEMICOLON
|
||||
error 20: expected an item
|
|
@ -1,56 +1,56 @@
|
|||
SOURCE_FILE@0..43
|
||||
STRUCT@0..11
|
||||
STRUCT_KW@0..6 "struct"
|
||||
WHITESPACE@6..7 " "
|
||||
NAME@7..8
|
||||
IDENT@7..8 "S"
|
||||
GENERIC_PARAM_LIST@8..11
|
||||
L_ANGLE@8..9 "<"
|
||||
ERROR@9..11
|
||||
INT_NUMBER@9..11 "90"
|
||||
WHITESPACE@11..12 " "
|
||||
ERROR@12..13
|
||||
PLUS@12..13 "+"
|
||||
WHITESPACE@13..14 " "
|
||||
ERROR@14..15
|
||||
INT_NUMBER@14..15 "2"
|
||||
ERROR@15..16
|
||||
R_ANGLE@15..16 ">"
|
||||
WHITESPACE@16..17 " "
|
||||
ERROR@17..31
|
||||
L_CURLY@17..18 "{"
|
||||
WHITESPACE@18..23 "\n "
|
||||
EXPR_STMT@23..24
|
||||
PATH_EXPR@23..24
|
||||
PATH@23..24
|
||||
PATH_SEGMENT@23..24
|
||||
NAME_REF@23..24
|
||||
IDENT@23..24 "f"
|
||||
ERROR@24..25
|
||||
COLON@24..25 ":"
|
||||
WHITESPACE@25..26 " "
|
||||
PATH_EXPR@26..29
|
||||
PATH@26..29
|
||||
PATH_SEGMENT@26..29
|
||||
NAME_REF@26..29
|
||||
IDENT@26..29 "u32"
|
||||
WHITESPACE@29..30 "\n"
|
||||
R_CURLY@30..31 "}"
|
||||
WHITESPACE@31..33 "\n\n"
|
||||
STRUCT@33..42
|
||||
STRUCT_KW@33..39 "struct"
|
||||
WHITESPACE@39..40 " "
|
||||
NAME@40..41
|
||||
IDENT@40..41 "T"
|
||||
SEMICOLON@41..42 ";"
|
||||
WHITESPACE@42..43 "\n"
|
||||
error 9..9: expected type parameter
|
||||
error 11..11: expected COMMA
|
||||
error 11..11: expected R_ANGLE
|
||||
error 11..11: expected `;`, `{`, or `(`
|
||||
error 12..12: expected an item
|
||||
error 14..14: expected an item
|
||||
error 15..15: expected an item
|
||||
error 17..17: expected an item
|
||||
error 24..24: expected SEMICOLON
|
||||
error 24..24: expected expression
|
||||
SOURCE_FILE
|
||||
STRUCT
|
||||
STRUCT_KW "struct"
|
||||
WHITESPACE " "
|
||||
NAME
|
||||
IDENT "S"
|
||||
GENERIC_PARAM_LIST
|
||||
L_ANGLE "<"
|
||||
ERROR
|
||||
INT_NUMBER "90"
|
||||
WHITESPACE " "
|
||||
ERROR
|
||||
PLUS "+"
|
||||
WHITESPACE " "
|
||||
ERROR
|
||||
INT_NUMBER "2"
|
||||
ERROR
|
||||
R_ANGLE ">"
|
||||
WHITESPACE " "
|
||||
ERROR
|
||||
L_CURLY "{"
|
||||
WHITESPACE "\n "
|
||||
EXPR_STMT
|
||||
PATH_EXPR
|
||||
PATH
|
||||
PATH_SEGMENT
|
||||
NAME_REF
|
||||
IDENT "f"
|
||||
ERROR
|
||||
COLON ":"
|
||||
WHITESPACE " "
|
||||
PATH_EXPR
|
||||
PATH
|
||||
PATH_SEGMENT
|
||||
NAME_REF
|
||||
IDENT "u32"
|
||||
WHITESPACE "\n"
|
||||
R_CURLY "}"
|
||||
WHITESPACE "\n\n"
|
||||
STRUCT
|
||||
STRUCT_KW "struct"
|
||||
WHITESPACE " "
|
||||
NAME
|
||||
IDENT "T"
|
||||
SEMICOLON ";"
|
||||
WHITESPACE "\n"
|
||||
error 9: expected type parameter
|
||||
error 11: expected COMMA
|
||||
error 11: expected R_ANGLE
|
||||
error 11: expected `;`, `{`, or `(`
|
||||
error 12: expected an item
|
||||
error 14: expected an item
|
||||
error 15: expected an item
|
||||
error 17: expected an item
|
||||
error 24: expected SEMICOLON
|
||||
error 24: expected expression
|
||||
|
|
|
@ -1,56 +0,0 @@
|
|||
SOURCE_FILE
|
||||
STRUCT
|
||||
STRUCT_KW "struct"
|
||||
WHITESPACE " "
|
||||
NAME
|
||||
IDENT "S"
|
||||
GENERIC_PARAM_LIST
|
||||
L_ANGLE "<"
|
||||
ERROR
|
||||
INT_NUMBER "90"
|
||||
WHITESPACE " "
|
||||
ERROR
|
||||
PLUS "+"
|
||||
WHITESPACE " "
|
||||
ERROR
|
||||
INT_NUMBER "2"
|
||||
ERROR
|
||||
R_ANGLE ">"
|
||||
WHITESPACE " "
|
||||
ERROR
|
||||
L_CURLY "{"
|
||||
WHITESPACE "\n "
|
||||
EXPR_STMT
|
||||
PATH_EXPR
|
||||
PATH
|
||||
PATH_SEGMENT
|
||||
NAME_REF
|
||||
IDENT "f"
|
||||
ERROR
|
||||
COLON ":"
|
||||
WHITESPACE " "
|
||||
PATH_EXPR
|
||||
PATH
|
||||
PATH_SEGMENT
|
||||
NAME_REF
|
||||
IDENT "u32"
|
||||
WHITESPACE "\n"
|
||||
R_CURLY "}"
|
||||
WHITESPACE "\n\n"
|
||||
STRUCT
|
||||
STRUCT_KW "struct"
|
||||
WHITESPACE " "
|
||||
NAME
|
||||
IDENT "T"
|
||||
SEMICOLON ";"
|
||||
WHITESPACE "\n"
|
||||
error 9: expected type parameter
|
||||
error 11: expected COMMA
|
||||
error 11: expected R_ANGLE
|
||||
error 11: expected `;`, `{`, or `(`
|
||||
error 12: expected an item
|
||||
error 14: expected an item
|
||||
error 15: expected an item
|
||||
error 17: expected an item
|
||||
error 24: expected SEMICOLON
|
||||
error 24: expected expression
|
|
@ -1,45 +1,45 @@
|
|||
SOURCE_FILE@0..42
|
||||
FN@0..41
|
||||
FN_KW@0..2 "fn"
|
||||
WHITESPACE@2..3 " "
|
||||
NAME@3..7
|
||||
IDENT@3..7 "main"
|
||||
PARAM_LIST@7..9
|
||||
L_PAREN@7..8 "("
|
||||
R_PAREN@8..9 ")"
|
||||
WHITESPACE@9..10 " "
|
||||
BLOCK_EXPR@10..41
|
||||
STMT_LIST@10..41
|
||||
L_CURLY@10..11 "{"
|
||||
WHITESPACE@11..16 "\n "
|
||||
EXPR_STMT@16..24
|
||||
CLOSURE_EXPR@16..24
|
||||
PARAM_LIST@16..18
|
||||
PIPE@16..17 "|"
|
||||
PIPE@17..18 "|"
|
||||
WHITESPACE@18..19 " "
|
||||
RET_TYPE@19..24
|
||||
THIN_ARROW@19..21 "->"
|
||||
WHITESPACE@21..22 " "
|
||||
TUPLE_TYPE@22..24
|
||||
L_PAREN@22..23 "("
|
||||
R_PAREN@23..24 ")"
|
||||
WHITESPACE@24..25 " "
|
||||
EXPR_STMT@25..39
|
||||
BLOCK_EXPR@25..38
|
||||
UNSAFE_KW@25..31 "unsafe"
|
||||
WHITESPACE@31..32 " "
|
||||
STMT_LIST@32..38
|
||||
L_CURLY@32..33 "{"
|
||||
WHITESPACE@33..34 " "
|
||||
TUPLE_EXPR@34..36
|
||||
L_PAREN@34..35 "("
|
||||
R_PAREN@35..36 ")"
|
||||
WHITESPACE@36..37 " "
|
||||
R_CURLY@37..38 "}"
|
||||
SEMICOLON@38..39 ";"
|
||||
WHITESPACE@39..40 "\n"
|
||||
R_CURLY@40..41 "}"
|
||||
WHITESPACE@41..42 "\n"
|
||||
error 24..24: expected a block
|
||||
error 24..24: expected SEMICOLON
|
||||
SOURCE_FILE
|
||||
FN
|
||||
FN_KW "fn"
|
||||
WHITESPACE " "
|
||||
NAME
|
||||
IDENT "main"
|
||||
PARAM_LIST
|
||||
L_PAREN "("
|
||||
R_PAREN ")"
|
||||
WHITESPACE " "
|
||||
BLOCK_EXPR
|
||||
STMT_LIST
|
||||
L_CURLY "{"
|
||||
WHITESPACE "\n "
|
||||
EXPR_STMT
|
||||
CLOSURE_EXPR
|
||||
PARAM_LIST
|
||||
PIPE "|"
|
||||
PIPE "|"
|
||||
WHITESPACE " "
|
||||
RET_TYPE
|
||||
THIN_ARROW "->"
|
||||
WHITESPACE " "
|
||||
TUPLE_TYPE
|
||||
L_PAREN "("
|
||||
R_PAREN ")"
|
||||
WHITESPACE " "
|
||||
EXPR_STMT
|
||||
BLOCK_EXPR
|
||||
UNSAFE_KW "unsafe"
|
||||
WHITESPACE " "
|
||||
STMT_LIST
|
||||
L_CURLY "{"
|
||||
WHITESPACE " "
|
||||
TUPLE_EXPR
|
||||
L_PAREN "("
|
||||
R_PAREN ")"
|
||||
WHITESPACE " "
|
||||
R_CURLY "}"
|
||||
SEMICOLON ";"
|
||||
WHITESPACE "\n"
|
||||
R_CURLY "}"
|
||||
WHITESPACE "\n"
|
||||
error 24: expected a block
|
||||
error 24: expected SEMICOLON
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
SOURCE_FILE
|
||||
FN
|
||||
FN_KW "fn"
|
||||
WHITESPACE " "
|
||||
NAME
|
||||
IDENT "main"
|
||||
PARAM_LIST
|
||||
L_PAREN "("
|
||||
R_PAREN ")"
|
||||
WHITESPACE " "
|
||||
BLOCK_EXPR
|
||||
STMT_LIST
|
||||
L_CURLY "{"
|
||||
WHITESPACE "\n "
|
||||
EXPR_STMT
|
||||
CLOSURE_EXPR
|
||||
PARAM_LIST
|
||||
PIPE "|"
|
||||
PIPE "|"
|
||||
WHITESPACE " "
|
||||
RET_TYPE
|
||||
THIN_ARROW "->"
|
||||
WHITESPACE " "
|
||||
TUPLE_TYPE
|
||||
L_PAREN "("
|
||||
R_PAREN ")"
|
||||
WHITESPACE " "
|
||||
EXPR_STMT
|
||||
BLOCK_EXPR
|
||||
UNSAFE_KW "unsafe"
|
||||
WHITESPACE " "
|
||||
STMT_LIST
|
||||
L_CURLY "{"
|
||||
WHITESPACE " "
|
||||
TUPLE_EXPR
|
||||
L_PAREN "("
|
||||
R_PAREN ")"
|
||||
WHITESPACE " "
|
||||
R_CURLY "}"
|
||||
SEMICOLON ";"
|
||||
WHITESPACE "\n"
|
||||
R_CURLY "}"
|
||||
WHITESPACE "\n"
|
||||
error 24: expected a block
|
||||
error 24: expected SEMICOLON
|
|
@ -1,13 +1,13 @@
|
|||
SOURCE_FILE@0..19
|
||||
ERROR@0..6
|
||||
ABI@0..6
|
||||
EXTERN_KW@0..6 "extern"
|
||||
WHITESPACE@6..7 " "
|
||||
STRUCT@7..18
|
||||
STRUCT_KW@7..13 "struct"
|
||||
WHITESPACE@13..14 " "
|
||||
NAME@14..17
|
||||
IDENT@14..17 "Foo"
|
||||
SEMICOLON@17..18 ";"
|
||||
WHITESPACE@18..19 "\n"
|
||||
error 6..6: expected existential, fn, trait or impl
|
||||
SOURCE_FILE
|
||||
ERROR
|
||||
ABI
|
||||
EXTERN_KW "extern"
|
||||
WHITESPACE " "
|
||||
STRUCT
|
||||
STRUCT_KW "struct"
|
||||
WHITESPACE " "
|
||||
NAME
|
||||
IDENT "Foo"
|
||||
SEMICOLON ";"
|
||||
WHITESPACE "\n"
|
||||
error 6: expected existential, fn, trait or impl
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
SOURCE_FILE
|
||||
ERROR
|
||||
ABI
|
||||
EXTERN_KW "extern"
|
||||
WHITESPACE " "
|
||||
STRUCT
|
||||
STRUCT_KW "struct"
|
||||
WHITESPACE " "
|
||||
NAME
|
||||
IDENT "Foo"
|
||||
SEMICOLON ";"
|
||||
WHITESPACE "\n"
|
||||
error 6: expected existential, fn, trait or impl
|
|
@ -1,89 +1,89 @@
|
|||
SOURCE_FILE@0..86
|
||||
STRUCT@0..72
|
||||
VISIBILITY@0..3
|
||||
PUB_KW@0..3 "pub"
|
||||
WHITESPACE@3..4 " "
|
||||
STRUCT_KW@4..10 "struct"
|
||||
WHITESPACE@10..11 " "
|
||||
NAME@11..16
|
||||
IDENT@11..16 "Cache"
|
||||
TUPLE_FIELD_LIST@16..72
|
||||
L_PAREN@16..17 "("
|
||||
WHITESPACE@17..22 "\n "
|
||||
TUPLE_FIELD@22..68
|
||||
PATH_TYPE@22..68
|
||||
PATH@22..68
|
||||
PATH_SEGMENT@22..68
|
||||
NAME_REF@22..29
|
||||
IDENT@22..29 "RefCell"
|
||||
GENERIC_ARG_LIST@29..68
|
||||
L_ANGLE@29..30 "<"
|
||||
TYPE_ARG@30..68
|
||||
PATH_TYPE@30..68
|
||||
PATH@30..68
|
||||
PATH_SEGMENT@30..68
|
||||
NAME_REF@30..37
|
||||
IDENT@30..37 "HashMap"
|
||||
GENERIC_ARG_LIST@37..68
|
||||
L_ANGLE@37..38 "<"
|
||||
WHITESPACE@38..47 "\n "
|
||||
TYPE_ARG@47..53
|
||||
PATH_TYPE@47..53
|
||||
PATH@47..53
|
||||
PATH_SEGMENT@47..53
|
||||
NAME_REF@47..53
|
||||
IDENT@47..53 "TypeId"
|
||||
COMMA@53..54 ","
|
||||
WHITESPACE@54..63 "\n "
|
||||
TYPE_ARG@63..68
|
||||
PATH_TYPE@63..68
|
||||
PATH@63..68
|
||||
PATH_SEGMENT@63..68
|
||||
NAME_REF@63..66
|
||||
IDENT@63..66 "Box"
|
||||
GENERIC_ARG_LIST@66..68
|
||||
L_ANGLE@66..67 "<"
|
||||
TYPE_ARG@67..68
|
||||
ERROR@67..68
|
||||
AT@67..68 "@"
|
||||
WHITESPACE@68..69 " "
|
||||
TUPLE_FIELD@69..72
|
||||
PATH_TYPE@69..72
|
||||
PATH@69..72
|
||||
PATH_SEGMENT@69..72
|
||||
NAME_REF@69..72
|
||||
IDENT@69..72 "Any"
|
||||
ERROR@72..72
|
||||
ERROR@72..73
|
||||
R_ANGLE@72..73 ">"
|
||||
ERROR@73..74
|
||||
COMMA@73..74 ","
|
||||
WHITESPACE@74..79 "\n "
|
||||
ERROR@79..80
|
||||
R_ANGLE@79..80 ">"
|
||||
ERROR@80..81
|
||||
R_ANGLE@80..81 ">"
|
||||
WHITESPACE@81..82 "\n"
|
||||
ERROR@82..83
|
||||
R_PAREN@82..83 ")"
|
||||
ERROR@83..84
|
||||
SEMICOLON@83..84 ";"
|
||||
WHITESPACE@84..86 "\n\n"
|
||||
error 67..67: expected type
|
||||
error 68..68: expected COMMA
|
||||
error 68..68: expected R_ANGLE
|
||||
error 68..68: expected COMMA
|
||||
error 68..68: expected R_ANGLE
|
||||
error 68..68: expected COMMA
|
||||
error 68..68: expected R_ANGLE
|
||||
error 68..68: expected COMMA
|
||||
error 72..72: expected COMMA
|
||||
error 72..72: expected a type
|
||||
error 72..72: expected R_PAREN
|
||||
error 72..72: expected SEMICOLON
|
||||
error 72..72: expected an item
|
||||
error 73..73: expected an item
|
||||
error 79..79: expected an item
|
||||
error 80..80: expected an item
|
||||
error 82..82: expected an item
|
||||
error 83..83: expected an item
|
||||
SOURCE_FILE
|
||||
STRUCT
|
||||
VISIBILITY
|
||||
PUB_KW "pub"
|
||||
WHITESPACE " "
|
||||
STRUCT_KW "struct"
|
||||
WHITESPACE " "
|
||||
NAME
|
||||
IDENT "Cache"
|
||||
TUPLE_FIELD_LIST
|
||||
L_PAREN "("
|
||||
WHITESPACE "\n "
|
||||
TUPLE_FIELD
|
||||
PATH_TYPE
|
||||
PATH
|
||||
PATH_SEGMENT
|
||||
NAME_REF
|
||||
IDENT "RefCell"
|
||||
GENERIC_ARG_LIST
|
||||
L_ANGLE "<"
|
||||
TYPE_ARG
|
||||
PATH_TYPE
|
||||
PATH
|
||||
PATH_SEGMENT
|
||||
NAME_REF
|
||||
IDENT "HashMap"
|
||||
GENERIC_ARG_LIST
|
||||
L_ANGLE "<"
|
||||
WHITESPACE "\n "
|
||||
TYPE_ARG
|
||||
PATH_TYPE
|
||||
PATH
|
||||
PATH_SEGMENT
|
||||
NAME_REF
|
||||
IDENT "TypeId"
|
||||
COMMA ","
|
||||
WHITESPACE "\n "
|
||||
TYPE_ARG
|
||||
PATH_TYPE
|
||||
PATH
|
||||
PATH_SEGMENT
|
||||
NAME_REF
|
||||
IDENT "Box"
|
||||
GENERIC_ARG_LIST
|
||||
L_ANGLE "<"
|
||||
TYPE_ARG
|
||||
ERROR
|
||||
AT "@"
|
||||
WHITESPACE " "
|
||||
TUPLE_FIELD
|
||||
PATH_TYPE
|
||||
PATH
|
||||
PATH_SEGMENT
|
||||
NAME_REF
|
||||
IDENT "Any"
|
||||
ERROR
|
||||
ERROR
|
||||
R_ANGLE ">"
|
||||
ERROR
|
||||
COMMA ","
|
||||
WHITESPACE "\n "
|
||||
ERROR
|
||||
R_ANGLE ">"
|
||||
ERROR
|
||||
R_ANGLE ">"
|
||||
WHITESPACE "\n"
|
||||
ERROR
|
||||
R_PAREN ")"
|
||||
ERROR
|
||||
SEMICOLON ";"
|
||||
WHITESPACE "\n\n"
|
||||
error 67: expected type
|
||||
error 68: expected COMMA
|
||||
error 68: expected R_ANGLE
|
||||
error 68: expected COMMA
|
||||
error 68: expected R_ANGLE
|
||||
error 68: expected COMMA
|
||||
error 68: expected R_ANGLE
|
||||
error 68: expected COMMA
|
||||
error 72: expected COMMA
|
||||
error 72: expected a type
|
||||
error 72: expected R_PAREN
|
||||
error 72: expected SEMICOLON
|
||||
error 72: expected an item
|
||||
error 73: expected an item
|
||||
error 79: expected an item
|
||||
error 80: expected an item
|
||||
error 82: expected an item
|
||||
error 83: expected an item
|
||||
|
|
|
@ -1,89 +0,0 @@
|
|||
SOURCE_FILE
|
||||
STRUCT
|
||||
VISIBILITY
|
||||
PUB_KW "pub"
|
||||
WHITESPACE " "
|
||||
STRUCT_KW "struct"
|
||||
WHITESPACE " "
|
||||
NAME
|
||||
IDENT "Cache"
|
||||
TUPLE_FIELD_LIST
|
||||
L_PAREN "("
|
||||
WHITESPACE "\n "
|
||||
TUPLE_FIELD
|
||||
PATH_TYPE
|
||||
PATH
|
||||
PATH_SEGMENT
|
||||
NAME_REF
|
||||
IDENT "RefCell"
|
||||
GENERIC_ARG_LIST
|
||||
L_ANGLE "<"
|
||||
TYPE_ARG
|
||||
PATH_TYPE
|
||||
PATH
|
||||
PATH_SEGMENT
|
||||
NAME_REF
|
||||
IDENT "HashMap"
|
||||
GENERIC_ARG_LIST
|
||||
L_ANGLE "<"
|
||||
WHITESPACE "\n "
|
||||
TYPE_ARG
|
||||
PATH_TYPE
|
||||
PATH
|
||||
PATH_SEGMENT
|
||||
NAME_REF
|
||||
IDENT "TypeId"
|
||||
COMMA ","
|
||||
WHITESPACE "\n "
|
||||
TYPE_ARG
|
||||
PATH_TYPE
|
||||
PATH
|
||||
PATH_SEGMENT
|
||||
NAME_REF
|
||||
IDENT "Box"
|
||||
GENERIC_ARG_LIST
|
||||
L_ANGLE "<"
|
||||
TYPE_ARG
|
||||
ERROR
|
||||
AT "@"
|
||||
WHITESPACE " "
|
||||
TUPLE_FIELD
|
||||
PATH_TYPE
|
||||
PATH
|
||||
PATH_SEGMENT
|
||||
NAME_REF
|
||||
IDENT "Any"
|
||||
ERROR
|
||||
ERROR
|
||||
R_ANGLE ">"
|
||||
ERROR
|
||||
COMMA ","
|
||||
WHITESPACE "\n "
|
||||
ERROR
|
||||
R_ANGLE ">"
|
||||
ERROR
|
||||
R_ANGLE ">"
|
||||
WHITESPACE "\n"
|
||||
ERROR
|
||||
R_PAREN ")"
|
||||
ERROR
|
||||
SEMICOLON ";"
|
||||
WHITESPACE "\n\n"
|
||||
error 67: expected type
|
||||
error 68: expected COMMA
|
||||
error 68: expected R_ANGLE
|
||||
error 68: expected COMMA
|
||||
error 68: expected R_ANGLE
|
||||
error 68: expected COMMA
|
||||
error 68: expected R_ANGLE
|
||||
error 68: expected COMMA
|
||||
error 72: expected COMMA
|
||||
error 72: expected a type
|
||||
error 72: expected R_PAREN
|
||||
error 72: expected SEMICOLON
|
||||
error 72: expected an item
|
||||
error 73: expected an item
|
||||
error 79: expected an item
|
||||
error 80: expected an item
|
||||
error 82: expected an item
|
||||
error 83: expected an item
|
|
@ -1,32 +1,32 @@
|
|||
SOURCE_FILE@0..23
|
||||
FN@0..22
|
||||
FN_KW@0..2 "fn"
|
||||
WHITESPACE@2..3 " "
|
||||
NAME@3..6
|
||||
IDENT@3..6 "foo"
|
||||
GENERIC_PARAM_LIST@6..9
|
||||
L_ANGLE@6..7 "<"
|
||||
TYPE_PARAM@7..8
|
||||
NAME@7..8
|
||||
IDENT@7..8 "T"
|
||||
R_ANGLE@8..9 ">"
|
||||
PARAM_LIST@9..11
|
||||
L_PAREN@9..10 "("
|
||||
R_PAREN@10..11 ")"
|
||||
WHITESPACE@11..12 " "
|
||||
WHERE_CLAUSE@12..19
|
||||
WHERE_KW@12..17 "where"
|
||||
WHITESPACE@17..18 " "
|
||||
WHERE_PRED@18..19
|
||||
PATH_TYPE@18..19
|
||||
PATH@18..19
|
||||
PATH_SEGMENT@18..19
|
||||
NAME_REF@18..19
|
||||
IDENT@18..19 "T"
|
||||
WHITESPACE@19..20 " "
|
||||
BLOCK_EXPR@20..22
|
||||
STMT_LIST@20..22
|
||||
L_CURLY@20..21 "{"
|
||||
R_CURLY@21..22 "}"
|
||||
WHITESPACE@22..23 "\n"
|
||||
error 19..19: expected colon
|
||||
SOURCE_FILE
|
||||
FN
|
||||
FN_KW "fn"
|
||||
WHITESPACE " "
|
||||
NAME
|
||||
IDENT "foo"
|
||||
GENERIC_PARAM_LIST
|
||||
L_ANGLE "<"
|
||||
TYPE_PARAM
|
||||
NAME
|
||||
IDENT "T"
|
||||
R_ANGLE ">"
|
||||
PARAM_LIST
|
||||
L_PAREN "("
|
||||
R_PAREN ")"
|
||||
WHITESPACE " "
|
||||
WHERE_CLAUSE
|
||||
WHERE_KW "where"
|
||||
WHITESPACE " "
|
||||
WHERE_PRED
|
||||
PATH_TYPE
|
||||
PATH
|
||||
PATH_SEGMENT
|
||||
NAME_REF
|
||||
IDENT "T"
|
||||
WHITESPACE " "
|
||||
BLOCK_EXPR
|
||||
STMT_LIST
|
||||
L_CURLY "{"
|
||||
R_CURLY "}"
|
||||
WHITESPACE "\n"
|
||||
error 19: expected colon
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
SOURCE_FILE
|
||||
FN
|
||||
FN_KW "fn"
|
||||
WHITESPACE " "
|
||||
NAME
|
||||
IDENT "foo"
|
||||
GENERIC_PARAM_LIST
|
||||
L_ANGLE "<"
|
||||
TYPE_PARAM
|
||||
NAME
|
||||
IDENT "T"
|
||||
R_ANGLE ">"
|
||||
PARAM_LIST
|
||||
L_PAREN "("
|
||||
R_PAREN ")"
|
||||
WHITESPACE " "
|
||||
WHERE_CLAUSE
|
||||
WHERE_KW "where"
|
||||
WHITESPACE " "
|
||||
WHERE_PRED
|
||||
PATH_TYPE
|
||||
PATH
|
||||
PATH_SEGMENT
|
||||
NAME_REF
|
||||
IDENT "T"
|
||||
WHITESPACE " "
|
||||
BLOCK_EXPR
|
||||
STMT_LIST
|
||||
L_CURLY "{"
|
||||
R_CURLY "}"
|
||||
WHITESPACE "\n"
|
||||
error 19: expected colon
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue