diff options
Diffstat (limited to 'crates/syntax/test_data/lexer')
142 files changed, 687 insertions, 0 deletions
diff --git a/crates/syntax/test_data/lexer/err/0001_unclosed_char_at_eof.rs b/crates/syntax/test_data/lexer/err/0001_unclosed_char_at_eof.rs new file mode 100644 index 000000000..ad2823b48 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0001_unclosed_char_at_eof.rs | |||
@@ -0,0 +1 @@ | |||
' \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0001_unclosed_char_at_eof.txt b/crates/syntax/test_data/lexer/err/0001_unclosed_char_at_eof.txt new file mode 100644 index 000000000..4d5ad74df --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0001_unclosed_char_at_eof.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | CHAR 1 "\'" | ||
2 | > error0..1 token("\'") msg(Missing trailing `'` symbol to terminate the character literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0002_unclosed_char_with_ferris.rs b/crates/syntax/test_data/lexer/err/0002_unclosed_char_with_ferris.rs new file mode 100644 index 000000000..e264a4152 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0002_unclosed_char_with_ferris.rs | |||
@@ -0,0 +1 @@ | |||
'🦀 \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0002_unclosed_char_with_ferris.txt b/crates/syntax/test_data/lexer/err/0002_unclosed_char_with_ferris.txt new file mode 100644 index 000000000..eafdb3c7c --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0002_unclosed_char_with_ferris.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | CHAR 5 "\'🦀" | ||
2 | > error0..5 token("\'🦀") msg(Missing trailing `'` symbol to terminate the character literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0003_unclosed_char_with_ascii_escape.rs b/crates/syntax/test_data/lexer/err/0003_unclosed_char_with_ascii_escape.rs new file mode 100644 index 000000000..cf74b4dad --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0003_unclosed_char_with_ascii_escape.rs | |||
@@ -0,0 +1 @@ | |||
'\x7f \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0003_unclosed_char_with_ascii_escape.txt b/crates/syntax/test_data/lexer/err/0003_unclosed_char_with_ascii_escape.txt new file mode 100644 index 000000000..cc2b4866a --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0003_unclosed_char_with_ascii_escape.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | CHAR 5 "\'\\x7f" | ||
2 | > error0..5 token("\'\\x7f") msg(Missing trailing `'` symbol to terminate the character literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0004_unclosed_char_with_unicode_escape.rs b/crates/syntax/test_data/lexer/err/0004_unclosed_char_with_unicode_escape.rs new file mode 100644 index 000000000..50be91f68 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0004_unclosed_char_with_unicode_escape.rs | |||
@@ -0,0 +1 @@ | |||
'\u{20AA} \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0004_unclosed_char_with_unicode_escape.txt b/crates/syntax/test_data/lexer/err/0004_unclosed_char_with_unicode_escape.txt new file mode 100644 index 000000000..a6d422cb3 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0004_unclosed_char_with_unicode_escape.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | CHAR 9 "\'\\u{20AA}" | ||
2 | > error0..9 token("\'\\u{20AA}") msg(Missing trailing `'` symbol to terminate the character literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0005_unclosed_char_with_space.rs b/crates/syntax/test_data/lexer/err/0005_unclosed_char_with_space.rs new file mode 100644 index 000000000..309ecfe47 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0005_unclosed_char_with_space.rs | |||
@@ -0,0 +1 @@ | |||
' \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0005_unclosed_char_with_space.txt b/crates/syntax/test_data/lexer/err/0005_unclosed_char_with_space.txt new file mode 100644 index 000000000..47e7baa70 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0005_unclosed_char_with_space.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | CHAR 2 "\' " | ||
2 | > error0..2 token("\' ") msg(Missing trailing `'` symbol to terminate the character literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0006_unclosed_char_with_slash.rs b/crates/syntax/test_data/lexer/err/0006_unclosed_char_with_slash.rs new file mode 100644 index 000000000..6ba258b10 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0006_unclosed_char_with_slash.rs | |||
@@ -0,0 +1 @@ | |||
'\ \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0006_unclosed_char_with_slash.txt b/crates/syntax/test_data/lexer/err/0006_unclosed_char_with_slash.txt new file mode 100644 index 000000000..511029d80 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0006_unclosed_char_with_slash.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | CHAR 2 "\'\\" | ||
2 | > error0..2 token("\'\\") msg(Missing trailing `'` symbol to terminate the character literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0007_unclosed_char_with_slash_n.rs b/crates/syntax/test_data/lexer/err/0007_unclosed_char_with_slash_n.rs new file mode 100644 index 000000000..78bef7e3e --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0007_unclosed_char_with_slash_n.rs | |||
@@ -0,0 +1 @@ | |||
'\n \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0007_unclosed_char_with_slash_n.txt b/crates/syntax/test_data/lexer/err/0007_unclosed_char_with_slash_n.txt new file mode 100644 index 000000000..d2ba5742c --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0007_unclosed_char_with_slash_n.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | CHAR 3 "\'\\n" | ||
2 | > error0..3 token("\'\\n") msg(Missing trailing `'` symbol to terminate the character literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0008_unclosed_char_with_slash_single_quote.rs b/crates/syntax/test_data/lexer/err/0008_unclosed_char_with_slash_single_quote.rs new file mode 100644 index 000000000..a0e722065 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0008_unclosed_char_with_slash_single_quote.rs | |||
@@ -0,0 +1 @@ | |||
'\' \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0008_unclosed_char_with_slash_single_quote.txt b/crates/syntax/test_data/lexer/err/0008_unclosed_char_with_slash_single_quote.txt new file mode 100644 index 000000000..ae9a7f0e2 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0008_unclosed_char_with_slash_single_quote.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | CHAR 3 "\'\\\'" | ||
2 | > error0..3 token("\'\\\'") msg(Missing trailing `'` symbol to terminate the character literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0009_unclosed_byte_at_eof.rs b/crates/syntax/test_data/lexer/err/0009_unclosed_byte_at_eof.rs new file mode 100644 index 000000000..795dc7e25 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0009_unclosed_byte_at_eof.rs | |||
@@ -0,0 +1 @@ | |||
b' \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0009_unclosed_byte_at_eof.txt b/crates/syntax/test_data/lexer/err/0009_unclosed_byte_at_eof.txt new file mode 100644 index 000000000..ff1504592 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0009_unclosed_byte_at_eof.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | BYTE 2 "b\'" | ||
2 | > error0..2 token("b\'") msg(Missing trailing `'` symbol to terminate the byte literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0010_unclosed_byte_with_ferris.rs b/crates/syntax/test_data/lexer/err/0010_unclosed_byte_with_ferris.rs new file mode 100644 index 000000000..c9230dc24 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0010_unclosed_byte_with_ferris.rs | |||
@@ -0,0 +1 @@ | |||
b'🦀 \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0010_unclosed_byte_with_ferris.txt b/crates/syntax/test_data/lexer/err/0010_unclosed_byte_with_ferris.txt new file mode 100644 index 000000000..34f7bd6d4 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0010_unclosed_byte_with_ferris.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | BYTE 6 "b\'🦀" | ||
2 | > error0..6 token("b\'🦀") msg(Missing trailing `'` symbol to terminate the byte literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0011_unclosed_byte_with_ascii_escape.rs b/crates/syntax/test_data/lexer/err/0011_unclosed_byte_with_ascii_escape.rs new file mode 100644 index 000000000..d146a8090 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0011_unclosed_byte_with_ascii_escape.rs | |||
@@ -0,0 +1 @@ | |||
b'\x7f \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0011_unclosed_byte_with_ascii_escape.txt b/crates/syntax/test_data/lexer/err/0011_unclosed_byte_with_ascii_escape.txt new file mode 100644 index 000000000..c964d0f00 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0011_unclosed_byte_with_ascii_escape.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | BYTE 6 "b\'\\x7f" | ||
2 | > error0..6 token("b\'\\x7f") msg(Missing trailing `'` symbol to terminate the byte literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0012_unclosed_byte_with_unicode_escape.rs b/crates/syntax/test_data/lexer/err/0012_unclosed_byte_with_unicode_escape.rs new file mode 100644 index 000000000..a3dec7c25 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0012_unclosed_byte_with_unicode_escape.rs | |||
@@ -0,0 +1 @@ | |||
b'\u{20AA} \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0012_unclosed_byte_with_unicode_escape.txt b/crates/syntax/test_data/lexer/err/0012_unclosed_byte_with_unicode_escape.txt new file mode 100644 index 000000000..cc65fb86f --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0012_unclosed_byte_with_unicode_escape.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | BYTE 10 "b\'\\u{20AA}" | ||
2 | > error0..10 token("b\'\\u{20AA}") msg(Missing trailing `'` symbol to terminate the byte literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0013_unclosed_byte_with_space.rs b/crates/syntax/test_data/lexer/err/0013_unclosed_byte_with_space.rs new file mode 100644 index 000000000..93b7f9c87 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0013_unclosed_byte_with_space.rs | |||
@@ -0,0 +1 @@ | |||
b' \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0013_unclosed_byte_with_space.txt b/crates/syntax/test_data/lexer/err/0013_unclosed_byte_with_space.txt new file mode 100644 index 000000000..800834a14 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0013_unclosed_byte_with_space.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | BYTE 3 "b\' " | ||
2 | > error0..3 token("b\' ") msg(Missing trailing `'` symbol to terminate the byte literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0014_unclosed_byte_with_slash.rs b/crates/syntax/test_data/lexer/err/0014_unclosed_byte_with_slash.rs new file mode 100644 index 000000000..abffa5037 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0014_unclosed_byte_with_slash.rs | |||
@@ -0,0 +1 @@ | |||
b'\ \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0014_unclosed_byte_with_slash.txt b/crates/syntax/test_data/lexer/err/0014_unclosed_byte_with_slash.txt new file mode 100644 index 000000000..7b85ee646 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0014_unclosed_byte_with_slash.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | BYTE 3 "b\'\\" | ||
2 | > error0..3 token("b\'\\") msg(Missing trailing `'` symbol to terminate the byte literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0015_unclosed_byte_with_slash_n.rs b/crates/syntax/test_data/lexer/err/0015_unclosed_byte_with_slash_n.rs new file mode 100644 index 000000000..4f46836a9 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0015_unclosed_byte_with_slash_n.rs | |||
@@ -0,0 +1 @@ | |||
b'\n \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0015_unclosed_byte_with_slash_n.txt b/crates/syntax/test_data/lexer/err/0015_unclosed_byte_with_slash_n.txt new file mode 100644 index 000000000..4b9a63117 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0015_unclosed_byte_with_slash_n.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | BYTE 4 "b\'\\n" | ||
2 | > error0..4 token("b\'\\n") msg(Missing trailing `'` symbol to terminate the byte literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0016_unclosed_byte_with_slash_single_quote.rs b/crates/syntax/test_data/lexer/err/0016_unclosed_byte_with_slash_single_quote.rs new file mode 100644 index 000000000..645b641ee --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0016_unclosed_byte_with_slash_single_quote.rs | |||
@@ -0,0 +1 @@ | |||
b'\' \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0016_unclosed_byte_with_slash_single_quote.txt b/crates/syntax/test_data/lexer/err/0016_unclosed_byte_with_slash_single_quote.txt new file mode 100644 index 000000000..fe337f8d3 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0016_unclosed_byte_with_slash_single_quote.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | BYTE 4 "b\'\\\'" | ||
2 | > error0..4 token("b\'\\\'") msg(Missing trailing `'` symbol to terminate the byte literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0017_unclosed_string_at_eof.rs b/crates/syntax/test_data/lexer/err/0017_unclosed_string_at_eof.rs new file mode 100644 index 000000000..9d68933c4 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0017_unclosed_string_at_eof.rs | |||
@@ -0,0 +1 @@ | |||
" \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0017_unclosed_string_at_eof.txt b/crates/syntax/test_data/lexer/err/0017_unclosed_string_at_eof.txt new file mode 100644 index 000000000..d11a8d880 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0017_unclosed_string_at_eof.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | STRING 1 "\"" | ||
2 | > error0..1 token("\"") msg(Missing trailing `"` symbol to terminate the string literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0018_unclosed_string_with_ferris.rs b/crates/syntax/test_data/lexer/err/0018_unclosed_string_with_ferris.rs new file mode 100644 index 000000000..d439b8d2a --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0018_unclosed_string_with_ferris.rs | |||
@@ -0,0 +1 @@ | |||
"🦀 \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0018_unclosed_string_with_ferris.txt b/crates/syntax/test_data/lexer/err/0018_unclosed_string_with_ferris.txt new file mode 100644 index 000000000..167f942d1 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0018_unclosed_string_with_ferris.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | STRING 5 "\"🦀" | ||
2 | > error0..5 token("\"🦀") msg(Missing trailing `"` symbol to terminate the string literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0019_unclosed_string_with_ascii_escape.rs b/crates/syntax/test_data/lexer/err/0019_unclosed_string_with_ascii_escape.rs new file mode 100644 index 000000000..56186a344 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0019_unclosed_string_with_ascii_escape.rs | |||
@@ -0,0 +1 @@ | |||
"\x7f \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0019_unclosed_string_with_ascii_escape.txt b/crates/syntax/test_data/lexer/err/0019_unclosed_string_with_ascii_escape.txt new file mode 100644 index 000000000..224c653d2 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0019_unclosed_string_with_ascii_escape.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | STRING 5 "\"\\x7f" | ||
2 | > error0..5 token("\"\\x7f") msg(Missing trailing `"` symbol to terminate the string literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0020_unclosed_string_with_unicode_escape.rs b/crates/syntax/test_data/lexer/err/0020_unclosed_string_with_unicode_escape.rs new file mode 100644 index 000000000..ed24095c3 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0020_unclosed_string_with_unicode_escape.rs | |||
@@ -0,0 +1 @@ | |||
"\u{20AA} \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0020_unclosed_string_with_unicode_escape.txt b/crates/syntax/test_data/lexer/err/0020_unclosed_string_with_unicode_escape.txt new file mode 100644 index 000000000..48975bbcb --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0020_unclosed_string_with_unicode_escape.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | STRING 9 "\"\\u{20AA}" | ||
2 | > error0..9 token("\"\\u{20AA}") msg(Missing trailing `"` symbol to terminate the string literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0021_unclosed_string_with_space.rs b/crates/syntax/test_data/lexer/err/0021_unclosed_string_with_space.rs new file mode 100644 index 000000000..72cdc841f --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0021_unclosed_string_with_space.rs | |||
@@ -0,0 +1 @@ | |||
" \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0021_unclosed_string_with_space.txt b/crates/syntax/test_data/lexer/err/0021_unclosed_string_with_space.txt new file mode 100644 index 000000000..a823cca7a --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0021_unclosed_string_with_space.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | STRING 2 "\" " | ||
2 | > error0..2 token("\" ") msg(Missing trailing `"` symbol to terminate the string literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0022_unclosed_string_with_slash.rs b/crates/syntax/test_data/lexer/err/0022_unclosed_string_with_slash.rs new file mode 100644 index 000000000..00a258400 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0022_unclosed_string_with_slash.rs | |||
@@ -0,0 +1 @@ | |||
"\ \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0022_unclosed_string_with_slash.txt b/crates/syntax/test_data/lexer/err/0022_unclosed_string_with_slash.txt new file mode 100644 index 000000000..0914f001f --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0022_unclosed_string_with_slash.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | STRING 2 "\"\\" | ||
2 | > error0..2 token("\"\\") msg(Missing trailing `"` symbol to terminate the string literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0023_unclosed_string_with_slash_n.rs b/crates/syntax/test_data/lexer/err/0023_unclosed_string_with_slash_n.rs new file mode 100644 index 000000000..a0c29b8cf --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0023_unclosed_string_with_slash_n.rs | |||
@@ -0,0 +1 @@ | |||
"\n \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0023_unclosed_string_with_slash_n.txt b/crates/syntax/test_data/lexer/err/0023_unclosed_string_with_slash_n.txt new file mode 100644 index 000000000..5674b55fd --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0023_unclosed_string_with_slash_n.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | STRING 3 "\"\\n" | ||
2 | > error0..3 token("\"\\n") msg(Missing trailing `"` symbol to terminate the string literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0024_unclosed_string_with_slash_double_quote.rs b/crates/syntax/test_data/lexer/err/0024_unclosed_string_with_slash_double_quote.rs new file mode 100644 index 000000000..403c2d6dd --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0024_unclosed_string_with_slash_double_quote.rs | |||
@@ -0,0 +1 @@ | |||
"\" \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0024_unclosed_string_with_slash_double_quote.txt b/crates/syntax/test_data/lexer/err/0024_unclosed_string_with_slash_double_quote.txt new file mode 100644 index 000000000..4c9a774e4 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0024_unclosed_string_with_slash_double_quote.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | STRING 3 "\"\\\"" | ||
2 | > error0..3 token("\"\\\"") msg(Missing trailing `"` symbol to terminate the string literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0025_unclosed_byte_string_at_eof.rs b/crates/syntax/test_data/lexer/err/0025_unclosed_byte_string_at_eof.rs new file mode 100644 index 000000000..36f4f4321 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0025_unclosed_byte_string_at_eof.rs | |||
@@ -0,0 +1 @@ | |||
b" \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0025_unclosed_byte_string_at_eof.txt b/crates/syntax/test_data/lexer/err/0025_unclosed_byte_string_at_eof.txt new file mode 100644 index 000000000..04e6b0aa4 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0025_unclosed_byte_string_at_eof.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | BYTE_STRING 2 "b\"" | ||
2 | > error0..2 token("b\"") msg(Missing trailing `"` symbol to terminate the byte string literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0026_unclosed_byte_string_with_ferris.rs b/crates/syntax/test_data/lexer/err/0026_unclosed_byte_string_with_ferris.rs new file mode 100644 index 000000000..3c23a0372 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0026_unclosed_byte_string_with_ferris.rs | |||
@@ -0,0 +1 @@ | |||
b"🦀 \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0026_unclosed_byte_string_with_ferris.txt b/crates/syntax/test_data/lexer/err/0026_unclosed_byte_string_with_ferris.txt new file mode 100644 index 000000000..0576a0609 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0026_unclosed_byte_string_with_ferris.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | BYTE_STRING 6 "b\"🦀" | ||
2 | > error0..6 token("b\"🦀") msg(Missing trailing `"` symbol to terminate the byte string literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0027_unclosed_byte_string_with_ascii_escape.rs b/crates/syntax/test_data/lexer/err/0027_unclosed_byte_string_with_ascii_escape.rs new file mode 100644 index 000000000..836c112c1 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0027_unclosed_byte_string_with_ascii_escape.rs | |||
@@ -0,0 +1 @@ | |||
b"\x7f \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0027_unclosed_byte_string_with_ascii_escape.txt b/crates/syntax/test_data/lexer/err/0027_unclosed_byte_string_with_ascii_escape.txt new file mode 100644 index 000000000..541a013d8 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0027_unclosed_byte_string_with_ascii_escape.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | BYTE_STRING 6 "b\"\\x7f" | ||
2 | > error0..6 token("b\"\\x7f") msg(Missing trailing `"` symbol to terminate the byte string literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0028_unclosed_byte_string_with_unicode_escape.rs b/crates/syntax/test_data/lexer/err/0028_unclosed_byte_string_with_unicode_escape.rs new file mode 100644 index 000000000..1c6df1d00 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0028_unclosed_byte_string_with_unicode_escape.rs | |||
@@ -0,0 +1 @@ | |||
b"\u{20AA} \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0028_unclosed_byte_string_with_unicode_escape.txt b/crates/syntax/test_data/lexer/err/0028_unclosed_byte_string_with_unicode_escape.txt new file mode 100644 index 000000000..71b0fb211 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0028_unclosed_byte_string_with_unicode_escape.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | BYTE_STRING 10 "b\"\\u{20AA}" | ||
2 | > error0..10 token("b\"\\u{20AA}") msg(Missing trailing `"` symbol to terminate the byte string literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0029_unclosed_byte_string_with_space.rs b/crates/syntax/test_data/lexer/err/0029_unclosed_byte_string_with_space.rs new file mode 100644 index 000000000..d6898541e --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0029_unclosed_byte_string_with_space.rs | |||
@@ -0,0 +1 @@ | |||
b" \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0029_unclosed_byte_string_with_space.txt b/crates/syntax/test_data/lexer/err/0029_unclosed_byte_string_with_space.txt new file mode 100644 index 000000000..bd5058bc1 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0029_unclosed_byte_string_with_space.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | BYTE_STRING 3 "b\" " | ||
2 | > error0..3 token("b\" ") msg(Missing trailing `"` symbol to terminate the byte string literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0030_unclosed_byte_string_with_slash.rs b/crates/syntax/test_data/lexer/err/0030_unclosed_byte_string_with_slash.rs new file mode 100644 index 000000000..cce661538 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0030_unclosed_byte_string_with_slash.rs | |||
@@ -0,0 +1 @@ | |||
b"\ \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0030_unclosed_byte_string_with_slash.txt b/crates/syntax/test_data/lexer/err/0030_unclosed_byte_string_with_slash.txt new file mode 100644 index 000000000..7f94f10ba --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0030_unclosed_byte_string_with_slash.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | BYTE_STRING 3 "b\"\\" | ||
2 | > error0..3 token("b\"\\") msg(Missing trailing `"` symbol to terminate the byte string literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0031_unclosed_byte_string_with_slash_n.rs b/crates/syntax/test_data/lexer/err/0031_unclosed_byte_string_with_slash_n.rs new file mode 100644 index 000000000..5e680aabb --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0031_unclosed_byte_string_with_slash_n.rs | |||
@@ -0,0 +1 @@ | |||
b"\n \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0031_unclosed_byte_string_with_slash_n.txt b/crates/syntax/test_data/lexer/err/0031_unclosed_byte_string_with_slash_n.txt new file mode 100644 index 000000000..9c3c089d7 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0031_unclosed_byte_string_with_slash_n.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | BYTE_STRING 4 "b\"\\n" | ||
2 | > error0..4 token("b\"\\n") msg(Missing trailing `"` symbol to terminate the byte string literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0032_unclosed_byte_string_with_slash_double_quote.rs b/crates/syntax/test_data/lexer/err/0032_unclosed_byte_string_with_slash_double_quote.rs new file mode 100644 index 000000000..f2ff58ba9 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0032_unclosed_byte_string_with_slash_double_quote.rs | |||
@@ -0,0 +1 @@ | |||
b"\" \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0032_unclosed_byte_string_with_slash_double_quote.txt b/crates/syntax/test_data/lexer/err/0032_unclosed_byte_string_with_slash_double_quote.txt new file mode 100644 index 000000000..884b12c8e --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0032_unclosed_byte_string_with_slash_double_quote.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | BYTE_STRING 4 "b\"\\\"" | ||
2 | > error0..4 token("b\"\\\"") msg(Missing trailing `"` symbol to terminate the byte string literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0033_unclosed_raw_string_at_eof.rs b/crates/syntax/test_data/lexer/err/0033_unclosed_raw_string_at_eof.rs new file mode 100644 index 000000000..557c59b62 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0033_unclosed_raw_string_at_eof.rs | |||
@@ -0,0 +1 @@ | |||
r##" \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0033_unclosed_raw_string_at_eof.txt b/crates/syntax/test_data/lexer/err/0033_unclosed_raw_string_at_eof.txt new file mode 100644 index 000000000..6fd59ccc0 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0033_unclosed_raw_string_at_eof.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | RAW_STRING 4 "r##\"" | ||
2 | > error0..4 token("r##\"") msg(Missing trailing `"` with `#` symbols to terminate the raw string literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0034_unclosed_raw_string_with_ferris.rs b/crates/syntax/test_data/lexer/err/0034_unclosed_raw_string_with_ferris.rs new file mode 100644 index 000000000..bd046e4bb --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0034_unclosed_raw_string_with_ferris.rs | |||
@@ -0,0 +1 @@ | |||
r##"🦀 \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0034_unclosed_raw_string_with_ferris.txt b/crates/syntax/test_data/lexer/err/0034_unclosed_raw_string_with_ferris.txt new file mode 100644 index 000000000..8d9ca0e8f --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0034_unclosed_raw_string_with_ferris.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | RAW_STRING 8 "r##\"🦀" | ||
2 | > error0..8 token("r##\"🦀") msg(Missing trailing `"` with `#` symbols to terminate the raw string literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0035_unclosed_raw_string_with_ascii_escape.rs b/crates/syntax/test_data/lexer/err/0035_unclosed_raw_string_with_ascii_escape.rs new file mode 100644 index 000000000..5bec883dc --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0035_unclosed_raw_string_with_ascii_escape.rs | |||
@@ -0,0 +1 @@ | |||
r##"\x7f \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0035_unclosed_raw_string_with_ascii_escape.txt b/crates/syntax/test_data/lexer/err/0035_unclosed_raw_string_with_ascii_escape.txt new file mode 100644 index 000000000..a906380c7 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0035_unclosed_raw_string_with_ascii_escape.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | RAW_STRING 8 "r##\"\\x7f" | ||
2 | > error0..8 token("r##\"\\x7f") msg(Missing trailing `"` with `#` symbols to terminate the raw string literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0036_unclosed_raw_string_with_unicode_escape.rs b/crates/syntax/test_data/lexer/err/0036_unclosed_raw_string_with_unicode_escape.rs new file mode 100644 index 000000000..bf05c3913 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0036_unclosed_raw_string_with_unicode_escape.rs | |||
@@ -0,0 +1 @@ | |||
r##"\u{20AA} \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0036_unclosed_raw_string_with_unicode_escape.txt b/crates/syntax/test_data/lexer/err/0036_unclosed_raw_string_with_unicode_escape.txt new file mode 100644 index 000000000..5667c6149 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0036_unclosed_raw_string_with_unicode_escape.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | RAW_STRING 12 "r##\"\\u{20AA}" | ||
2 | > error0..12 token("r##\"\\u{20AA}") msg(Missing trailing `"` with `#` symbols to terminate the raw string literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0037_unclosed_raw_string_with_space.rs b/crates/syntax/test_data/lexer/err/0037_unclosed_raw_string_with_space.rs new file mode 100644 index 000000000..f104bae4f --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0037_unclosed_raw_string_with_space.rs | |||
@@ -0,0 +1 @@ | |||
r##" \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0037_unclosed_raw_string_with_space.txt b/crates/syntax/test_data/lexer/err/0037_unclosed_raw_string_with_space.txt new file mode 100644 index 000000000..141c8268e --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0037_unclosed_raw_string_with_space.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | RAW_STRING 5 "r##\" " | ||
2 | > error0..5 token("r##\" ") msg(Missing trailing `"` with `#` symbols to terminate the raw string literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0038_unclosed_raw_string_with_slash.rs b/crates/syntax/test_data/lexer/err/0038_unclosed_raw_string_with_slash.rs new file mode 100644 index 000000000..9242077b8 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0038_unclosed_raw_string_with_slash.rs | |||
@@ -0,0 +1 @@ | |||
r##"\ \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0038_unclosed_raw_string_with_slash.txt b/crates/syntax/test_data/lexer/err/0038_unclosed_raw_string_with_slash.txt new file mode 100644 index 000000000..f61d4cc91 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0038_unclosed_raw_string_with_slash.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | RAW_STRING 5 "r##\"\\" | ||
2 | > error0..5 token("r##\"\\") msg(Missing trailing `"` with `#` symbols to terminate the raw string literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0039_unclosed_raw_string_with_slash_n.rs b/crates/syntax/test_data/lexer/err/0039_unclosed_raw_string_with_slash_n.rs new file mode 100644 index 000000000..db1c16f2b --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0039_unclosed_raw_string_with_slash_n.rs | |||
@@ -0,0 +1 @@ | |||
r##"\n \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0039_unclosed_raw_string_with_slash_n.txt b/crates/syntax/test_data/lexer/err/0039_unclosed_raw_string_with_slash_n.txt new file mode 100644 index 000000000..12e2c0fc0 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0039_unclosed_raw_string_with_slash_n.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | RAW_STRING 6 "r##\"\\n" | ||
2 | > error0..6 token("r##\"\\n") msg(Missing trailing `"` with `#` symbols to terminate the raw string literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0040_unclosed_raw_byte_string_at_eof.rs b/crates/syntax/test_data/lexer/err/0040_unclosed_raw_byte_string_at_eof.rs new file mode 100644 index 000000000..ae5bae622 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0040_unclosed_raw_byte_string_at_eof.rs | |||
@@ -0,0 +1 @@ | |||
br##" \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0040_unclosed_raw_byte_string_at_eof.txt b/crates/syntax/test_data/lexer/err/0040_unclosed_raw_byte_string_at_eof.txt new file mode 100644 index 000000000..fe12cb5fc --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0040_unclosed_raw_byte_string_at_eof.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | RAW_BYTE_STRING 5 "br##\"" | ||
2 | > error0..5 token("br##\"") msg(Missing trailing `"` with `#` symbols to terminate the raw byte string literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0041_unclosed_raw_byte_string_with_ferris.rs b/crates/syntax/test_data/lexer/err/0041_unclosed_raw_byte_string_with_ferris.rs new file mode 100644 index 000000000..9ef01207a --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0041_unclosed_raw_byte_string_with_ferris.rs | |||
@@ -0,0 +1 @@ | |||
br##"🦀 \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0041_unclosed_raw_byte_string_with_ferris.txt b/crates/syntax/test_data/lexer/err/0041_unclosed_raw_byte_string_with_ferris.txt new file mode 100644 index 000000000..5be2a7861 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0041_unclosed_raw_byte_string_with_ferris.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | RAW_BYTE_STRING 9 "br##\"🦀" | ||
2 | > error0..9 token("br##\"🦀") msg(Missing trailing `"` with `#` symbols to terminate the raw byte string literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0042_unclosed_raw_byte_string_with_ascii_escape.rs b/crates/syntax/test_data/lexer/err/0042_unclosed_raw_byte_string_with_ascii_escape.rs new file mode 100644 index 000000000..d50270afe --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0042_unclosed_raw_byte_string_with_ascii_escape.rs | |||
@@ -0,0 +1 @@ | |||
br##"\x7f \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0042_unclosed_raw_byte_string_with_ascii_escape.txt b/crates/syntax/test_data/lexer/err/0042_unclosed_raw_byte_string_with_ascii_escape.txt new file mode 100644 index 000000000..6cbe08d07 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0042_unclosed_raw_byte_string_with_ascii_escape.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | RAW_BYTE_STRING 9 "br##\"\\x7f" | ||
2 | > error0..9 token("br##\"\\x7f") msg(Missing trailing `"` with `#` symbols to terminate the raw byte string literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0043_unclosed_raw_byte_string_with_unicode_escape.rs b/crates/syntax/test_data/lexer/err/0043_unclosed_raw_byte_string_with_unicode_escape.rs new file mode 100644 index 000000000..90e299a1a --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0043_unclosed_raw_byte_string_with_unicode_escape.rs | |||
@@ -0,0 +1 @@ | |||
br##"\u{20AA} \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0043_unclosed_raw_byte_string_with_unicode_escape.txt b/crates/syntax/test_data/lexer/err/0043_unclosed_raw_byte_string_with_unicode_escape.txt new file mode 100644 index 000000000..f56a4f984 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0043_unclosed_raw_byte_string_with_unicode_escape.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | RAW_BYTE_STRING 13 "br##\"\\u{20AA}" | ||
2 | > error0..13 token("br##\"\\u{20AA}") msg(Missing trailing `"` with `#` symbols to terminate the raw byte string literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0044_unclosed_raw_byte_string_with_space.rs b/crates/syntax/test_data/lexer/err/0044_unclosed_raw_byte_string_with_space.rs new file mode 100644 index 000000000..14c602fd2 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0044_unclosed_raw_byte_string_with_space.rs | |||
@@ -0,0 +1 @@ | |||
br##" \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0044_unclosed_raw_byte_string_with_space.txt b/crates/syntax/test_data/lexer/err/0044_unclosed_raw_byte_string_with_space.txt new file mode 100644 index 000000000..3d32ce34e --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0044_unclosed_raw_byte_string_with_space.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | RAW_BYTE_STRING 6 "br##\" " | ||
2 | > error0..6 token("br##\" ") msg(Missing trailing `"` with `#` symbols to terminate the raw byte string literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0045_unclosed_raw_byte_string_with_slash.rs b/crates/syntax/test_data/lexer/err/0045_unclosed_raw_byte_string_with_slash.rs new file mode 100644 index 000000000..0b3c015d7 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0045_unclosed_raw_byte_string_with_slash.rs | |||
@@ -0,0 +1 @@ | |||
br##"\ \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0045_unclosed_raw_byte_string_with_slash.txt b/crates/syntax/test_data/lexer/err/0045_unclosed_raw_byte_string_with_slash.txt new file mode 100644 index 000000000..320fea177 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0045_unclosed_raw_byte_string_with_slash.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | RAW_BYTE_STRING 6 "br##\"\\" | ||
2 | > error0..6 token("br##\"\\") msg(Missing trailing `"` with `#` symbols to terminate the raw byte string literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0046_unclosed_raw_byte_string_with_slash_n.rs b/crates/syntax/test_data/lexer/err/0046_unclosed_raw_byte_string_with_slash_n.rs new file mode 100644 index 000000000..0d8b0e7ab --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0046_unclosed_raw_byte_string_with_slash_n.rs | |||
@@ -0,0 +1 @@ | |||
br##"\n \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0046_unclosed_raw_byte_string_with_slash_n.txt b/crates/syntax/test_data/lexer/err/0046_unclosed_raw_byte_string_with_slash_n.txt new file mode 100644 index 000000000..b3a56380c --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0046_unclosed_raw_byte_string_with_slash_n.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | RAW_BYTE_STRING 7 "br##\"\\n" | ||
2 | > error0..7 token("br##\"\\n") msg(Missing trailing `"` with `#` symbols to terminate the raw byte string literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0047_unstarted_raw_string_at_eof.rs b/crates/syntax/test_data/lexer/err/0047_unstarted_raw_string_at_eof.rs new file mode 100644 index 000000000..eddf8d080 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0047_unstarted_raw_string_at_eof.rs | |||
@@ -0,0 +1 @@ | |||
r## \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0047_unstarted_raw_string_at_eof.txt b/crates/syntax/test_data/lexer/err/0047_unstarted_raw_string_at_eof.txt new file mode 100644 index 000000000..5af1e2d97 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0047_unstarted_raw_string_at_eof.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | RAW_STRING 3 "r##" | ||
2 | > error0..3 token("r##") msg(Missing `"` symbol after `#` symbols to begin the raw string literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0048_unstarted_raw_byte_string_at_eof.rs b/crates/syntax/test_data/lexer/err/0048_unstarted_raw_byte_string_at_eof.rs new file mode 100644 index 000000000..7e8cadf4f --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0048_unstarted_raw_byte_string_at_eof.rs | |||
@@ -0,0 +1 @@ | |||
br## \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0048_unstarted_raw_byte_string_at_eof.txt b/crates/syntax/test_data/lexer/err/0048_unstarted_raw_byte_string_at_eof.txt new file mode 100644 index 000000000..aec7afd92 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0048_unstarted_raw_byte_string_at_eof.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | RAW_BYTE_STRING 4 "br##" | ||
2 | > error0..4 token("br##") msg(Missing `"` symbol after `#` symbols to begin the raw byte string literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0049_unstarted_raw_string_with_ascii.rs b/crates/syntax/test_data/lexer/err/0049_unstarted_raw_string_with_ascii.rs new file mode 100644 index 000000000..534668a9b --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0049_unstarted_raw_string_with_ascii.rs | |||
@@ -0,0 +1 @@ | |||
r## I lack a quote! \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0049_unstarted_raw_string_with_ascii.txt b/crates/syntax/test_data/lexer/err/0049_unstarted_raw_string_with_ascii.txt new file mode 100644 index 000000000..e22fe5374 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0049_unstarted_raw_string_with_ascii.txt | |||
@@ -0,0 +1,10 @@ | |||
1 | RAW_STRING 4 "r## " | ||
2 | IDENT 1 "I" | ||
3 | WHITESPACE 1 " " | ||
4 | IDENT 4 "lack" | ||
5 | WHITESPACE 1 " " | ||
6 | IDENT 1 "a" | ||
7 | WHITESPACE 1 " " | ||
8 | IDENT 5 "quote" | ||
9 | BANG 1 "!" | ||
10 | > error0..4 token("r## ") msg(Missing `"` symbol after `#` symbols to begin the raw string literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0050_unstarted_raw_byte_string_with_ascii.rs b/crates/syntax/test_data/lexer/err/0050_unstarted_raw_byte_string_with_ascii.rs new file mode 100644 index 000000000..d9b55455a --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0050_unstarted_raw_byte_string_with_ascii.rs | |||
@@ -0,0 +1 @@ | |||
br## I lack a quote! \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0050_unstarted_raw_byte_string_with_ascii.txt b/crates/syntax/test_data/lexer/err/0050_unstarted_raw_byte_string_with_ascii.txt new file mode 100644 index 000000000..d74ea4c27 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0050_unstarted_raw_byte_string_with_ascii.txt | |||
@@ -0,0 +1,10 @@ | |||
1 | RAW_BYTE_STRING 5 "br## " | ||
2 | IDENT 1 "I" | ||
3 | WHITESPACE 1 " " | ||
4 | IDENT 4 "lack" | ||
5 | WHITESPACE 1 " " | ||
6 | IDENT 1 "a" | ||
7 | WHITESPACE 1 " " | ||
8 | IDENT 5 "quote" | ||
9 | BANG 1 "!" | ||
10 | > error0..5 token("br## ") msg(Missing `"` symbol after `#` symbols to begin the raw byte string literal) | ||
diff --git a/crates/syntax/test_data/lexer/err/0051_unclosed_block_comment_at_eof.rs b/crates/syntax/test_data/lexer/err/0051_unclosed_block_comment_at_eof.rs new file mode 100644 index 000000000..22e83649f --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0051_unclosed_block_comment_at_eof.rs | |||
@@ -0,0 +1 @@ | |||
/* \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/err/0051_unclosed_block_comment_at_eof.txt b/crates/syntax/test_data/lexer/err/0051_unclosed_block_comment_at_eof.txt new file mode 100644 index 000000000..2a256e9df --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0051_unclosed_block_comment_at_eof.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | COMMENT 2 "/*" | ||
2 | > error0..2 token("/*") msg(Missing trailing `*/` symbols to terminate the block comment) | ||
diff --git a/crates/syntax/test_data/lexer/err/0052_unclosed_block_comment_with_content.rs b/crates/syntax/test_data/lexer/err/0052_unclosed_block_comment_with_content.rs new file mode 100644 index 000000000..c45c2844d --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0052_unclosed_block_comment_with_content.rs | |||
@@ -0,0 +1 @@ | |||
/* comment | |||
diff --git a/crates/syntax/test_data/lexer/err/0052_unclosed_block_comment_with_content.txt b/crates/syntax/test_data/lexer/err/0052_unclosed_block_comment_with_content.txt new file mode 100644 index 000000000..8e8490302 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0052_unclosed_block_comment_with_content.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | COMMENT 11 "/* comment\n" | ||
2 | > error0..11 token("/* comment\n") msg(Missing trailing `*/` symbols to terminate the block comment) | ||
diff --git a/crates/syntax/test_data/lexer/err/0053_unclosed_nested_block_comment_entirely.rs b/crates/syntax/test_data/lexer/err/0053_unclosed_nested_block_comment_entirely.rs new file mode 100644 index 000000000..3fcfc9660 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0053_unclosed_nested_block_comment_entirely.rs | |||
@@ -0,0 +1 @@ | |||
/* /* /* | |||
diff --git a/crates/syntax/test_data/lexer/err/0053_unclosed_nested_block_comment_entirely.txt b/crates/syntax/test_data/lexer/err/0053_unclosed_nested_block_comment_entirely.txt new file mode 100644 index 000000000..b7d28fc05 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0053_unclosed_nested_block_comment_entirely.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | COMMENT 9 "/* /* /*\n" | ||
2 | > error0..9 token("/* /* /*\n") msg(Missing trailing `*/` symbols to terminate the block comment) | ||
diff --git a/crates/syntax/test_data/lexer/err/0054_unclosed_nested_block_comment_partially.rs b/crates/syntax/test_data/lexer/err/0054_unclosed_nested_block_comment_partially.rs new file mode 100644 index 000000000..26c898f01 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0054_unclosed_nested_block_comment_partially.rs | |||
@@ -0,0 +1 @@ | |||
/** /*! /* comment */ */ | |||
diff --git a/crates/syntax/test_data/lexer/err/0054_unclosed_nested_block_comment_partially.txt b/crates/syntax/test_data/lexer/err/0054_unclosed_nested_block_comment_partially.txt new file mode 100644 index 000000000..4742d2c12 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0054_unclosed_nested_block_comment_partially.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | COMMENT 25 "/** /*! /* comment */ */\n" | ||
2 | > error0..25 token("/** /*! /* comment */ */\n") msg(Missing trailing `*/` symbols to terminate the block comment) | ||
diff --git a/crates/syntax/test_data/lexer/err/0055_empty_int.rs b/crates/syntax/test_data/lexer/err/0055_empty_int.rs new file mode 100644 index 000000000..aa2a9fdca --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0055_empty_int.rs | |||
@@ -0,0 +1,17 @@ | |||
1 | 0b | ||
2 | 0o | ||
3 | 0x | ||
4 | |||
5 | 0b_ | ||
6 | 0o_ | ||
7 | 0x_ | ||
8 | |||
9 | 0bnoDigit | ||
10 | 0onoDigit | ||
11 | 0xnoDigit | ||
12 | |||
13 | 0xG | ||
14 | 0xg | ||
15 | |||
16 | 0x_g | ||
17 | 0x_G | ||
diff --git a/crates/syntax/test_data/lexer/err/0055_empty_int.txt b/crates/syntax/test_data/lexer/err/0055_empty_int.txt new file mode 100644 index 000000000..bcd094b6e --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0055_empty_int.txt | |||
@@ -0,0 +1,39 @@ | |||
1 | INT_NUMBER 2 "0b" | ||
2 | WHITESPACE 1 "\n" | ||
3 | INT_NUMBER 2 "0o" | ||
4 | WHITESPACE 1 "\n" | ||
5 | INT_NUMBER 2 "0x" | ||
6 | WHITESPACE 2 "\n\n" | ||
7 | INT_NUMBER 3 "0b_" | ||
8 | WHITESPACE 1 "\n" | ||
9 | INT_NUMBER 3 "0o_" | ||
10 | WHITESPACE 1 "\n" | ||
11 | INT_NUMBER 3 "0x_" | ||
12 | WHITESPACE 2 "\n\n" | ||
13 | INT_NUMBER 9 "0bnoDigit" | ||
14 | WHITESPACE 1 "\n" | ||
15 | INT_NUMBER 9 "0onoDigit" | ||
16 | WHITESPACE 1 "\n" | ||
17 | INT_NUMBER 9 "0xnoDigit" | ||
18 | WHITESPACE 2 "\n\n" | ||
19 | INT_NUMBER 3 "0xG" | ||
20 | WHITESPACE 1 "\n" | ||
21 | INT_NUMBER 3 "0xg" | ||
22 | WHITESPACE 2 "\n\n" | ||
23 | INT_NUMBER 4 "0x_g" | ||
24 | WHITESPACE 1 "\n" | ||
25 | INT_NUMBER 4 "0x_G" | ||
26 | WHITESPACE 1 "\n" | ||
27 | > error0..2 token("0b") msg(Missing digits after the integer base prefix) | ||
28 | > error3..5 token("0o") msg(Missing digits after the integer base prefix) | ||
29 | > error6..8 token("0x") msg(Missing digits after the integer base prefix) | ||
30 | > error10..13 token("0b_") msg(Missing digits after the integer base prefix) | ||
31 | > error14..17 token("0o_") msg(Missing digits after the integer base prefix) | ||
32 | > error18..21 token("0x_") msg(Missing digits after the integer base prefix) | ||
33 | > error23..32 token("0bnoDigit") msg(Missing digits after the integer base prefix) | ||
34 | > error33..42 token("0onoDigit") msg(Missing digits after the integer base prefix) | ||
35 | > error43..52 token("0xnoDigit") msg(Missing digits after the integer base prefix) | ||
36 | > error54..57 token("0xG") msg(Missing digits after the integer base prefix) | ||
37 | > error58..61 token("0xg") msg(Missing digits after the integer base prefix) | ||
38 | > error63..67 token("0x_g") msg(Missing digits after the integer base prefix) | ||
39 | > error68..72 token("0x_G") msg(Missing digits after the integer base prefix) | ||
diff --git a/crates/syntax/test_data/lexer/err/0056_empty_exponent.rs b/crates/syntax/test_data/lexer/err/0056_empty_exponent.rs new file mode 100644 index 000000000..286584c88 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0056_empty_exponent.rs | |||
@@ -0,0 +1,22 @@ | |||
1 | 0e | ||
2 | 0E | ||
3 | |||
4 | 42e+ | ||
5 | 42e- | ||
6 | 42E+ | ||
7 | 42E- | ||
8 | |||
9 | 42.e+ | ||
10 | 42.e- | ||
11 | 42.E+ | ||
12 | 42.E- | ||
13 | |||
14 | 42.2e+ | ||
15 | 42.2e- | ||
16 | 42.2E+ | ||
17 | 42.2E- | ||
18 | |||
19 | 42.2e+f32 | ||
20 | 42.2e-f32 | ||
21 | 42.2E+f32 | ||
22 | 42.2E-f32 | ||
diff --git a/crates/syntax/test_data/lexer/err/0056_empty_exponent.txt b/crates/syntax/test_data/lexer/err/0056_empty_exponent.txt new file mode 100644 index 000000000..6a645a6a4 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0056_empty_exponent.txt | |||
@@ -0,0 +1,62 @@ | |||
1 | FLOAT_NUMBER 2 "0e" | ||
2 | WHITESPACE 1 "\n" | ||
3 | FLOAT_NUMBER 2 "0E" | ||
4 | WHITESPACE 2 "\n\n" | ||
5 | FLOAT_NUMBER 4 "42e+" | ||
6 | WHITESPACE 1 "\n" | ||
7 | FLOAT_NUMBER 4 "42e-" | ||
8 | WHITESPACE 1 "\n" | ||
9 | FLOAT_NUMBER 4 "42E+" | ||
10 | WHITESPACE 1 "\n" | ||
11 | FLOAT_NUMBER 4 "42E-" | ||
12 | WHITESPACE 2 "\n\n" | ||
13 | INT_NUMBER 2 "42" | ||
14 | DOT 1 "." | ||
15 | IDENT 1 "e" | ||
16 | PLUS 1 "+" | ||
17 | WHITESPACE 1 "\n" | ||
18 | INT_NUMBER 2 "42" | ||
19 | DOT 1 "." | ||
20 | IDENT 1 "e" | ||
21 | MINUS 1 "-" | ||
22 | WHITESPACE 1 "\n" | ||
23 | INT_NUMBER 2 "42" | ||
24 | DOT 1 "." | ||
25 | IDENT 1 "E" | ||
26 | PLUS 1 "+" | ||
27 | WHITESPACE 1 "\n" | ||
28 | INT_NUMBER 2 "42" | ||
29 | DOT 1 "." | ||
30 | IDENT 1 "E" | ||
31 | MINUS 1 "-" | ||
32 | WHITESPACE 2 "\n\n" | ||
33 | FLOAT_NUMBER 6 "42.2e+" | ||
34 | WHITESPACE 1 "\n" | ||
35 | FLOAT_NUMBER 6 "42.2e-" | ||
36 | WHITESPACE 1 "\n" | ||
37 | FLOAT_NUMBER 6 "42.2E+" | ||
38 | WHITESPACE 1 "\n" | ||
39 | FLOAT_NUMBER 6 "42.2E-" | ||
40 | WHITESPACE 2 "\n\n" | ||
41 | FLOAT_NUMBER 9 "42.2e+f32" | ||
42 | WHITESPACE 1 "\n" | ||
43 | FLOAT_NUMBER 9 "42.2e-f32" | ||
44 | WHITESPACE 1 "\n" | ||
45 | FLOAT_NUMBER 9 "42.2E+f32" | ||
46 | WHITESPACE 1 "\n" | ||
47 | FLOAT_NUMBER 9 "42.2E-f32" | ||
48 | WHITESPACE 1 "\n" | ||
49 | > error0..2 token("0e") msg(Missing digits after the exponent symbol) | ||
50 | > error3..5 token("0E") msg(Missing digits after the exponent symbol) | ||
51 | > error7..11 token("42e+") msg(Missing digits after the exponent symbol) | ||
52 | > error12..16 token("42e-") msg(Missing digits after the exponent symbol) | ||
53 | > error17..21 token("42E+") msg(Missing digits after the exponent symbol) | ||
54 | > error22..26 token("42E-") msg(Missing digits after the exponent symbol) | ||
55 | > error53..59 token("42.2e+") msg(Missing digits after the exponent symbol) | ||
56 | > error60..66 token("42.2e-") msg(Missing digits after the exponent symbol) | ||
57 | > error67..73 token("42.2E+") msg(Missing digits after the exponent symbol) | ||
58 | > error74..80 token("42.2E-") msg(Missing digits after the exponent symbol) | ||
59 | > error82..91 token("42.2e+f32") msg(Missing digits after the exponent symbol) | ||
60 | > error92..101 token("42.2e-f32") msg(Missing digits after the exponent symbol) | ||
61 | > error102..111 token("42.2E+f32") msg(Missing digits after the exponent symbol) | ||
62 | > error112..121 token("42.2E-f32") msg(Missing digits after the exponent symbol) | ||
diff --git a/crates/syntax/test_data/lexer/err/0057_lifetime_strarts_with_a_number.rs b/crates/syntax/test_data/lexer/err/0057_lifetime_strarts_with_a_number.rs new file mode 100644 index 000000000..a7698a404 --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0057_lifetime_strarts_with_a_number.rs | |||
@@ -0,0 +1,2 @@ | |||
1 | '1 | ||
2 | '1lifetime | ||
diff --git a/crates/syntax/test_data/lexer/err/0057_lifetime_strarts_with_a_number.txt b/crates/syntax/test_data/lexer/err/0057_lifetime_strarts_with_a_number.txt new file mode 100644 index 000000000..e138bcebc --- /dev/null +++ b/crates/syntax/test_data/lexer/err/0057_lifetime_strarts_with_a_number.txt | |||
@@ -0,0 +1,6 @@ | |||
1 | LIFETIME 2 "\'1" | ||
2 | WHITESPACE 1 "\n" | ||
3 | LIFETIME 10 "\'1lifetime" | ||
4 | WHITESPACE 1 "\n" | ||
5 | > error0..2 token("\'1") msg(Lifetime name cannot start with a number) | ||
6 | > error3..13 token("\'1lifetime") msg(Lifetime name cannot start with a number) | ||
diff --git a/crates/syntax/test_data/lexer/ok/0001_hello.rs b/crates/syntax/test_data/lexer/ok/0001_hello.rs new file mode 100644 index 000000000..95d09f2b1 --- /dev/null +++ b/crates/syntax/test_data/lexer/ok/0001_hello.rs | |||
@@ -0,0 +1 @@ | |||
hello world \ No newline at end of file | |||
diff --git a/crates/syntax/test_data/lexer/ok/0001_hello.txt b/crates/syntax/test_data/lexer/ok/0001_hello.txt new file mode 100644 index 000000000..27a5940a9 --- /dev/null +++ b/crates/syntax/test_data/lexer/ok/0001_hello.txt | |||
@@ -0,0 +1,3 @@ | |||
1 | IDENT 5 "hello" | ||
2 | WHITESPACE 1 " " | ||
3 | IDENT 5 "world" | ||
diff --git a/crates/syntax/test_data/lexer/ok/0002_whitespace.rs b/crates/syntax/test_data/lexer/ok/0002_whitespace.rs new file mode 100644 index 000000000..08fce1418 --- /dev/null +++ b/crates/syntax/test_data/lexer/ok/0002_whitespace.rs | |||
@@ -0,0 +1,4 @@ | |||
1 | a b c | ||
2 | d | ||
3 | |||
4 | e f | ||
diff --git a/crates/syntax/test_data/lexer/ok/0002_whitespace.txt b/crates/syntax/test_data/lexer/ok/0002_whitespace.txt new file mode 100644 index 000000000..01d260918 --- /dev/null +++ b/crates/syntax/test_data/lexer/ok/0002_whitespace.txt | |||
@@ -0,0 +1,12 @@ | |||
1 | IDENT 1 "a" | ||
2 | WHITESPACE 1 " " | ||
3 | IDENT 1 "b" | ||
4 | WHITESPACE 2 " " | ||
5 | IDENT 1 "c" | ||
6 | WHITESPACE 1 "\n" | ||
7 | IDENT 1 "d" | ||
8 | WHITESPACE 2 "\n\n" | ||
9 | IDENT 1 "e" | ||
10 | WHITESPACE 1 "\t" | ||
11 | IDENT 1 "f" | ||
12 | WHITESPACE 1 "\n" | ||
diff --git a/crates/syntax/test_data/lexer/ok/0003_ident.rs b/crates/syntax/test_data/lexer/ok/0003_ident.rs new file mode 100644 index 000000000..c05c9c009 --- /dev/null +++ b/crates/syntax/test_data/lexer/ok/0003_ident.rs | |||
@@ -0,0 +1 @@ | |||
foo foo_ _foo _ __ x привет | |||
diff --git a/crates/syntax/test_data/lexer/ok/0003_ident.txt b/crates/syntax/test_data/lexer/ok/0003_ident.txt new file mode 100644 index 000000000..4a0d5c053 --- /dev/null +++ b/crates/syntax/test_data/lexer/ok/0003_ident.txt | |||
@@ -0,0 +1,14 @@ | |||
1 | IDENT 3 "foo" | ||
2 | WHITESPACE 1 " " | ||
3 | IDENT 4 "foo_" | ||
4 | WHITESPACE 1 " " | ||
5 | IDENT 4 "_foo" | ||
6 | WHITESPACE 1 " " | ||
7 | UNDERSCORE 1 "_" | ||
8 | WHITESPACE 1 " " | ||
9 | IDENT 2 "__" | ||
10 | WHITESPACE 1 " " | ||
11 | IDENT 1 "x" | ||
12 | WHITESPACE 1 " " | ||
13 | IDENT 12 "привет" | ||
14 | WHITESPACE 1 "\n" | ||
diff --git a/crates/syntax/test_data/lexer/ok/0004_numbers.rs b/crates/syntax/test_data/lexer/ok/0004_numbers.rs new file mode 100644 index 000000000..bc761c235 --- /dev/null +++ b/crates/syntax/test_data/lexer/ok/0004_numbers.rs | |||
@@ -0,0 +1,9 @@ | |||
1 | 0 00 0_ 0. 0z | ||
2 | 01790 0b1790 0o1790 0x1790aAbBcCdDeEfF 001279 0_1279 0.1279 0e1279 0E1279 | ||
3 | 0..2 | ||
4 | 0.foo() | ||
5 | 0e+1 | ||
6 | 0.e+1 | ||
7 | 0.0E-2 | ||
8 | 0___0.10000____0000e+111__ | ||
9 | 1i64 92.0f32 11__s | ||
diff --git a/crates/syntax/test_data/lexer/ok/0004_numbers.txt b/crates/syntax/test_data/lexer/ok/0004_numbers.txt new file mode 100644 index 000000000..e19fc5789 --- /dev/null +++ b/crates/syntax/test_data/lexer/ok/0004_numbers.txt | |||
@@ -0,0 +1,57 @@ | |||
1 | INT_NUMBER 1 "0" | ||
2 | WHITESPACE 1 " " | ||
3 | INT_NUMBER 2 "00" | ||
4 | WHITESPACE 1 " " | ||
5 | INT_NUMBER 2 "0_" | ||
6 | WHITESPACE 1 " " | ||
7 | FLOAT_NUMBER 2 "0." | ||
8 | WHITESPACE 1 " " | ||
9 | INT_NUMBER 2 "0z" | ||
10 | WHITESPACE 1 "\n" | ||
11 | INT_NUMBER 5 "01790" | ||
12 | WHITESPACE 1 " " | ||
13 | INT_NUMBER 6 "0b1790" | ||
14 | WHITESPACE 1 " " | ||
15 | INT_NUMBER 6 "0o1790" | ||
16 | WHITESPACE 1 " " | ||
17 | INT_NUMBER 18 "0x1790aAbBcCdDeEfF" | ||
18 | WHITESPACE 1 " " | ||
19 | INT_NUMBER 6 "001279" | ||
20 | WHITESPACE 1 " " | ||
21 | INT_NUMBER 6 "0_1279" | ||
22 | WHITESPACE 1 " " | ||
23 | FLOAT_NUMBER 6 "0.1279" | ||
24 | WHITESPACE 1 " " | ||
25 | FLOAT_NUMBER 6 "0e1279" | ||
26 | WHITESPACE 1 " " | ||
27 | FLOAT_NUMBER 6 "0E1279" | ||
28 | WHITESPACE 1 "\n" | ||
29 | INT_NUMBER 1 "0" | ||
30 | DOT 1 "." | ||
31 | DOT 1 "." | ||
32 | INT_NUMBER 1 "2" | ||
33 | WHITESPACE 1 "\n" | ||
34 | INT_NUMBER 1 "0" | ||
35 | DOT 1 "." | ||
36 | IDENT 3 "foo" | ||
37 | L_PAREN 1 "(" | ||
38 | R_PAREN 1 ")" | ||
39 | WHITESPACE 1 "\n" | ||
40 | FLOAT_NUMBER 4 "0e+1" | ||
41 | WHITESPACE 1 "\n" | ||
42 | INT_NUMBER 1 "0" | ||
43 | DOT 1 "." | ||
44 | IDENT 1 "e" | ||
45 | PLUS 1 "+" | ||
46 | INT_NUMBER 1 "1" | ||
47 | WHITESPACE 1 "\n" | ||
48 | FLOAT_NUMBER 6 "0.0E-2" | ||
49 | WHITESPACE 1 "\n" | ||
50 | FLOAT_NUMBER 26 "0___0.10000____0000e+111__" | ||
51 | WHITESPACE 1 "\n" | ||
52 | INT_NUMBER 4 "1i64" | ||
53 | WHITESPACE 1 " " | ||
54 | FLOAT_NUMBER 7 "92.0f32" | ||
55 | WHITESPACE 1 " " | ||
56 | INT_NUMBER 5 "11__s" | ||
57 | WHITESPACE 1 "\n" | ||
diff --git a/crates/syntax/test_data/lexer/ok/0005_symbols.rs b/crates/syntax/test_data/lexer/ok/0005_symbols.rs new file mode 100644 index 000000000..487569b5a --- /dev/null +++ b/crates/syntax/test_data/lexer/ok/0005_symbols.rs | |||
@@ -0,0 +1,6 @@ | |||
1 | ; , ( ) { } [ ] < > @ # ~ ? $ & | + * / ^ % | ||
2 | . .. ... ..= | ||
3 | : :: | ||
4 | = => | ||
5 | ! != | ||
6 | - -> | ||
diff --git a/crates/syntax/test_data/lexer/ok/0005_symbols.txt b/crates/syntax/test_data/lexer/ok/0005_symbols.txt new file mode 100644 index 000000000..2049c2f1d --- /dev/null +++ b/crates/syntax/test_data/lexer/ok/0005_symbols.txt | |||
@@ -0,0 +1,77 @@ | |||
1 | SEMICOLON 1 ";" | ||
2 | WHITESPACE 1 " " | ||
3 | COMMA 1 "," | ||
4 | WHITESPACE 1 " " | ||
5 | L_PAREN 1 "(" | ||
6 | WHITESPACE 1 " " | ||
7 | R_PAREN 1 ")" | ||
8 | WHITESPACE 1 " " | ||
9 | L_CURLY 1 "{" | ||
10 | WHITESPACE 1 " " | ||
11 | R_CURLY 1 "}" | ||
12 | WHITESPACE 1 " " | ||
13 | L_BRACK 1 "[" | ||
14 | WHITESPACE 1 " " | ||
15 | R_BRACK 1 "]" | ||
16 | WHITESPACE 1 " " | ||
17 | L_ANGLE 1 "<" | ||
18 | WHITESPACE 1 " " | ||
19 | R_ANGLE 1 ">" | ||
20 | WHITESPACE 1 " " | ||
21 | AT 1 "@" | ||
22 | WHITESPACE 1 " " | ||
23 | POUND 1 "#" | ||
24 | WHITESPACE 1 " " | ||
25 | TILDE 1 "~" | ||
26 | WHITESPACE 1 " " | ||
27 | QUESTION 1 "?" | ||
28 | WHITESPACE 1 " " | ||
29 | DOLLAR 1 "$" | ||
30 | WHITESPACE 1 " " | ||
31 | AMP 1 "&" | ||
32 | WHITESPACE 1 " " | ||
33 | PIPE 1 "|" | ||
34 | WHITESPACE 1 " " | ||
35 | PLUS 1 "+" | ||
36 | WHITESPACE 1 " " | ||
37 | STAR 1 "*" | ||
38 | WHITESPACE 1 " " | ||
39 | SLASH 1 "/" | ||
40 | WHITESPACE 1 " " | ||
41 | CARET 1 "^" | ||
42 | WHITESPACE 1 " " | ||
43 | PERCENT 1 "%" | ||
44 | WHITESPACE 1 "\n" | ||
45 | DOT 1 "." | ||
46 | WHITESPACE 1 " " | ||
47 | DOT 1 "." | ||
48 | DOT 1 "." | ||
49 | WHITESPACE 1 " " | ||
50 | DOT 1 "." | ||
51 | DOT 1 "." | ||
52 | DOT 1 "." | ||
53 | WHITESPACE 1 " " | ||
54 | DOT 1 "." | ||
55 | DOT 1 "." | ||
56 | EQ 1 "=" | ||
57 | WHITESPACE 1 "\n" | ||
58 | COLON 1 ":" | ||
59 | WHITESPACE 1 " " | ||
60 | COLON 1 ":" | ||
61 | COLON 1 ":" | ||
62 | WHITESPACE 1 "\n" | ||
63 | EQ 1 "=" | ||
64 | WHITESPACE 1 " " | ||
65 | EQ 1 "=" | ||
66 | R_ANGLE 1 ">" | ||
67 | WHITESPACE 1 "\n" | ||
68 | BANG 1 "!" | ||
69 | WHITESPACE 1 " " | ||
70 | BANG 1 "!" | ||
71 | EQ 1 "=" | ||
72 | WHITESPACE 1 "\n" | ||
73 | MINUS 1 "-" | ||
74 | WHITESPACE 1 " " | ||
75 | MINUS 1 "-" | ||
76 | R_ANGLE 1 ">" | ||
77 | WHITESPACE 1 "\n" | ||
diff --git a/crates/syntax/test_data/lexer/ok/0006_chars.rs b/crates/syntax/test_data/lexer/ok/0006_chars.rs new file mode 100644 index 000000000..454ee0a5f --- /dev/null +++ b/crates/syntax/test_data/lexer/ok/0006_chars.rs | |||
@@ -0,0 +1 @@ | |||
'x' ' ' '0' 'hello' '\x7f' '\n' '\\' '\'' | |||
diff --git a/crates/syntax/test_data/lexer/ok/0006_chars.txt b/crates/syntax/test_data/lexer/ok/0006_chars.txt new file mode 100644 index 000000000..950954fbc --- /dev/null +++ b/crates/syntax/test_data/lexer/ok/0006_chars.txt | |||
@@ -0,0 +1,16 @@ | |||
1 | CHAR 3 "\'x\'" | ||
2 | WHITESPACE 1 " " | ||
3 | CHAR 3 "\' \'" | ||
4 | WHITESPACE 1 " " | ||
5 | CHAR 3 "\'0\'" | ||
6 | WHITESPACE 1 " " | ||
7 | CHAR 7 "\'hello\'" | ||
8 | WHITESPACE 1 " " | ||
9 | CHAR 6 "\'\\x7f\'" | ||
10 | WHITESPACE 1 " " | ||
11 | CHAR 4 "\'\\n\'" | ||
12 | WHITESPACE 1 " " | ||
13 | CHAR 4 "\'\\\\\'" | ||
14 | WHITESPACE 1 " " | ||
15 | CHAR 4 "\'\\\'\'" | ||
16 | WHITESPACE 1 "\n" | ||
diff --git a/crates/syntax/test_data/lexer/ok/0007_lifetimes.rs b/crates/syntax/test_data/lexer/ok/0007_lifetimes.rs new file mode 100644 index 000000000..b764f1dce --- /dev/null +++ b/crates/syntax/test_data/lexer/ok/0007_lifetimes.rs | |||
@@ -0,0 +1 @@ | |||
'a 'foo 'foo_bar_baz '_ | |||
diff --git a/crates/syntax/test_data/lexer/ok/0007_lifetimes.txt b/crates/syntax/test_data/lexer/ok/0007_lifetimes.txt new file mode 100644 index 000000000..005c29100 --- /dev/null +++ b/crates/syntax/test_data/lexer/ok/0007_lifetimes.txt | |||
@@ -0,0 +1,8 @@ | |||
1 | LIFETIME 2 "\'a" | ||
2 | WHITESPACE 1 " " | ||
3 | LIFETIME 4 "\'foo" | ||
4 | WHITESPACE 1 " " | ||
5 | LIFETIME 12 "\'foo_bar_baz" | ||
6 | WHITESPACE 1 " " | ||
7 | LIFETIME 2 "\'_" | ||
8 | WHITESPACE 1 "\n" | ||
diff --git a/crates/syntax/test_data/lexer/ok/0008_byte_strings.rs b/crates/syntax/test_data/lexer/ok/0008_byte_strings.rs new file mode 100644 index 000000000..b54930f5e --- /dev/null +++ b/crates/syntax/test_data/lexer/ok/0008_byte_strings.rs | |||
@@ -0,0 +1,3 @@ | |||
1 | b'' b'x' b"foo" br"" | ||
2 | b''suf b""ix br""br | ||
3 | b'\n' b'\\' b'\'' b'hello' | ||
diff --git a/crates/syntax/test_data/lexer/ok/0008_byte_strings.txt b/crates/syntax/test_data/lexer/ok/0008_byte_strings.txt new file mode 100644 index 000000000..bc03b51a8 --- /dev/null +++ b/crates/syntax/test_data/lexer/ok/0008_byte_strings.txt | |||
@@ -0,0 +1,22 @@ | |||
1 | BYTE 3 "b\'\'" | ||
2 | WHITESPACE 1 " " | ||
3 | BYTE 4 "b\'x\'" | ||
4 | WHITESPACE 1 " " | ||
5 | BYTE_STRING 6 "b\"foo\"" | ||
6 | WHITESPACE 1 " " | ||
7 | RAW_BYTE_STRING 4 "br\"\"" | ||
8 | WHITESPACE 1 "\n" | ||
9 | BYTE 6 "b\'\'suf" | ||
10 | WHITESPACE 1 " " | ||
11 | BYTE_STRING 5 "b\"\"ix" | ||
12 | WHITESPACE 1 " " | ||
13 | RAW_BYTE_STRING 6 "br\"\"br" | ||
14 | WHITESPACE 1 "\n" | ||
15 | BYTE 5 "b\'\\n\'" | ||
16 | WHITESPACE 1 " " | ||
17 | BYTE 5 "b\'\\\\\'" | ||
18 | WHITESPACE 1 " " | ||
19 | BYTE 5 "b\'\\\'\'" | ||
20 | WHITESPACE 1 " " | ||
21 | BYTE 8 "b\'hello\'" | ||
22 | WHITESPACE 1 "\n" | ||
diff --git a/crates/syntax/test_data/lexer/ok/0009_strings.rs b/crates/syntax/test_data/lexer/ok/0009_strings.rs new file mode 100644 index 000000000..4ddb5bffc --- /dev/null +++ b/crates/syntax/test_data/lexer/ok/0009_strings.rs | |||
@@ -0,0 +1,2 @@ | |||
1 | "hello" r"world" "\n\"\\no escape" "multi | ||
2 | line" | ||
diff --git a/crates/syntax/test_data/lexer/ok/0009_strings.txt b/crates/syntax/test_data/lexer/ok/0009_strings.txt new file mode 100644 index 000000000..4cb4d711d --- /dev/null +++ b/crates/syntax/test_data/lexer/ok/0009_strings.txt | |||
@@ -0,0 +1,8 @@ | |||
1 | STRING 7 "\"hello\"" | ||
2 | WHITESPACE 1 " " | ||
3 | RAW_STRING 8 "r\"world\"" | ||
4 | WHITESPACE 1 " " | ||
5 | STRING 17 "\"\\n\\\"\\\\no escape\"" | ||
6 | WHITESPACE 1 " " | ||
7 | STRING 12 "\"multi\nline\"" | ||
8 | WHITESPACE 1 "\n" | ||
diff --git a/crates/syntax/test_data/lexer/ok/0010_single_line_comments.rs b/crates/syntax/test_data/lexer/ok/0010_single_line_comments.rs new file mode 100644 index 000000000..4b6653f9c --- /dev/null +++ b/crates/syntax/test_data/lexer/ok/0010_single_line_comments.rs | |||
@@ -0,0 +1,12 @@ | |||
1 | #!/usr/bin/env bash | ||
2 | // hello | ||
3 | //! World | ||
4 | //!! Inner line doc | ||
5 | /// Outer line doc | ||
6 | //// Just a comment | ||
7 | |||
8 | // | ||
9 | //! | ||
10 | //!! | ||
11 | /// | ||
12 | //// | ||
diff --git a/crates/syntax/test_data/lexer/ok/0010_single_line_comments.txt b/crates/syntax/test_data/lexer/ok/0010_single_line_comments.txt new file mode 100644 index 000000000..98a3818c0 --- /dev/null +++ b/crates/syntax/test_data/lexer/ok/0010_single_line_comments.txt | |||
@@ -0,0 +1,22 @@ | |||
1 | SHEBANG 19 "#!/usr/bin/env bash" | ||
2 | WHITESPACE 1 "\n" | ||
3 | COMMENT 8 "// hello" | ||
4 | WHITESPACE 1 "\n" | ||
5 | COMMENT 9 "//! World" | ||
6 | WHITESPACE 1 "\n" | ||
7 | COMMENT 19 "//!! Inner line doc" | ||
8 | WHITESPACE 1 "\n" | ||
9 | COMMENT 18 "/// Outer line doc" | ||
10 | WHITESPACE 1 "\n" | ||
11 | COMMENT 19 "//// Just a comment" | ||
12 | WHITESPACE 2 "\n\n" | ||
13 | COMMENT 2 "//" | ||
14 | WHITESPACE 1 "\n" | ||
15 | COMMENT 3 "//!" | ||
16 | WHITESPACE 1 "\n" | ||
17 | COMMENT 4 "//!!" | ||
18 | WHITESPACE 1 "\n" | ||
19 | COMMENT 3 "///" | ||
20 | WHITESPACE 1 "\n" | ||
21 | COMMENT 4 "////" | ||
22 | WHITESPACE 1 "\n" | ||
diff --git a/crates/syntax/test_data/lexer/ok/0011_keywords.rs b/crates/syntax/test_data/lexer/ok/0011_keywords.rs new file mode 100644 index 000000000..1e91bff4e --- /dev/null +++ b/crates/syntax/test_data/lexer/ok/0011_keywords.rs | |||
@@ -0,0 +1,3 @@ | |||
1 | async fn use struct trait enum impl true false as extern crate | ||
2 | mod pub self super in where for loop while if match const | ||
3 | static mut type ref let else move return | ||
diff --git a/crates/syntax/test_data/lexer/ok/0011_keywords.txt b/crates/syntax/test_data/lexer/ok/0011_keywords.txt new file mode 100644 index 000000000..22c00eefb --- /dev/null +++ b/crates/syntax/test_data/lexer/ok/0011_keywords.txt | |||
@@ -0,0 +1,64 @@ | |||
1 | ASYNC_KW 5 "async" | ||
2 | WHITESPACE 1 " " | ||
3 | FN_KW 2 "fn" | ||
4 | WHITESPACE 1 " " | ||
5 | USE_KW 3 "use" | ||
6 | WHITESPACE 1 " " | ||
7 | STRUCT_KW 6 "struct" | ||
8 | WHITESPACE 1 " " | ||
9 | TRAIT_KW 5 "trait" | ||
10 | WHITESPACE 1 " " | ||
11 | ENUM_KW 4 "enum" | ||
12 | WHITESPACE 1 " " | ||
13 | IMPL_KW 4 "impl" | ||
14 | WHITESPACE 1 " " | ||
15 | TRUE_KW 4 "true" | ||
16 | WHITESPACE 1 " " | ||
17 | FALSE_KW 5 "false" | ||
18 | WHITESPACE 1 " " | ||
19 | AS_KW 2 "as" | ||
20 | WHITESPACE 1 " " | ||
21 | EXTERN_KW 6 "extern" | ||
22 | WHITESPACE 1 " " | ||
23 | CRATE_KW 5 "crate" | ||
24 | WHITESPACE 1 "\n" | ||
25 | MOD_KW 3 "mod" | ||
26 | WHITESPACE 1 " " | ||
27 | PUB_KW 3 "pub" | ||
28 | WHITESPACE 1 " " | ||
29 | SELF_KW 4 "self" | ||
30 | WHITESPACE 1 " " | ||
31 | SUPER_KW 5 "super" | ||
32 | WHITESPACE 1 " " | ||
33 | IN_KW 2 "in" | ||
34 | WHITESPACE 1 " " | ||
35 | WHERE_KW 5 "where" | ||
36 | WHITESPACE 1 " " | ||
37 | FOR_KW 3 "for" | ||
38 | WHITESPACE 1 " " | ||
39 | LOOP_KW 4 "loop" | ||
40 | WHITESPACE 1 " " | ||
41 | WHILE_KW 5 "while" | ||
42 | WHITESPACE 1 " " | ||
43 | IF_KW 2 "if" | ||
44 | WHITESPACE 1 " " | ||
45 | MATCH_KW 5 "match" | ||
46 | WHITESPACE 1 " " | ||
47 | CONST_KW 5 "const" | ||
48 | WHITESPACE 1 "\n" | ||
49 | STATIC_KW 6 "static" | ||
50 | WHITESPACE 1 " " | ||
51 | MUT_KW 3 "mut" | ||
52 | WHITESPACE 1 " " | ||
53 | TYPE_KW 4 "type" | ||
54 | WHITESPACE 1 " " | ||
55 | REF_KW 3 "ref" | ||
56 | WHITESPACE 1 " " | ||
57 | LET_KW 3 "let" | ||
58 | WHITESPACE 1 " " | ||
59 | ELSE_KW 4 "else" | ||
60 | WHITESPACE 1 " " | ||
61 | MOVE_KW 4 "move" | ||
62 | WHITESPACE 1 " " | ||
63 | RETURN_KW 6 "return" | ||
64 | WHITESPACE 1 "\n" | ||
diff --git a/crates/syntax/test_data/lexer/ok/0012_block_comment.rs b/crates/syntax/test_data/lexer/ok/0012_block_comment.rs new file mode 100644 index 000000000..b880a59d9 --- /dev/null +++ b/crates/syntax/test_data/lexer/ok/0012_block_comment.rs | |||
@@ -0,0 +1,3 @@ | |||
1 | /* */ | ||
2 | /**/ | ||
3 | /* /* */ */ | ||
diff --git a/crates/syntax/test_data/lexer/ok/0012_block_comment.txt b/crates/syntax/test_data/lexer/ok/0012_block_comment.txt new file mode 100644 index 000000000..2618e287e --- /dev/null +++ b/crates/syntax/test_data/lexer/ok/0012_block_comment.txt | |||
@@ -0,0 +1,6 @@ | |||
1 | COMMENT 5 "/* */" | ||
2 | WHITESPACE 1 "\n" | ||
3 | COMMENT 4 "/**/" | ||
4 | WHITESPACE 1 "\n" | ||
5 | COMMENT 11 "/* /* */ */" | ||
6 | WHITESPACE 1 "\n" | ||
diff --git a/crates/syntax/test_data/lexer/ok/0013_raw_strings.rs b/crates/syntax/test_data/lexer/ok/0013_raw_strings.rs new file mode 100644 index 000000000..e5ed0b693 --- /dev/null +++ b/crates/syntax/test_data/lexer/ok/0013_raw_strings.rs | |||
@@ -0,0 +1 @@ | |||
r###"this is a r##"raw"## string"### | |||
diff --git a/crates/syntax/test_data/lexer/ok/0013_raw_strings.txt b/crates/syntax/test_data/lexer/ok/0013_raw_strings.txt new file mode 100644 index 000000000..9cf0957d1 --- /dev/null +++ b/crates/syntax/test_data/lexer/ok/0013_raw_strings.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | RAW_STRING 36 "r###\"this is a r##\"raw\"## string\"###" | ||
2 | WHITESPACE 1 "\n" | ||
diff --git a/crates/syntax/test_data/lexer/ok/0014_raw_ident.rs b/crates/syntax/test_data/lexer/ok/0014_raw_ident.rs new file mode 100644 index 000000000..b40a1b6a2 --- /dev/null +++ b/crates/syntax/test_data/lexer/ok/0014_raw_ident.rs | |||
@@ -0,0 +1 @@ | |||
r#raw_ident | |||
diff --git a/crates/syntax/test_data/lexer/ok/0014_raw_ident.txt b/crates/syntax/test_data/lexer/ok/0014_raw_ident.txt new file mode 100644 index 000000000..484689693 --- /dev/null +++ b/crates/syntax/test_data/lexer/ok/0014_raw_ident.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | IDENT 11 "r#raw_ident" | ||
2 | WHITESPACE 1 "\n" | ||