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() {
|
fn lex_ok() {
|
||||||
for case in TestCase::list("lexer/ok") {
|
for case in TestCase::list("lexer/ok") {
|
||||||
let actual = lex(&case.text);
|
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() {
|
fn lex_err() {
|
||||||
for case in TestCase::list("lexer/err") {
|
for case in TestCase::list("lexer/err") {
|
||||||
let actual = lex(&case.text);
|
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") {
|
for case in TestCase::list("parser/ok") {
|
||||||
let (actual, errors) = parse(TopEntryPoint::SourceFile, &case.text);
|
let (actual, errors) = parse(TopEntryPoint::SourceFile, &case.text);
|
||||||
assert!(!errors, "errors in an OK file {}:\n{}", case.rs.display(), actual);
|
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") {
|
for case in TestCase::list("parser/inline/ok") {
|
||||||
let (actual, errors) = parse(TopEntryPoint::SourceFile, &case.text);
|
let (actual, errors) = parse(TopEntryPoint::SourceFile, &case.text);
|
||||||
assert!(!errors, "errors in an OK file {}:\n{}", case.rs.display(), actual);
|
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") {
|
for case in TestCase::list("parser/err") {
|
||||||
let (actual, errors) = parse(TopEntryPoint::SourceFile, &case.text);
|
let (actual, errors) = parse(TopEntryPoint::SourceFile, &case.text);
|
||||||
assert!(errors, "no errors in an ERR file {}:\n{}", case.rs.display(), actual);
|
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") {
|
for case in TestCase::list("parser/inline/err") {
|
||||||
let (actual, errors) = parse(TopEntryPoint::SourceFile, &case.text);
|
let (actual, errors) = parse(TopEntryPoint::SourceFile, &case.text);
|
||||||
assert!(errors, "no errors in an ERR file {}:\n{}", case.rs.display(), actual);
|
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)]
|
#[derive(PartialEq, Eq, PartialOrd, Ord)]
|
||||||
struct TestCase {
|
struct TestCase {
|
||||||
rs: PathBuf,
|
rs: PathBuf,
|
||||||
txt: PathBuf,
|
rast: PathBuf,
|
||||||
text: String,
|
text: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -155,9 +155,9 @@ impl TestCase {
|
||||||
let path = file.path();
|
let path = file.path();
|
||||||
if path.extension().unwrap_or_default() == "rs" {
|
if path.extension().unwrap_or_default() == "rs" {
|
||||||
let rs = path;
|
let rs = path;
|
||||||
let txt = rs.with_extension("txt");
|
let rast = rs.with_extension("rast");
|
||||||
let text = fs::read_to_string(&rs).unwrap();
|
let text = fs::read_to_string(&rs).unwrap();
|
||||||
res.push(TestCase { rs, txt, text });
|
res.push(TestCase { rs, rast, text });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
res.sort();
|
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
|
SOURCE_FILE
|
||||||
STRUCT@0..34
|
STRUCT
|
||||||
STRUCT_KW@0..6 "struct"
|
STRUCT_KW "struct"
|
||||||
WHITESPACE@6..7 " "
|
WHITESPACE " "
|
||||||
NAME@7..8
|
NAME
|
||||||
IDENT@7..8 "S"
|
IDENT "S"
|
||||||
WHITESPACE@8..9 " "
|
WHITESPACE " "
|
||||||
RECORD_FIELD_LIST@9..34
|
RECORD_FIELD_LIST
|
||||||
L_CURLY@9..10 "{"
|
L_CURLY "{"
|
||||||
WHITESPACE@10..15 "\n "
|
WHITESPACE "\n "
|
||||||
RECORD_FIELD@15..21
|
RECORD_FIELD
|
||||||
NAME@15..16
|
NAME
|
||||||
IDENT@15..16 "a"
|
IDENT "a"
|
||||||
COLON@16..17 ":"
|
COLON ":"
|
||||||
WHITESPACE@17..18 " "
|
WHITESPACE " "
|
||||||
PATH_TYPE@18..21
|
PATH_TYPE
|
||||||
PATH@18..21
|
PATH
|
||||||
PATH_SEGMENT@18..21
|
PATH_SEGMENT
|
||||||
NAME_REF@18..21
|
NAME_REF
|
||||||
IDENT@18..21 "u32"
|
IDENT "u32"
|
||||||
WHITESPACE@21..26 "\n "
|
WHITESPACE "\n "
|
||||||
RECORD_FIELD@26..32
|
RECORD_FIELD
|
||||||
NAME@26..27
|
NAME
|
||||||
IDENT@26..27 "b"
|
IDENT "b"
|
||||||
COLON@27..28 ":"
|
COLON ":"
|
||||||
WHITESPACE@28..29 " "
|
WHITESPACE " "
|
||||||
PATH_TYPE@29..32
|
PATH_TYPE
|
||||||
PATH@29..32
|
PATH
|
||||||
PATH_SEGMENT@29..32
|
PATH_SEGMENT
|
||||||
NAME_REF@29..32
|
NAME_REF
|
||||||
IDENT@29..32 "u32"
|
IDENT "u32"
|
||||||
WHITESPACE@32..33 "\n"
|
WHITESPACE "\n"
|
||||||
R_CURLY@33..34 "}"
|
R_CURLY "}"
|
||||||
error 21..21: expected COMMA
|
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
|
SOURCE_FILE
|
||||||
ERROR@0..2
|
ERROR
|
||||||
IF_KW@0..2 "if"
|
IF_KW "if"
|
||||||
WHITESPACE@2..3 " "
|
WHITESPACE " "
|
||||||
ERROR@3..8
|
ERROR
|
||||||
MATCH_KW@3..8 "match"
|
MATCH_KW "match"
|
||||||
WHITESPACE@8..10 "\n\n"
|
WHITESPACE "\n\n"
|
||||||
STRUCT@10..21
|
STRUCT
|
||||||
STRUCT_KW@10..16 "struct"
|
STRUCT_KW "struct"
|
||||||
WHITESPACE@16..17 " "
|
WHITESPACE " "
|
||||||
NAME@17..18
|
NAME
|
||||||
IDENT@17..18 "S"
|
IDENT "S"
|
||||||
WHITESPACE@18..19 " "
|
WHITESPACE " "
|
||||||
RECORD_FIELD_LIST@19..21
|
RECORD_FIELD_LIST
|
||||||
L_CURLY@19..20 "{"
|
L_CURLY "{"
|
||||||
R_CURLY@20..21 "}"
|
R_CURLY "}"
|
||||||
error 0..0: expected an item
|
error 0: expected an item
|
||||||
error 3..3: 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
|
SOURCE_FILE
|
||||||
SHEBANG@0..20 "#!/use/bin/env rusti"
|
SHEBANG "#!/use/bin/env rusti"
|
||||||
WHITESPACE@20..21 "\n"
|
WHITESPACE "\n"
|
||||||
ATTR@21..23
|
ATTR
|
||||||
POUND@21..22 "#"
|
POUND "#"
|
||||||
BANG@22..23 "!"
|
BANG "!"
|
||||||
ERROR@23..24
|
ERROR
|
||||||
SLASH@23..24 "/"
|
SLASH "/"
|
||||||
USE@24..28
|
USE
|
||||||
USE_KW@24..27 "use"
|
USE_KW "use"
|
||||||
ERROR@27..28
|
ERROR
|
||||||
SLASH@27..28 "/"
|
SLASH "/"
|
||||||
MACRO_CALL@28..31
|
MACRO_CALL
|
||||||
PATH@28..31
|
PATH
|
||||||
PATH_SEGMENT@28..31
|
PATH_SEGMENT
|
||||||
NAME_REF@28..31
|
NAME_REF
|
||||||
IDENT@28..31 "bin"
|
IDENT "bin"
|
||||||
ERROR@31..32
|
ERROR
|
||||||
SLASH@31..32 "/"
|
SLASH "/"
|
||||||
MACRO_CALL@32..35
|
MACRO_CALL
|
||||||
PATH@32..35
|
PATH
|
||||||
PATH_SEGMENT@32..35
|
PATH_SEGMENT
|
||||||
NAME_REF@32..35
|
NAME_REF
|
||||||
IDENT@32..35 "env"
|
IDENT "env"
|
||||||
WHITESPACE@35..36 " "
|
WHITESPACE " "
|
||||||
MACRO_CALL@36..41
|
MACRO_CALL
|
||||||
PATH@36..41
|
PATH
|
||||||
PATH_SEGMENT@36..41
|
PATH_SEGMENT
|
||||||
NAME_REF@36..41
|
NAME_REF
|
||||||
IDENT@36..41 "rusti"
|
IDENT "rusti"
|
||||||
WHITESPACE@41..42 "\n"
|
WHITESPACE "\n"
|
||||||
error 23..23: expected `[`
|
error 23: expected `[`
|
||||||
error 23..23: expected an item
|
error 23: expected an item
|
||||||
error 27..27: expected one of `*`, `::`, `{`, `self`, `super` or an identifier
|
error 27: expected one of `*`, `::`, `{`, `self`, `super` or an identifier
|
||||||
error 28..28: expected SEMICOLON
|
error 28: expected SEMICOLON
|
||||||
error 31..31: expected BANG
|
error 31: expected BANG
|
||||||
error 31..31: expected `{`, `[`, `(`
|
error 31: expected `{`, `[`, `(`
|
||||||
error 31..31: expected SEMICOLON
|
error 31: expected SEMICOLON
|
||||||
error 31..31: expected an item
|
error 31: expected an item
|
||||||
error 35..35: expected BANG
|
error 35: expected BANG
|
||||||
error 35..35: expected `{`, `[`, `(`
|
error 35: expected `{`, `[`, `(`
|
||||||
error 35..35: expected SEMICOLON
|
error 35: expected SEMICOLON
|
||||||
error 41..41: expected BANG
|
error 41: expected BANG
|
||||||
error 41..41: expected `{`, `[`, `(`
|
error 41: expected `{`, `[`, `(`
|
||||||
error 41..41: expected SEMICOLON
|
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
|
SOURCE_FILE
|
||||||
STRUCT@0..39
|
STRUCT
|
||||||
STRUCT_KW@0..6 "struct"
|
STRUCT_KW "struct"
|
||||||
WHITESPACE@6..7 " "
|
WHITESPACE " "
|
||||||
NAME@7..8
|
NAME
|
||||||
IDENT@7..8 "S"
|
IDENT "S"
|
||||||
WHITESPACE@8..9 " "
|
WHITESPACE " "
|
||||||
RECORD_FIELD_LIST@9..39
|
RECORD_FIELD_LIST
|
||||||
L_CURLY@9..10 "{"
|
L_CURLY "{"
|
||||||
WHITESPACE@10..15 "\n "
|
WHITESPACE "\n "
|
||||||
RECORD_FIELD@15..21
|
RECORD_FIELD
|
||||||
NAME@15..16
|
NAME
|
||||||
IDENT@15..16 "a"
|
IDENT "a"
|
||||||
COLON@16..17 ":"
|
COLON ":"
|
||||||
WHITESPACE@17..18 " "
|
WHITESPACE " "
|
||||||
PATH_TYPE@18..21
|
PATH_TYPE
|
||||||
PATH@18..21
|
PATH
|
||||||
PATH_SEGMENT@18..21
|
PATH_SEGMENT
|
||||||
NAME_REF@18..21
|
NAME_REF
|
||||||
IDENT@18..21 "i32"
|
IDENT "i32"
|
||||||
COMMA@21..22 ","
|
COMMA ","
|
||||||
WHITESPACE@22..27 "\n "
|
WHITESPACE "\n "
|
||||||
RECORD_FIELD@27..36
|
RECORD_FIELD
|
||||||
NAME@27..28
|
NAME
|
||||||
IDENT@27..28 "b"
|
IDENT "b"
|
||||||
COLON@28..29 ":"
|
COLON ":"
|
||||||
WHITESPACE@29..30 " "
|
WHITESPACE " "
|
||||||
PATH_TYPE@30..36
|
PATH_TYPE
|
||||||
PATH@30..36
|
PATH
|
||||||
PATH_SEGMENT@30..36
|
PATH_SEGMENT
|
||||||
NAME_REF@30..36
|
NAME_REF
|
||||||
IDENT@30..36 "String"
|
IDENT "String"
|
||||||
COMMA@36..37 ","
|
COMMA ","
|
||||||
WHITESPACE@37..38 "\n"
|
WHITESPACE "\n"
|
||||||
R_CURLY@38..39 "}"
|
R_CURLY "}"
|
||||||
ERROR@39..40
|
ERROR
|
||||||
SEMICOLON@39..40 ";"
|
SEMICOLON ";"
|
||||||
error 39..39: expected item, found `;`
|
error 39: expected item, found `;`
|
||||||
consider removing this semicolon
|
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
|
SOURCE_FILE
|
||||||
USE@0..12
|
USE
|
||||||
USE_KW@0..3 "use"
|
USE_KW "use"
|
||||||
WHITESPACE@3..4 " "
|
WHITESPACE " "
|
||||||
USE_TREE@4..11
|
USE_TREE
|
||||||
PATH@4..11
|
PATH
|
||||||
PATH@4..7
|
PATH
|
||||||
PATH_SEGMENT@4..7
|
PATH_SEGMENT
|
||||||
NAME_REF@4..7
|
NAME_REF
|
||||||
IDENT@4..7 "foo"
|
IDENT "foo"
|
||||||
COLON2@7..9 "::"
|
COLON2 "::"
|
||||||
ERROR@9..11
|
ERROR
|
||||||
INT_NUMBER@9..11 "92"
|
INT_NUMBER "92"
|
||||||
SEMICOLON@11..12 ";"
|
SEMICOLON ";"
|
||||||
error 9..9: expected identifier
|
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
|
SOURCE_FILE
|
||||||
FN@0..31
|
FN
|
||||||
ATTR@0..18
|
ATTR
|
||||||
POUND@0..1 "#"
|
POUND "#"
|
||||||
L_BRACK@1..2 "["
|
L_BRACK "["
|
||||||
META@2..17
|
META
|
||||||
PATH@2..5
|
PATH
|
||||||
PATH_SEGMENT@2..5
|
PATH_SEGMENT
|
||||||
NAME_REF@2..5
|
NAME_REF
|
||||||
IDENT@2..5 "foo"
|
IDENT "foo"
|
||||||
TOKEN_TREE@5..17
|
TOKEN_TREE
|
||||||
L_PAREN@5..6 "("
|
L_PAREN "("
|
||||||
IDENT@6..9 "foo"
|
IDENT "foo"
|
||||||
COMMA@9..10 ","
|
COMMA ","
|
||||||
WHITESPACE@10..11 " "
|
WHITESPACE " "
|
||||||
PLUS@11..12 "+"
|
PLUS "+"
|
||||||
COMMA@12..13 ","
|
COMMA ","
|
||||||
WHITESPACE@13..14 " "
|
WHITESPACE " "
|
||||||
INT_NUMBER@14..16 "92"
|
INT_NUMBER "92"
|
||||||
R_PAREN@16..17 ")"
|
R_PAREN ")"
|
||||||
R_BRACK@17..18 "]"
|
R_BRACK "]"
|
||||||
WHITESPACE@18..19 "\n"
|
WHITESPACE "\n"
|
||||||
FN_KW@19..21 "fn"
|
FN_KW "fn"
|
||||||
WHITESPACE@21..22 " "
|
WHITESPACE " "
|
||||||
NAME@22..25
|
NAME
|
||||||
IDENT@22..25 "foo"
|
IDENT "foo"
|
||||||
PARAM_LIST@25..27
|
PARAM_LIST
|
||||||
L_PAREN@25..26 "("
|
L_PAREN "("
|
||||||
R_PAREN@26..27 ")"
|
R_PAREN ")"
|
||||||
WHITESPACE@27..28 " "
|
WHITESPACE " "
|
||||||
BLOCK_EXPR@28..31
|
BLOCK_EXPR
|
||||||
STMT_LIST@28..31
|
STMT_LIST
|
||||||
L_CURLY@28..29 "{"
|
L_CURLY "{"
|
||||||
WHITESPACE@29..30 "\n"
|
WHITESPACE "\n"
|
||||||
R_CURLY@30..31 "}"
|
R_CURLY "}"
|
||||||
WHITESPACE@31..34 "\n\n\n"
|
WHITESPACE "\n\n\n"
|
||||||
ATTR@34..53
|
ATTR
|
||||||
POUND@34..35 "#"
|
POUND "#"
|
||||||
L_BRACK@35..36 "["
|
L_BRACK "["
|
||||||
META@36..53
|
META
|
||||||
PATH@36..39
|
PATH
|
||||||
PATH_SEGMENT@36..39
|
PATH_SEGMENT
|
||||||
NAME_REF@36..39
|
NAME_REF
|
||||||
IDENT@36..39 "foo"
|
IDENT "foo"
|
||||||
TOKEN_TREE@39..53
|
TOKEN_TREE
|
||||||
L_PAREN@39..40 "("
|
L_PAREN "("
|
||||||
WHITESPACE@40..41 "\n"
|
WHITESPACE "\n"
|
||||||
FN_KW@41..43 "fn"
|
FN_KW "fn"
|
||||||
WHITESPACE@43..44 " "
|
WHITESPACE " "
|
||||||
IDENT@44..47 "foo"
|
IDENT "foo"
|
||||||
TOKEN_TREE@47..49
|
TOKEN_TREE
|
||||||
L_PAREN@47..48 "("
|
L_PAREN "("
|
||||||
R_PAREN@48..49 ")"
|
R_PAREN ")"
|
||||||
WHITESPACE@49..50 " "
|
WHITESPACE " "
|
||||||
TOKEN_TREE@50..53
|
TOKEN_TREE
|
||||||
L_CURLY@50..51 "{"
|
L_CURLY "{"
|
||||||
WHITESPACE@51..52 "\n"
|
WHITESPACE "\n"
|
||||||
R_CURLY@52..53 "}"
|
R_CURLY "}"
|
||||||
WHITESPACE@53..54 "\n"
|
WHITESPACE "\n"
|
||||||
error 53..53: expected R_PAREN
|
error 53: expected R_PAREN
|
||||||
error 53..53: expected `]`
|
error 53: expected `]`
|
||||||
error 53..53: expected an item
|
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
|
SOURCE_FILE
|
||||||
STRUCT@0..73
|
STRUCT
|
||||||
STRUCT_KW@0..6 "struct"
|
STRUCT_KW "struct"
|
||||||
WHITESPACE@6..7 " "
|
WHITESPACE " "
|
||||||
NAME@7..8
|
NAME
|
||||||
IDENT@7..8 "S"
|
IDENT "S"
|
||||||
WHITESPACE@8..9 " "
|
WHITESPACE " "
|
||||||
RECORD_FIELD_LIST@9..73
|
RECORD_FIELD_LIST
|
||||||
L_CURLY@9..10 "{"
|
L_CURLY "{"
|
||||||
WHITESPACE@10..15 "\n "
|
WHITESPACE "\n "
|
||||||
RECORD_FIELD@15..21
|
RECORD_FIELD
|
||||||
NAME@15..16
|
NAME
|
||||||
IDENT@15..16 "f"
|
IDENT "f"
|
||||||
COLON@16..17 ":"
|
COLON ":"
|
||||||
WHITESPACE@17..18 " "
|
WHITESPACE " "
|
||||||
PATH_TYPE@18..21
|
PATH_TYPE
|
||||||
PATH@18..21
|
PATH
|
||||||
PATH_SEGMENT@18..21
|
PATH_SEGMENT
|
||||||
NAME_REF@18..21
|
NAME_REF
|
||||||
IDENT@18..21 "u32"
|
IDENT "u32"
|
||||||
COMMA@21..22 ","
|
COMMA ","
|
||||||
WHITESPACE@22..27 "\n "
|
WHITESPACE "\n "
|
||||||
VISIBILITY@27..30
|
VISIBILITY
|
||||||
PUB_KW@27..30 "pub"
|
PUB_KW "pub"
|
||||||
WHITESPACE@30..31 " "
|
WHITESPACE " "
|
||||||
ERROR@31..33
|
ERROR
|
||||||
INT_NUMBER@31..33 "92"
|
INT_NUMBER "92"
|
||||||
WHITESPACE@33..38 "\n "
|
WHITESPACE "\n "
|
||||||
ERROR@38..39
|
ERROR
|
||||||
PLUS@38..39 "+"
|
PLUS "+"
|
||||||
WHITESPACE@39..40 " "
|
WHITESPACE " "
|
||||||
ERROR@40..41
|
ERROR
|
||||||
MINUS@40..41 "-"
|
MINUS "-"
|
||||||
WHITESPACE@41..42 " "
|
WHITESPACE " "
|
||||||
ERROR@42..43
|
ERROR
|
||||||
STAR@42..43 "*"
|
STAR "*"
|
||||||
WHITESPACE@43..48 "\n "
|
WHITESPACE "\n "
|
||||||
RECORD_FIELD@48..58
|
RECORD_FIELD
|
||||||
VISIBILITY@48..51
|
VISIBILITY
|
||||||
PUB_KW@48..51 "pub"
|
PUB_KW "pub"
|
||||||
WHITESPACE@51..52 " "
|
WHITESPACE " "
|
||||||
NAME@52..53
|
NAME
|
||||||
IDENT@52..53 "x"
|
IDENT "x"
|
||||||
COLON@53..54 ":"
|
COLON ":"
|
||||||
WHITESPACE@54..55 " "
|
WHITESPACE " "
|
||||||
PATH_TYPE@55..58
|
PATH_TYPE
|
||||||
PATH@55..58
|
PATH
|
||||||
PATH_SEGMENT@55..58
|
PATH_SEGMENT
|
||||||
NAME_REF@55..58
|
NAME_REF
|
||||||
IDENT@55..58 "u32"
|
IDENT "u32"
|
||||||
COMMA@58..59 ","
|
COMMA ","
|
||||||
WHITESPACE@59..64 "\n "
|
WHITESPACE "\n "
|
||||||
RECORD_FIELD@64..70
|
RECORD_FIELD
|
||||||
NAME@64..65
|
NAME
|
||||||
IDENT@64..65 "z"
|
IDENT "z"
|
||||||
COLON@65..66 ":"
|
COLON ":"
|
||||||
WHITESPACE@66..67 " "
|
WHITESPACE " "
|
||||||
PATH_TYPE@67..70
|
PATH_TYPE
|
||||||
PATH@67..70
|
PATH
|
||||||
PATH_SEGMENT@67..70
|
PATH_SEGMENT
|
||||||
NAME_REF@67..70
|
NAME_REF
|
||||||
IDENT@67..70 "f64"
|
IDENT "f64"
|
||||||
COMMA@70..71 ","
|
COMMA ","
|
||||||
WHITESPACE@71..72 "\n"
|
WHITESPACE "\n"
|
||||||
R_CURLY@72..73 "}"
|
R_CURLY "}"
|
||||||
WHITESPACE@73..74 "\n"
|
WHITESPACE "\n"
|
||||||
error 31..31: expected field declaration
|
error 31: expected field declaration
|
||||||
error 33..33: expected COMMA
|
error 33: expected COMMA
|
||||||
error 38..38: expected field declaration
|
error 38: expected field declaration
|
||||||
error 39..39: expected COMMA
|
error 39: expected COMMA
|
||||||
error 40..40: expected field declaration
|
error 40: expected field declaration
|
||||||
error 41..41: expected COMMA
|
error 41: expected COMMA
|
||||||
error 42..42: expected field declaration
|
error 42: expected field declaration
|
||||||
error 43..43: expected COMMA
|
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
|
SOURCE_FILE
|
||||||
ERROR@0..1
|
ERROR
|
||||||
R_CURLY@0..1 "}"
|
R_CURLY "}"
|
||||||
WHITESPACE@1..3 "\n\n"
|
WHITESPACE "\n\n"
|
||||||
STRUCT@3..12
|
STRUCT
|
||||||
STRUCT_KW@3..9 "struct"
|
STRUCT_KW "struct"
|
||||||
WHITESPACE@9..10 " "
|
WHITESPACE " "
|
||||||
NAME@10..11
|
NAME
|
||||||
IDENT@10..11 "S"
|
IDENT "S"
|
||||||
SEMICOLON@11..12 ";"
|
SEMICOLON ";"
|
||||||
WHITESPACE@12..14 "\n\n"
|
WHITESPACE "\n\n"
|
||||||
ERROR@14..15
|
ERROR
|
||||||
R_CURLY@14..15 "}"
|
R_CURLY "}"
|
||||||
WHITESPACE@15..17 "\n\n"
|
WHITESPACE "\n\n"
|
||||||
FN@17..27
|
FN
|
||||||
FN_KW@17..19 "fn"
|
FN_KW "fn"
|
||||||
WHITESPACE@19..20 " "
|
WHITESPACE " "
|
||||||
NAME@20..23
|
NAME
|
||||||
IDENT@20..23 "foo"
|
IDENT "foo"
|
||||||
PARAM_LIST@23..25
|
PARAM_LIST
|
||||||
L_PAREN@23..24 "("
|
L_PAREN "("
|
||||||
R_PAREN@24..25 ")"
|
R_PAREN ")"
|
||||||
BLOCK_EXPR@25..27
|
BLOCK_EXPR
|
||||||
STMT_LIST@25..27
|
STMT_LIST
|
||||||
L_CURLY@25..26 "{"
|
L_CURLY "{"
|
||||||
R_CURLY@26..27 "}"
|
R_CURLY "}"
|
||||||
WHITESPACE@27..29 "\n\n"
|
WHITESPACE "\n\n"
|
||||||
ERROR@29..30
|
ERROR
|
||||||
R_CURLY@29..30 "}"
|
R_CURLY "}"
|
||||||
WHITESPACE@30..31 "\n"
|
WHITESPACE "\n"
|
||||||
error 0..0: unmatched `}`
|
error 0: unmatched `}`
|
||||||
error 14..14: unmatched `}`
|
error 14: unmatched `}`
|
||||||
error 29..29: 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
|
SOURCE_FILE
|
||||||
FN@0..12
|
FN
|
||||||
FN_KW@0..2 "fn"
|
FN_KW "fn"
|
||||||
WHITESPACE@2..3 " "
|
WHITESPACE " "
|
||||||
NAME@3..6
|
NAME
|
||||||
IDENT@3..6 "foo"
|
IDENT "foo"
|
||||||
PARAM_LIST@6..8
|
PARAM_LIST
|
||||||
L_PAREN@6..7 "("
|
L_PAREN "("
|
||||||
R_PAREN@7..8 ")"
|
R_PAREN ")"
|
||||||
WHITESPACE@8..9 " "
|
WHITESPACE " "
|
||||||
BLOCK_EXPR@9..12
|
BLOCK_EXPR
|
||||||
STMT_LIST@9..12
|
STMT_LIST
|
||||||
L_CURLY@9..10 "{"
|
L_CURLY "{"
|
||||||
WHITESPACE@10..11 "\n"
|
WHITESPACE "\n"
|
||||||
R_CURLY@11..12 "}"
|
R_CURLY "}"
|
||||||
WHITESPACE@12..14 "\n\n"
|
WHITESPACE "\n\n"
|
||||||
MACRO_CALL@14..19
|
MACRO_CALL
|
||||||
PATH@14..17
|
PATH
|
||||||
PATH_SEGMENT@14..17
|
PATH_SEGMENT
|
||||||
NAME_REF@14..17
|
NAME_REF
|
||||||
IDENT@14..17 "bar"
|
IDENT "bar"
|
||||||
TOKEN_TREE@17..19
|
TOKEN_TREE
|
||||||
L_PAREN@17..18 "("
|
L_PAREN "("
|
||||||
R_PAREN@18..19 ")"
|
R_PAREN ")"
|
||||||
WHITESPACE@19..20 " "
|
WHITESPACE " "
|
||||||
ERROR@20..80
|
ERROR
|
||||||
L_CURLY@20..21 "{"
|
L_CURLY "{"
|
||||||
WHITESPACE@21..26 "\n "
|
WHITESPACE "\n "
|
||||||
IF_EXPR@26..78
|
IF_EXPR
|
||||||
IF_KW@26..28 "if"
|
IF_KW "if"
|
||||||
WHITESPACE@28..29 " "
|
WHITESPACE " "
|
||||||
CONDITION@29..33
|
LITERAL
|
||||||
LITERAL@29..33
|
TRUE_KW "true"
|
||||||
TRUE_KW@29..33 "true"
|
WHITESPACE " "
|
||||||
WHITESPACE@33..34 " "
|
BLOCK_EXPR
|
||||||
BLOCK_EXPR@34..51
|
STMT_LIST
|
||||||
STMT_LIST@34..51
|
L_CURLY "{"
|
||||||
L_CURLY@34..35 "{"
|
WHITESPACE "\n "
|
||||||
WHITESPACE@35..44 "\n "
|
LITERAL
|
||||||
LITERAL@44..45
|
INT_NUMBER "1"
|
||||||
INT_NUMBER@44..45 "1"
|
WHITESPACE "\n "
|
||||||
WHITESPACE@45..50 "\n "
|
R_CURLY "}"
|
||||||
R_CURLY@50..51 "}"
|
WHITESPACE " "
|
||||||
WHITESPACE@51..52 " "
|
ELSE_KW "else"
|
||||||
ELSE_KW@52..56 "else"
|
WHITESPACE " "
|
||||||
WHITESPACE@56..57 " "
|
BLOCK_EXPR
|
||||||
BLOCK_EXPR@57..78
|
STMT_LIST
|
||||||
STMT_LIST@57..78
|
L_CURLY "{"
|
||||||
L_CURLY@57..58 "{"
|
WHITESPACE "\n "
|
||||||
WHITESPACE@58..67 "\n "
|
BIN_EXPR
|
||||||
BIN_EXPR@67..72
|
LITERAL
|
||||||
LITERAL@67..68
|
INT_NUMBER "2"
|
||||||
INT_NUMBER@67..68 "2"
|
WHITESPACE " "
|
||||||
WHITESPACE@68..69 " "
|
PLUS "+"
|
||||||
PLUS@69..70 "+"
|
WHITESPACE " "
|
||||||
WHITESPACE@70..71 " "
|
LITERAL
|
||||||
LITERAL@71..72
|
INT_NUMBER "3"
|
||||||
INT_NUMBER@71..72 "3"
|
WHITESPACE "\n "
|
||||||
WHITESPACE@72..77 "\n "
|
R_CURLY "}"
|
||||||
R_CURLY@77..78 "}"
|
WHITESPACE "\n"
|
||||||
WHITESPACE@78..79 "\n"
|
R_CURLY "}"
|
||||||
R_CURLY@79..80 "}"
|
WHITESPACE "\n\n"
|
||||||
WHITESPACE@80..82 "\n\n"
|
FN
|
||||||
FN@82..94
|
FN_KW "fn"
|
||||||
FN_KW@82..84 "fn"
|
WHITESPACE " "
|
||||||
WHITESPACE@84..85 " "
|
NAME
|
||||||
NAME@85..88
|
IDENT "baz"
|
||||||
IDENT@85..88 "baz"
|
PARAM_LIST
|
||||||
PARAM_LIST@88..90
|
L_PAREN "("
|
||||||
L_PAREN@88..89 "("
|
R_PAREN ")"
|
||||||
R_PAREN@89..90 ")"
|
WHITESPACE " "
|
||||||
WHITESPACE@90..91 " "
|
BLOCK_EXPR
|
||||||
BLOCK_EXPR@91..94
|
STMT_LIST
|
||||||
STMT_LIST@91..94
|
L_CURLY "{"
|
||||||
L_CURLY@91..92 "{"
|
WHITESPACE "\n"
|
||||||
WHITESPACE@92..93 "\n"
|
R_CURLY "}"
|
||||||
R_CURLY@93..94 "}"
|
WHITESPACE "\n"
|
||||||
WHITESPACE@94..95 "\n"
|
error 17: expected BANG
|
||||||
error 17..17: expected BANG
|
error 19: expected SEMICOLON
|
||||||
error 19..19: expected SEMICOLON
|
error 20: expected an item
|
||||||
error 20..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
|
SOURCE_FILE
|
||||||
STRUCT@0..11
|
STRUCT
|
||||||
STRUCT_KW@0..6 "struct"
|
STRUCT_KW "struct"
|
||||||
WHITESPACE@6..7 " "
|
WHITESPACE " "
|
||||||
NAME@7..8
|
NAME
|
||||||
IDENT@7..8 "S"
|
IDENT "S"
|
||||||
GENERIC_PARAM_LIST@8..11
|
GENERIC_PARAM_LIST
|
||||||
L_ANGLE@8..9 "<"
|
L_ANGLE "<"
|
||||||
ERROR@9..11
|
ERROR
|
||||||
INT_NUMBER@9..11 "90"
|
INT_NUMBER "90"
|
||||||
WHITESPACE@11..12 " "
|
WHITESPACE " "
|
||||||
ERROR@12..13
|
ERROR
|
||||||
PLUS@12..13 "+"
|
PLUS "+"
|
||||||
WHITESPACE@13..14 " "
|
WHITESPACE " "
|
||||||
ERROR@14..15
|
ERROR
|
||||||
INT_NUMBER@14..15 "2"
|
INT_NUMBER "2"
|
||||||
ERROR@15..16
|
ERROR
|
||||||
R_ANGLE@15..16 ">"
|
R_ANGLE ">"
|
||||||
WHITESPACE@16..17 " "
|
WHITESPACE " "
|
||||||
ERROR@17..31
|
ERROR
|
||||||
L_CURLY@17..18 "{"
|
L_CURLY "{"
|
||||||
WHITESPACE@18..23 "\n "
|
WHITESPACE "\n "
|
||||||
EXPR_STMT@23..24
|
EXPR_STMT
|
||||||
PATH_EXPR@23..24
|
PATH_EXPR
|
||||||
PATH@23..24
|
PATH
|
||||||
PATH_SEGMENT@23..24
|
PATH_SEGMENT
|
||||||
NAME_REF@23..24
|
NAME_REF
|
||||||
IDENT@23..24 "f"
|
IDENT "f"
|
||||||
ERROR@24..25
|
ERROR
|
||||||
COLON@24..25 ":"
|
COLON ":"
|
||||||
WHITESPACE@25..26 " "
|
WHITESPACE " "
|
||||||
PATH_EXPR@26..29
|
PATH_EXPR
|
||||||
PATH@26..29
|
PATH
|
||||||
PATH_SEGMENT@26..29
|
PATH_SEGMENT
|
||||||
NAME_REF@26..29
|
NAME_REF
|
||||||
IDENT@26..29 "u32"
|
IDENT "u32"
|
||||||
WHITESPACE@29..30 "\n"
|
WHITESPACE "\n"
|
||||||
R_CURLY@30..31 "}"
|
R_CURLY "}"
|
||||||
WHITESPACE@31..33 "\n\n"
|
WHITESPACE "\n\n"
|
||||||
STRUCT@33..42
|
STRUCT
|
||||||
STRUCT_KW@33..39 "struct"
|
STRUCT_KW "struct"
|
||||||
WHITESPACE@39..40 " "
|
WHITESPACE " "
|
||||||
NAME@40..41
|
NAME
|
||||||
IDENT@40..41 "T"
|
IDENT "T"
|
||||||
SEMICOLON@41..42 ";"
|
SEMICOLON ";"
|
||||||
WHITESPACE@42..43 "\n"
|
WHITESPACE "\n"
|
||||||
error 9..9: expected type parameter
|
error 9: expected type parameter
|
||||||
error 11..11: expected COMMA
|
error 11: expected COMMA
|
||||||
error 11..11: expected R_ANGLE
|
error 11: expected R_ANGLE
|
||||||
error 11..11: expected `;`, `{`, or `(`
|
error 11: expected `;`, `{`, or `(`
|
||||||
error 12..12: expected an item
|
error 12: expected an item
|
||||||
error 14..14: expected an item
|
error 14: expected an item
|
||||||
error 15..15: expected an item
|
error 15: expected an item
|
||||||
error 17..17: expected an item
|
error 17: expected an item
|
||||||
error 24..24: expected SEMICOLON
|
error 24: expected SEMICOLON
|
||||||
error 24..24: expected expression
|
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
|
SOURCE_FILE
|
||||||
FN@0..41
|
FN
|
||||||
FN_KW@0..2 "fn"
|
FN_KW "fn"
|
||||||
WHITESPACE@2..3 " "
|
WHITESPACE " "
|
||||||
NAME@3..7
|
NAME
|
||||||
IDENT@3..7 "main"
|
IDENT "main"
|
||||||
PARAM_LIST@7..9
|
PARAM_LIST
|
||||||
L_PAREN@7..8 "("
|
L_PAREN "("
|
||||||
R_PAREN@8..9 ")"
|
R_PAREN ")"
|
||||||
WHITESPACE@9..10 " "
|
WHITESPACE " "
|
||||||
BLOCK_EXPR@10..41
|
BLOCK_EXPR
|
||||||
STMT_LIST@10..41
|
STMT_LIST
|
||||||
L_CURLY@10..11 "{"
|
L_CURLY "{"
|
||||||
WHITESPACE@11..16 "\n "
|
WHITESPACE "\n "
|
||||||
EXPR_STMT@16..24
|
EXPR_STMT
|
||||||
CLOSURE_EXPR@16..24
|
CLOSURE_EXPR
|
||||||
PARAM_LIST@16..18
|
PARAM_LIST
|
||||||
PIPE@16..17 "|"
|
PIPE "|"
|
||||||
PIPE@17..18 "|"
|
PIPE "|"
|
||||||
WHITESPACE@18..19 " "
|
WHITESPACE " "
|
||||||
RET_TYPE@19..24
|
RET_TYPE
|
||||||
THIN_ARROW@19..21 "->"
|
THIN_ARROW "->"
|
||||||
WHITESPACE@21..22 " "
|
WHITESPACE " "
|
||||||
TUPLE_TYPE@22..24
|
TUPLE_TYPE
|
||||||
L_PAREN@22..23 "("
|
L_PAREN "("
|
||||||
R_PAREN@23..24 ")"
|
R_PAREN ")"
|
||||||
WHITESPACE@24..25 " "
|
WHITESPACE " "
|
||||||
EXPR_STMT@25..39
|
EXPR_STMT
|
||||||
BLOCK_EXPR@25..38
|
BLOCK_EXPR
|
||||||
UNSAFE_KW@25..31 "unsafe"
|
UNSAFE_KW "unsafe"
|
||||||
WHITESPACE@31..32 " "
|
WHITESPACE " "
|
||||||
STMT_LIST@32..38
|
STMT_LIST
|
||||||
L_CURLY@32..33 "{"
|
L_CURLY "{"
|
||||||
WHITESPACE@33..34 " "
|
WHITESPACE " "
|
||||||
TUPLE_EXPR@34..36
|
TUPLE_EXPR
|
||||||
L_PAREN@34..35 "("
|
L_PAREN "("
|
||||||
R_PAREN@35..36 ")"
|
R_PAREN ")"
|
||||||
WHITESPACE@36..37 " "
|
WHITESPACE " "
|
||||||
R_CURLY@37..38 "}"
|
R_CURLY "}"
|
||||||
SEMICOLON@38..39 ";"
|
SEMICOLON ";"
|
||||||
WHITESPACE@39..40 "\n"
|
WHITESPACE "\n"
|
||||||
R_CURLY@40..41 "}"
|
R_CURLY "}"
|
||||||
WHITESPACE@41..42 "\n"
|
WHITESPACE "\n"
|
||||||
error 24..24: expected a block
|
error 24: expected a block
|
||||||
error 24..24: expected SEMICOLON
|
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
|
SOURCE_FILE
|
||||||
ERROR@0..6
|
ERROR
|
||||||
ABI@0..6
|
ABI
|
||||||
EXTERN_KW@0..6 "extern"
|
EXTERN_KW "extern"
|
||||||
WHITESPACE@6..7 " "
|
WHITESPACE " "
|
||||||
STRUCT@7..18
|
STRUCT
|
||||||
STRUCT_KW@7..13 "struct"
|
STRUCT_KW "struct"
|
||||||
WHITESPACE@13..14 " "
|
WHITESPACE " "
|
||||||
NAME@14..17
|
NAME
|
||||||
IDENT@14..17 "Foo"
|
IDENT "Foo"
|
||||||
SEMICOLON@17..18 ";"
|
SEMICOLON ";"
|
||||||
WHITESPACE@18..19 "\n"
|
WHITESPACE "\n"
|
||||||
error 6..6: expected existential, fn, trait or impl
|
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
|
SOURCE_FILE
|
||||||
STRUCT@0..72
|
STRUCT
|
||||||
VISIBILITY@0..3
|
VISIBILITY
|
||||||
PUB_KW@0..3 "pub"
|
PUB_KW "pub"
|
||||||
WHITESPACE@3..4 " "
|
WHITESPACE " "
|
||||||
STRUCT_KW@4..10 "struct"
|
STRUCT_KW "struct"
|
||||||
WHITESPACE@10..11 " "
|
WHITESPACE " "
|
||||||
NAME@11..16
|
NAME
|
||||||
IDENT@11..16 "Cache"
|
IDENT "Cache"
|
||||||
TUPLE_FIELD_LIST@16..72
|
TUPLE_FIELD_LIST
|
||||||
L_PAREN@16..17 "("
|
L_PAREN "("
|
||||||
WHITESPACE@17..22 "\n "
|
WHITESPACE "\n "
|
||||||
TUPLE_FIELD@22..68
|
TUPLE_FIELD
|
||||||
PATH_TYPE@22..68
|
PATH_TYPE
|
||||||
PATH@22..68
|
PATH
|
||||||
PATH_SEGMENT@22..68
|
PATH_SEGMENT
|
||||||
NAME_REF@22..29
|
NAME_REF
|
||||||
IDENT@22..29 "RefCell"
|
IDENT "RefCell"
|
||||||
GENERIC_ARG_LIST@29..68
|
GENERIC_ARG_LIST
|
||||||
L_ANGLE@29..30 "<"
|
L_ANGLE "<"
|
||||||
TYPE_ARG@30..68
|
TYPE_ARG
|
||||||
PATH_TYPE@30..68
|
PATH_TYPE
|
||||||
PATH@30..68
|
PATH
|
||||||
PATH_SEGMENT@30..68
|
PATH_SEGMENT
|
||||||
NAME_REF@30..37
|
NAME_REF
|
||||||
IDENT@30..37 "HashMap"
|
IDENT "HashMap"
|
||||||
GENERIC_ARG_LIST@37..68
|
GENERIC_ARG_LIST
|
||||||
L_ANGLE@37..38 "<"
|
L_ANGLE "<"
|
||||||
WHITESPACE@38..47 "\n "
|
WHITESPACE "\n "
|
||||||
TYPE_ARG@47..53
|
TYPE_ARG
|
||||||
PATH_TYPE@47..53
|
PATH_TYPE
|
||||||
PATH@47..53
|
PATH
|
||||||
PATH_SEGMENT@47..53
|
PATH_SEGMENT
|
||||||
NAME_REF@47..53
|
NAME_REF
|
||||||
IDENT@47..53 "TypeId"
|
IDENT "TypeId"
|
||||||
COMMA@53..54 ","
|
COMMA ","
|
||||||
WHITESPACE@54..63 "\n "
|
WHITESPACE "\n "
|
||||||
TYPE_ARG@63..68
|
TYPE_ARG
|
||||||
PATH_TYPE@63..68
|
PATH_TYPE
|
||||||
PATH@63..68
|
PATH
|
||||||
PATH_SEGMENT@63..68
|
PATH_SEGMENT
|
||||||
NAME_REF@63..66
|
NAME_REF
|
||||||
IDENT@63..66 "Box"
|
IDENT "Box"
|
||||||
GENERIC_ARG_LIST@66..68
|
GENERIC_ARG_LIST
|
||||||
L_ANGLE@66..67 "<"
|
L_ANGLE "<"
|
||||||
TYPE_ARG@67..68
|
TYPE_ARG
|
||||||
ERROR@67..68
|
ERROR
|
||||||
AT@67..68 "@"
|
AT "@"
|
||||||
WHITESPACE@68..69 " "
|
WHITESPACE " "
|
||||||
TUPLE_FIELD@69..72
|
TUPLE_FIELD
|
||||||
PATH_TYPE@69..72
|
PATH_TYPE
|
||||||
PATH@69..72
|
PATH
|
||||||
PATH_SEGMENT@69..72
|
PATH_SEGMENT
|
||||||
NAME_REF@69..72
|
NAME_REF
|
||||||
IDENT@69..72 "Any"
|
IDENT "Any"
|
||||||
ERROR@72..72
|
ERROR
|
||||||
ERROR@72..73
|
ERROR
|
||||||
R_ANGLE@72..73 ">"
|
R_ANGLE ">"
|
||||||
ERROR@73..74
|
ERROR
|
||||||
COMMA@73..74 ","
|
COMMA ","
|
||||||
WHITESPACE@74..79 "\n "
|
WHITESPACE "\n "
|
||||||
ERROR@79..80
|
ERROR
|
||||||
R_ANGLE@79..80 ">"
|
R_ANGLE ">"
|
||||||
ERROR@80..81
|
ERROR
|
||||||
R_ANGLE@80..81 ">"
|
R_ANGLE ">"
|
||||||
WHITESPACE@81..82 "\n"
|
WHITESPACE "\n"
|
||||||
ERROR@82..83
|
ERROR
|
||||||
R_PAREN@82..83 ")"
|
R_PAREN ")"
|
||||||
ERROR@83..84
|
ERROR
|
||||||
SEMICOLON@83..84 ";"
|
SEMICOLON ";"
|
||||||
WHITESPACE@84..86 "\n\n"
|
WHITESPACE "\n\n"
|
||||||
error 67..67: expected type
|
error 67: expected type
|
||||||
error 68..68: expected COMMA
|
error 68: expected COMMA
|
||||||
error 68..68: expected R_ANGLE
|
error 68: expected R_ANGLE
|
||||||
error 68..68: expected COMMA
|
error 68: expected COMMA
|
||||||
error 68..68: expected R_ANGLE
|
error 68: expected R_ANGLE
|
||||||
error 68..68: expected COMMA
|
error 68: expected COMMA
|
||||||
error 68..68: expected R_ANGLE
|
error 68: expected R_ANGLE
|
||||||
error 68..68: expected COMMA
|
error 68: expected COMMA
|
||||||
error 72..72: expected COMMA
|
error 72: expected COMMA
|
||||||
error 72..72: expected a type
|
error 72: expected a type
|
||||||
error 72..72: expected R_PAREN
|
error 72: expected R_PAREN
|
||||||
error 72..72: expected SEMICOLON
|
error 72: expected SEMICOLON
|
||||||
error 72..72: expected an item
|
error 72: expected an item
|
||||||
error 73..73: expected an item
|
error 73: expected an item
|
||||||
error 79..79: expected an item
|
error 79: expected an item
|
||||||
error 80..80: expected an item
|
error 80: expected an item
|
||||||
error 82..82: expected an item
|
error 82: expected an item
|
||||||
error 83..83: 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
|
SOURCE_FILE
|
||||||
FN@0..22
|
FN
|
||||||
FN_KW@0..2 "fn"
|
FN_KW "fn"
|
||||||
WHITESPACE@2..3 " "
|
WHITESPACE " "
|
||||||
NAME@3..6
|
NAME
|
||||||
IDENT@3..6 "foo"
|
IDENT "foo"
|
||||||
GENERIC_PARAM_LIST@6..9
|
GENERIC_PARAM_LIST
|
||||||
L_ANGLE@6..7 "<"
|
L_ANGLE "<"
|
||||||
TYPE_PARAM@7..8
|
TYPE_PARAM
|
||||||
NAME@7..8
|
NAME
|
||||||
IDENT@7..8 "T"
|
IDENT "T"
|
||||||
R_ANGLE@8..9 ">"
|
R_ANGLE ">"
|
||||||
PARAM_LIST@9..11
|
PARAM_LIST
|
||||||
L_PAREN@9..10 "("
|
L_PAREN "("
|
||||||
R_PAREN@10..11 ")"
|
R_PAREN ")"
|
||||||
WHITESPACE@11..12 " "
|
WHITESPACE " "
|
||||||
WHERE_CLAUSE@12..19
|
WHERE_CLAUSE
|
||||||
WHERE_KW@12..17 "where"
|
WHERE_KW "where"
|
||||||
WHITESPACE@17..18 " "
|
WHITESPACE " "
|
||||||
WHERE_PRED@18..19
|
WHERE_PRED
|
||||||
PATH_TYPE@18..19
|
PATH_TYPE
|
||||||
PATH@18..19
|
PATH
|
||||||
PATH_SEGMENT@18..19
|
PATH_SEGMENT
|
||||||
NAME_REF@18..19
|
NAME_REF
|
||||||
IDENT@18..19 "T"
|
IDENT "T"
|
||||||
WHITESPACE@19..20 " "
|
WHITESPACE " "
|
||||||
BLOCK_EXPR@20..22
|
BLOCK_EXPR
|
||||||
STMT_LIST@20..22
|
STMT_LIST
|
||||||
L_CURLY@20..21 "{"
|
L_CURLY "{"
|
||||||
R_CURLY@21..22 "}"
|
R_CURLY "}"
|
||||||
WHITESPACE@22..23 "\n"
|
WHITESPACE "\n"
|
||||||
error 19..19: expected colon
|
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