From 698f8c2f01ea549d77d7dc3338a12e04c11057b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:02:58 +0200 Subject: Adding upstream version 1.64.0+dfsg1. Signed-off-by: Daniel Baumann --- .../parser/test_data/lexer/err/empty_exponent.rast | 48 ++++++++++++++ .../parser/test_data/lexer/err/empty_exponent.rs | 22 +++++++ .../parser/test_data/lexer/err/empty_exponent.txt | 48 ++++++++++++++ .../parser/test_data/lexer/err/empty_int.rast | 26 ++++++++ .../crates/parser/test_data/lexer/err/empty_int.rs | 17 +++++ .../parser/test_data/lexer/err/empty_int.txt | 26 ++++++++ .../lexer/err/lifetime_starts_with_a_number.rast | 4 ++ .../lexer/err/lifetime_starts_with_a_number.rs | 2 + .../lexer/err/lifetime_starts_with_a_number.txt | 4 ++ .../lexer/err/unclosed_block_comment_at_eof.rast | 1 + .../lexer/err/unclosed_block_comment_at_eof.rs | 1 + .../lexer/err/unclosed_block_comment_at_eof.txt | 1 + .../err/unclosed_block_comment_with_content.rast | 1 + .../err/unclosed_block_comment_with_content.rs | 1 + .../err/unclosed_block_comment_with_content.txt | 1 + .../test_data/lexer/err/unclosed_byte_at_eof.rast | 1 + .../test_data/lexer/err/unclosed_byte_at_eof.rs | 1 + .../test_data/lexer/err/unclosed_byte_at_eof.txt | 1 + .../lexer/err/unclosed_byte_string_at_eof.rast | 1 + .../lexer/err/unclosed_byte_string_at_eof.rs | 1 + .../lexer/err/unclosed_byte_string_at_eof.txt | 1 + .../unclosed_byte_string_with_ascii_escape.rast | 1 + .../err/unclosed_byte_string_with_ascii_escape.rs | 1 + .../err/unclosed_byte_string_with_ascii_escape.txt | 1 + .../err/unclosed_byte_string_with_ferris.rast | 1 + .../lexer/err/unclosed_byte_string_with_ferris.rs | 1 + .../lexer/err/unclosed_byte_string_with_ferris.txt | 1 + .../lexer/err/unclosed_byte_string_with_slash.rast | 1 + .../lexer/err/unclosed_byte_string_with_slash.rs | 1 + .../lexer/err/unclosed_byte_string_with_slash.txt | 1 + ...closed_byte_string_with_slash_double_quote.rast | 1 + ...unclosed_byte_string_with_slash_double_quote.rs | 1 + ...nclosed_byte_string_with_slash_double_quote.txt | 1 + .../err/unclosed_byte_string_with_slash_n.rast | 1 + .../lexer/err/unclosed_byte_string_with_slash_n.rs | 1 + .../err/unclosed_byte_string_with_slash_n.txt | 1 + .../lexer/err/unclosed_byte_string_with_space.rast | 1 + .../lexer/err/unclosed_byte_string_with_space.rs | 1 + .../lexer/err/unclosed_byte_string_with_space.txt | 1 + .../unclosed_byte_string_with_unicode_escape.rast | 1 + .../unclosed_byte_string_with_unicode_escape.rs | 1 + .../unclosed_byte_string_with_unicode_escape.txt | 1 + .../lexer/err/unclosed_byte_with_ascii_escape.rast | 1 + .../lexer/err/unclosed_byte_with_ascii_escape.rs | 1 + .../lexer/err/unclosed_byte_with_ascii_escape.txt | 1 + .../lexer/err/unclosed_byte_with_ferris.rast | 1 + .../lexer/err/unclosed_byte_with_ferris.rs | 1 + .../lexer/err/unclosed_byte_with_ferris.txt | 1 + .../lexer/err/unclosed_byte_with_slash.rast | 1 + .../lexer/err/unclosed_byte_with_slash.rs | 1 + .../lexer/err/unclosed_byte_with_slash.txt | 1 + .../lexer/err/unclosed_byte_with_slash_n.rast | 1 + .../lexer/err/unclosed_byte_with_slash_n.rs | 1 + .../lexer/err/unclosed_byte_with_slash_n.txt | 1 + .../err/unclosed_byte_with_slash_single_quote.rast | 1 + .../err/unclosed_byte_with_slash_single_quote.rs | 1 + .../err/unclosed_byte_with_slash_single_quote.txt | 1 + .../lexer/err/unclosed_byte_with_space.rast | 1 + .../lexer/err/unclosed_byte_with_space.rs | 1 + .../lexer/err/unclosed_byte_with_space.txt | 1 + .../err/unclosed_byte_with_unicode_escape.rast | 1 + .../lexer/err/unclosed_byte_with_unicode_escape.rs | 1 + .../err/unclosed_byte_with_unicode_escape.txt | 1 + .../test_data/lexer/err/unclosed_char_at_eof.rast | 1 + .../test_data/lexer/err/unclosed_char_at_eof.rs | 1 + .../test_data/lexer/err/unclosed_char_at_eof.txt | 1 + .../lexer/err/unclosed_char_with_ascii_escape.rast | 1 + .../lexer/err/unclosed_char_with_ascii_escape.rs | 1 + .../lexer/err/unclosed_char_with_ascii_escape.txt | 1 + .../lexer/err/unclosed_char_with_ferris.rast | 1 + .../lexer/err/unclosed_char_with_ferris.rs | 1 + .../lexer/err/unclosed_char_with_ferris.txt | 1 + .../lexer/err/unclosed_char_with_slash.rast | 1 + .../lexer/err/unclosed_char_with_slash.rs | 1 + .../lexer/err/unclosed_char_with_slash.txt | 1 + .../lexer/err/unclosed_char_with_slash_n.rast | 1 + .../lexer/err/unclosed_char_with_slash_n.rs | 1 + .../lexer/err/unclosed_char_with_slash_n.txt | 1 + .../err/unclosed_char_with_slash_single_quote.rast | 1 + .../err/unclosed_char_with_slash_single_quote.rs | 1 + .../err/unclosed_char_with_slash_single_quote.txt | 1 + .../lexer/err/unclosed_char_with_space.rast | 1 + .../lexer/err/unclosed_char_with_space.rs | 1 + .../lexer/err/unclosed_char_with_space.txt | 1 + .../err/unclosed_char_with_unicode_escape.rast | 1 + .../lexer/err/unclosed_char_with_unicode_escape.rs | 1 + .../err/unclosed_char_with_unicode_escape.txt | 1 + .../unclosed_nested_block_comment_entirely.rast | 1 + .../err/unclosed_nested_block_comment_entirely.rs | 1 + .../err/unclosed_nested_block_comment_entirely.txt | 1 + .../unclosed_nested_block_comment_partially.rast | 1 + .../err/unclosed_nested_block_comment_partially.rs | 1 + .../unclosed_nested_block_comment_partially.txt | 1 + .../lexer/err/unclosed_raw_byte_string_at_eof.rast | 1 + .../lexer/err/unclosed_raw_byte_string_at_eof.rs | 1 + .../lexer/err/unclosed_raw_byte_string_at_eof.txt | 1 + ...unclosed_raw_byte_string_with_ascii_escape.rast | 1 + .../unclosed_raw_byte_string_with_ascii_escape.rs | 1 + .../unclosed_raw_byte_string_with_ascii_escape.txt | 1 + .../err/unclosed_raw_byte_string_with_ferris.rast | 1 + .../err/unclosed_raw_byte_string_with_ferris.rs | 1 + .../err/unclosed_raw_byte_string_with_ferris.txt | 1 + .../err/unclosed_raw_byte_string_with_slash.rast | 1 + .../err/unclosed_raw_byte_string_with_slash.rs | 1 + .../err/unclosed_raw_byte_string_with_slash.txt | 1 + .../err/unclosed_raw_byte_string_with_slash_n.rast | 1 + .../err/unclosed_raw_byte_string_with_slash_n.rs | 1 + .../err/unclosed_raw_byte_string_with_slash_n.txt | 1 + .../err/unclosed_raw_byte_string_with_space.rast | 1 + .../err/unclosed_raw_byte_string_with_space.rs | 1 + .../err/unclosed_raw_byte_string_with_space.txt | 1 + ...closed_raw_byte_string_with_unicode_escape.rast | 1 + ...unclosed_raw_byte_string_with_unicode_escape.rs | 1 + ...nclosed_raw_byte_string_with_unicode_escape.txt | 1 + .../lexer/err/unclosed_raw_string_at_eof.rast | 1 + .../lexer/err/unclosed_raw_string_at_eof.rs | 1 + .../lexer/err/unclosed_raw_string_at_eof.txt | 1 + .../err/unclosed_raw_string_with_ascii_escape.rast | 1 + .../err/unclosed_raw_string_with_ascii_escape.rs | 1 + .../err/unclosed_raw_string_with_ascii_escape.txt | 1 + .../lexer/err/unclosed_raw_string_with_ferris.rast | 1 + .../lexer/err/unclosed_raw_string_with_ferris.rs | 1 + .../lexer/err/unclosed_raw_string_with_ferris.txt | 1 + .../lexer/err/unclosed_raw_string_with_slash.rast | 1 + .../lexer/err/unclosed_raw_string_with_slash.rs | 1 + .../lexer/err/unclosed_raw_string_with_slash.txt | 1 + .../err/unclosed_raw_string_with_slash_n.rast | 1 + .../lexer/err/unclosed_raw_string_with_slash_n.rs | 1 + .../lexer/err/unclosed_raw_string_with_slash_n.txt | 1 + .../lexer/err/unclosed_raw_string_with_space.rast | 1 + .../lexer/err/unclosed_raw_string_with_space.rs | 1 + .../lexer/err/unclosed_raw_string_with_space.txt | 1 + .../unclosed_raw_string_with_unicode_escape.rast | 1 + .../err/unclosed_raw_string_with_unicode_escape.rs | 1 + .../unclosed_raw_string_with_unicode_escape.txt | 1 + .../lexer/err/unclosed_string_at_eof.rast | 1 + .../test_data/lexer/err/unclosed_string_at_eof.rs | 1 + .../test_data/lexer/err/unclosed_string_at_eof.txt | 1 + .../err/unclosed_string_with_ascii_escape.rast | 1 + .../lexer/err/unclosed_string_with_ascii_escape.rs | 1 + .../err/unclosed_string_with_ascii_escape.txt | 1 + .../lexer/err/unclosed_string_with_ferris.rast | 1 + .../lexer/err/unclosed_string_with_ferris.rs | 1 + .../lexer/err/unclosed_string_with_ferris.txt | 1 + .../lexer/err/unclosed_string_with_slash.rast | 1 + .../lexer/err/unclosed_string_with_slash.rs | 1 + .../lexer/err/unclosed_string_with_slash.txt | 1 + .../unclosed_string_with_slash_double_quote.rast | 1 + .../err/unclosed_string_with_slash_double_quote.rs | 1 + .../unclosed_string_with_slash_double_quote.txt | 1 + .../lexer/err/unclosed_string_with_slash_n.rast | 1 + .../lexer/err/unclosed_string_with_slash_n.rs | 1 + .../lexer/err/unclosed_string_with_slash_n.txt | 1 + .../lexer/err/unclosed_string_with_space.rast | 1 + .../lexer/err/unclosed_string_with_space.rs | 1 + .../lexer/err/unclosed_string_with_space.txt | 1 + .../err/unclosed_string_with_unicode_escape.rast | 1 + .../err/unclosed_string_with_unicode_escape.rs | 1 + .../err/unclosed_string_with_unicode_escape.txt | 1 + .../err/unstarted_raw_byte_string_at_eof.rast | 1 + .../lexer/err/unstarted_raw_byte_string_at_eof.rs | 1 + .../lexer/err/unstarted_raw_byte_string_at_eof.txt | 1 + .../err/unstarted_raw_byte_string_with_ascii.rast | 9 +++ .../err/unstarted_raw_byte_string_with_ascii.rs | 1 + .../err/unstarted_raw_byte_string_with_ascii.txt | 9 +++ .../lexer/err/unstarted_raw_string_at_eof.rast | 1 + .../lexer/err/unstarted_raw_string_at_eof.rs | 1 + .../lexer/err/unstarted_raw_string_at_eof.txt | 1 + .../lexer/err/unstarted_raw_string_with_ascii.rast | 9 +++ .../lexer/err/unstarted_raw_string_with_ascii.rs | 1 + .../lexer/err/unstarted_raw_string_with_ascii.txt | 9 +++ .../parser/test_data/lexer/ok/block_comment.rast | 6 ++ .../parser/test_data/lexer/ok/block_comment.rs | 3 + .../parser/test_data/lexer/ok/block_comment.txt | 6 ++ .../parser/test_data/lexer/ok/byte_strings.rast | 22 +++++++ .../parser/test_data/lexer/ok/byte_strings.rs | 3 + .../parser/test_data/lexer/ok/byte_strings.txt | 22 +++++++ .../crates/parser/test_data/lexer/ok/chars.rast | 16 +++++ .../crates/parser/test_data/lexer/ok/chars.rs | 1 + .../crates/parser/test_data/lexer/ok/chars.txt | 16 +++++ .../crates/parser/test_data/lexer/ok/hello.rast | 3 + .../crates/parser/test_data/lexer/ok/hello.rs | 1 + .../crates/parser/test_data/lexer/ok/hello.txt | 3 + .../crates/parser/test_data/lexer/ok/ident.rast | 14 ++++ .../crates/parser/test_data/lexer/ok/ident.rs | 1 + .../crates/parser/test_data/lexer/ok/ident.txt | 14 ++++ .../crates/parser/test_data/lexer/ok/keywords.rast | 64 ++++++++++++++++++ .../crates/parser/test_data/lexer/ok/keywords.rs | 3 + .../crates/parser/test_data/lexer/ok/keywords.txt | 64 ++++++++++++++++++ .../parser/test_data/lexer/ok/lifetimes.rast | 8 +++ .../crates/parser/test_data/lexer/ok/lifetimes.rs | 1 + .../crates/parser/test_data/lexer/ok/lifetimes.txt | 8 +++ .../crates/parser/test_data/lexer/ok/numbers.rast | 57 ++++++++++++++++ .../crates/parser/test_data/lexer/ok/numbers.rs | 9 +++ .../crates/parser/test_data/lexer/ok/numbers.txt | 57 ++++++++++++++++ .../parser/test_data/lexer/ok/raw_ident.rast | 2 + .../crates/parser/test_data/lexer/ok/raw_ident.rs | 1 + .../crates/parser/test_data/lexer/ok/raw_ident.txt | 2 + .../parser/test_data/lexer/ok/raw_strings.rast | 2 + .../parser/test_data/lexer/ok/raw_strings.rs | 1 + .../parser/test_data/lexer/ok/raw_strings.txt | 2 + .../test_data/lexer/ok/single_line_comments.rast | 22 +++++++ .../test_data/lexer/ok/single_line_comments.rs | 12 ++++ .../test_data/lexer/ok/single_line_comments.txt | 22 +++++++ .../crates/parser/test_data/lexer/ok/strings.rast | 8 +++ .../crates/parser/test_data/lexer/ok/strings.rs | 2 + .../crates/parser/test_data/lexer/ok/strings.txt | 8 +++ .../crates/parser/test_data/lexer/ok/symbols.rast | 77 ++++++++++++++++++++++ .../crates/parser/test_data/lexer/ok/symbols.rs | 6 ++ .../crates/parser/test_data/lexer/ok/symbols.txt | 77 ++++++++++++++++++++++ .../parser/test_data/lexer/ok/whitespace.rast | 12 ++++ .../crates/parser/test_data/lexer/ok/whitespace.rs | 4 ++ .../parser/test_data/lexer/ok/whitespace.txt | 12 ++++ 213 files changed, 1065 insertions(+) create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/empty_exponent.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/empty_exponent.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/empty_exponent.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/empty_int.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/empty_int.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/empty_int.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/lifetime_starts_with_a_number.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/lifetime_starts_with_a_number.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/lifetime_starts_with_a_number.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_block_comment_at_eof.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_block_comment_at_eof.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_block_comment_at_eof.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_block_comment_with_content.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_block_comment_with_content.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_block_comment_with_content.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_at_eof.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_at_eof.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_at_eof.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_at_eof.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_at_eof.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_at_eof.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_ascii_escape.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_ascii_escape.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_ascii_escape.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_ferris.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_ferris.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_ferris.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_slash.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_slash.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_slash.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_slash_double_quote.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_slash_double_quote.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_slash_double_quote.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_slash_n.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_slash_n.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_slash_n.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_space.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_space.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_space.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_unicode_escape.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_unicode_escape.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_unicode_escape.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_ascii_escape.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_ascii_escape.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_ascii_escape.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_ferris.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_ferris.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_ferris.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_slash.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_slash.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_slash.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_slash_n.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_slash_n.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_slash_n.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_slash_single_quote.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_slash_single_quote.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_slash_single_quote.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_space.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_space.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_space.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_unicode_escape.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_unicode_escape.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_unicode_escape.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_at_eof.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_at_eof.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_at_eof.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_ascii_escape.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_ascii_escape.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_ascii_escape.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_ferris.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_ferris.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_ferris.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_slash.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_slash.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_slash.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_slash_n.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_slash_n.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_slash_n.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_slash_single_quote.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_slash_single_quote.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_slash_single_quote.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_space.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_space.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_space.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_unicode_escape.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_unicode_escape.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_unicode_escape.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_nested_block_comment_entirely.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_nested_block_comment_entirely.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_nested_block_comment_entirely.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_nested_block_comment_partially.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_nested_block_comment_partially.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_nested_block_comment_partially.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_at_eof.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_at_eof.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_at_eof.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_ascii_escape.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_ascii_escape.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_ascii_escape.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_ferris.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_ferris.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_ferris.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_slash.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_slash.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_slash.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_slash_n.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_slash_n.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_slash_n.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_space.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_space.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_space.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_unicode_escape.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_unicode_escape.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_unicode_escape.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_at_eof.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_at_eof.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_at_eof.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_ascii_escape.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_ascii_escape.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_ascii_escape.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_ferris.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_ferris.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_ferris.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_slash.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_slash.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_slash.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_slash_n.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_slash_n.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_slash_n.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_space.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_space.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_space.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_unicode_escape.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_unicode_escape.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_unicode_escape.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_at_eof.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_at_eof.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_at_eof.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_ascii_escape.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_ascii_escape.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_ascii_escape.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_ferris.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_ferris.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_ferris.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_slash.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_slash.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_slash.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_slash_double_quote.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_slash_double_quote.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_slash_double_quote.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_slash_n.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_slash_n.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_slash_n.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_space.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_space.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_space.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_unicode_escape.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_unicode_escape.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_unicode_escape.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_byte_string_at_eof.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_byte_string_at_eof.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_byte_string_at_eof.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_byte_string_with_ascii.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_byte_string_with_ascii.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_byte_string_with_ascii.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_string_at_eof.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_string_at_eof.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_string_at_eof.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_string_with_ascii.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_string_with_ascii.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_string_with_ascii.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/block_comment.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/block_comment.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/block_comment.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/byte_strings.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/byte_strings.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/byte_strings.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/chars.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/chars.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/chars.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/hello.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/hello.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/hello.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/ident.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/ident.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/ident.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/keywords.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/keywords.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/keywords.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/lifetimes.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/lifetimes.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/lifetimes.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/numbers.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/numbers.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/numbers.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/raw_ident.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/raw_ident.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/raw_ident.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/raw_strings.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/raw_strings.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/raw_strings.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/single_line_comments.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/single_line_comments.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/single_line_comments.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/strings.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/strings.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/strings.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/symbols.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/symbols.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/symbols.txt create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/whitespace.rast create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/whitespace.rs create mode 100644 src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/whitespace.txt (limited to 'src/tools/rust-analyzer/crates/parser/test_data/lexer') diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/empty_exponent.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/empty_exponent.rast new file mode 100644 index 000000000..af03d73ce --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/empty_exponent.rast @@ -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" diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/empty_exponent.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/empty_exponent.rs new file mode 100644 index 000000000..286584c88 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/empty_exponent.rs @@ -0,0 +1,22 @@ +0e +0E + +42e+ +42e- +42E+ +42E- + +42.e+ +42.e- +42.E+ +42.E- + +42.2e+ +42.2e- +42.2E+ +42.2E- + +42.2e+f32 +42.2e-f32 +42.2E+f32 +42.2E-f32 diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/empty_exponent.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/empty_exponent.txt new file mode 100644 index 000000000..af03d73ce --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/empty_exponent.txt @@ -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" diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/empty_int.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/empty_int.rast new file mode 100644 index 000000000..7f7194f45 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/empty_int.rast @@ -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" diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/empty_int.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/empty_int.rs new file mode 100644 index 000000000..aa2a9fdca --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/empty_int.rs @@ -0,0 +1,17 @@ +0b +0o +0x + +0b_ +0o_ +0x_ + +0bnoDigit +0onoDigit +0xnoDigit + +0xG +0xg + +0x_g +0x_G diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/empty_int.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/empty_int.txt new file mode 100644 index 000000000..7f7194f45 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/empty_int.txt @@ -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" diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/lifetime_starts_with_a_number.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/lifetime_starts_with_a_number.rast new file mode 100644 index 000000000..e919bf2a4 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/lifetime_starts_with_a_number.rast @@ -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" diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/lifetime_starts_with_a_number.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/lifetime_starts_with_a_number.rs new file mode 100644 index 000000000..a7698a404 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/lifetime_starts_with_a_number.rs @@ -0,0 +1,2 @@ +'1 +'1lifetime diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/lifetime_starts_with_a_number.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/lifetime_starts_with_a_number.txt new file mode 100644 index 000000000..e919bf2a4 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/lifetime_starts_with_a_number.txt @@ -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" diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_block_comment_at_eof.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_block_comment_at_eof.rast new file mode 100644 index 000000000..7d2c32976 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_block_comment_at_eof.rast @@ -0,0 +1 @@ +COMMENT "/*" error: Missing trailing `*/` symbols to terminate the block comment diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_block_comment_at_eof.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_block_comment_at_eof.rs new file mode 100644 index 000000000..22e83649f --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_block_comment_at_eof.rs @@ -0,0 +1 @@ +/* \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_block_comment_at_eof.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_block_comment_at_eof.txt new file mode 100644 index 000000000..7d2c32976 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_block_comment_at_eof.txt @@ -0,0 +1 @@ +COMMENT "/*" error: Missing trailing `*/` symbols to terminate the block comment diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_block_comment_with_content.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_block_comment_with_content.rast new file mode 100644 index 000000000..227a20660 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_block_comment_with_content.rast @@ -0,0 +1 @@ +COMMENT "/* comment\n" error: Missing trailing `*/` symbols to terminate the block comment diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_block_comment_with_content.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_block_comment_with_content.rs new file mode 100644 index 000000000..c45c2844d --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_block_comment_with_content.rs @@ -0,0 +1 @@ +/* comment diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_block_comment_with_content.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_block_comment_with_content.txt new file mode 100644 index 000000000..227a20660 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_block_comment_with_content.txt @@ -0,0 +1 @@ +COMMENT "/* comment\n" error: Missing trailing `*/` symbols to terminate the block comment diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_at_eof.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_at_eof.rast new file mode 100644 index 000000000..36944dbb2 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_at_eof.rast @@ -0,0 +1 @@ +BYTE "b'" error: Missing trailing `'` symbol to terminate the byte literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_at_eof.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_at_eof.rs new file mode 100644 index 000000000..795dc7e25 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_at_eof.rs @@ -0,0 +1 @@ +b' \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_at_eof.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_at_eof.txt new file mode 100644 index 000000000..36944dbb2 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_at_eof.txt @@ -0,0 +1 @@ +BYTE "b'" error: Missing trailing `'` symbol to terminate the byte literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_at_eof.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_at_eof.rast new file mode 100644 index 000000000..534a3cadc --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_at_eof.rast @@ -0,0 +1 @@ +BYTE_STRING "b\"" error: Missing trailing `"` symbol to terminate the byte string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_at_eof.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_at_eof.rs new file mode 100644 index 000000000..36f4f4321 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_at_eof.rs @@ -0,0 +1 @@ +b" \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_at_eof.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_at_eof.txt new file mode 100644 index 000000000..534a3cadc --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_at_eof.txt @@ -0,0 +1 @@ +BYTE_STRING "b\"" error: Missing trailing `"` symbol to terminate the byte string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_ascii_escape.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_ascii_escape.rast new file mode 100644 index 000000000..03f61de9a --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_ascii_escape.rast @@ -0,0 +1 @@ +BYTE_STRING "b\"\\x7f" error: Missing trailing `"` symbol to terminate the byte string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_ascii_escape.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_ascii_escape.rs new file mode 100644 index 000000000..836c112c1 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_ascii_escape.rs @@ -0,0 +1 @@ +b"\x7f \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_ascii_escape.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_ascii_escape.txt new file mode 100644 index 000000000..03f61de9a --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_ascii_escape.txt @@ -0,0 +1 @@ +BYTE_STRING "b\"\\x7f" error: Missing trailing `"` symbol to terminate the byte string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_ferris.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_ferris.rast new file mode 100644 index 000000000..e11d49d1e --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_ferris.rast @@ -0,0 +1 @@ +BYTE_STRING "b\"🦀" error: Missing trailing `"` symbol to terminate the byte string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_ferris.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_ferris.rs new file mode 100644 index 000000000..3c23a0372 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_ferris.rs @@ -0,0 +1 @@ +b"🦀 \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_ferris.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_ferris.txt new file mode 100644 index 000000000..e11d49d1e --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_ferris.txt @@ -0,0 +1 @@ +BYTE_STRING "b\"🦀" error: Missing trailing `"` symbol to terminate the byte string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_slash.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_slash.rast new file mode 100644 index 000000000..4e374b120 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_slash.rast @@ -0,0 +1 @@ +BYTE_STRING "b\"\\" error: Missing trailing `"` symbol to terminate the byte string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_slash.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_slash.rs new file mode 100644 index 000000000..cce661538 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_slash.rs @@ -0,0 +1 @@ +b"\ \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_slash.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_slash.txt new file mode 100644 index 000000000..4e374b120 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_slash.txt @@ -0,0 +1 @@ +BYTE_STRING "b\"\\" error: Missing trailing `"` symbol to terminate the byte string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_slash_double_quote.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_slash_double_quote.rast new file mode 100644 index 000000000..ee1997586 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_slash_double_quote.rast @@ -0,0 +1 @@ +BYTE_STRING "b\"\\\"" error: Missing trailing `"` symbol to terminate the byte string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_slash_double_quote.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_slash_double_quote.rs new file mode 100644 index 000000000..f2ff58ba9 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_slash_double_quote.rs @@ -0,0 +1 @@ +b"\" \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_slash_double_quote.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_slash_double_quote.txt new file mode 100644 index 000000000..ee1997586 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_slash_double_quote.txt @@ -0,0 +1 @@ +BYTE_STRING "b\"\\\"" error: Missing trailing `"` symbol to terminate the byte string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_slash_n.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_slash_n.rast new file mode 100644 index 000000000..b109d8629 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_slash_n.rast @@ -0,0 +1 @@ +BYTE_STRING "b\"\\n" error: Missing trailing `"` symbol to terminate the byte string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_slash_n.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_slash_n.rs new file mode 100644 index 000000000..5e680aabb --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_slash_n.rs @@ -0,0 +1 @@ +b"\n \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_slash_n.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_slash_n.txt new file mode 100644 index 000000000..b109d8629 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_slash_n.txt @@ -0,0 +1 @@ +BYTE_STRING "b\"\\n" error: Missing trailing `"` symbol to terminate the byte string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_space.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_space.rast new file mode 100644 index 000000000..eaca94fa4 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_space.rast @@ -0,0 +1 @@ +BYTE_STRING "b\" " error: Missing trailing `"` symbol to terminate the byte string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_space.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_space.rs new file mode 100644 index 000000000..d6898541e --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_space.rs @@ -0,0 +1 @@ +b" \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_space.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_space.txt new file mode 100644 index 000000000..eaca94fa4 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_space.txt @@ -0,0 +1 @@ +BYTE_STRING "b\" " error: Missing trailing `"` symbol to terminate the byte string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_unicode_escape.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_unicode_escape.rast new file mode 100644 index 000000000..3b79f48bc --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_unicode_escape.rast @@ -0,0 +1 @@ +BYTE_STRING "b\"\\u{20AA}" error: Missing trailing `"` symbol to terminate the byte string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_unicode_escape.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_unicode_escape.rs new file mode 100644 index 000000000..1c6df1d00 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_unicode_escape.rs @@ -0,0 +1 @@ +b"\u{20AA} \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_unicode_escape.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_unicode_escape.txt new file mode 100644 index 000000000..3b79f48bc --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_unicode_escape.txt @@ -0,0 +1 @@ +BYTE_STRING "b\"\\u{20AA}" error: Missing trailing `"` symbol to terminate the byte string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_ascii_escape.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_ascii_escape.rast new file mode 100644 index 000000000..5525376f4 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_ascii_escape.rast @@ -0,0 +1 @@ +BYTE "b'\\x7f" error: Missing trailing `'` symbol to terminate the byte literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_ascii_escape.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_ascii_escape.rs new file mode 100644 index 000000000..d146a8090 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_ascii_escape.rs @@ -0,0 +1 @@ +b'\x7f \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_ascii_escape.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_ascii_escape.txt new file mode 100644 index 000000000..5525376f4 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_ascii_escape.txt @@ -0,0 +1 @@ +BYTE "b'\\x7f" error: Missing trailing `'` symbol to terminate the byte literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_ferris.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_ferris.rast new file mode 100644 index 000000000..e7a8be4f6 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_ferris.rast @@ -0,0 +1 @@ +BYTE "b'🦀" error: Missing trailing `'` symbol to terminate the byte literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_ferris.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_ferris.rs new file mode 100644 index 000000000..c9230dc24 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_ferris.rs @@ -0,0 +1 @@ +b'🦀 \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_ferris.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_ferris.txt new file mode 100644 index 000000000..e7a8be4f6 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_ferris.txt @@ -0,0 +1 @@ +BYTE "b'🦀" error: Missing trailing `'` symbol to terminate the byte literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_slash.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_slash.rast new file mode 100644 index 000000000..d9937135a --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_slash.rast @@ -0,0 +1 @@ +BYTE "b'\\" error: Missing trailing `'` symbol to terminate the byte literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_slash.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_slash.rs new file mode 100644 index 000000000..abffa5037 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_slash.rs @@ -0,0 +1 @@ +b'\ \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_slash.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_slash.txt new file mode 100644 index 000000000..d9937135a --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_slash.txt @@ -0,0 +1 @@ +BYTE "b'\\" error: Missing trailing `'` symbol to terminate the byte literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_slash_n.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_slash_n.rast new file mode 100644 index 000000000..c408cdb2b --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_slash_n.rast @@ -0,0 +1 @@ +BYTE "b'\\n" error: Missing trailing `'` symbol to terminate the byte literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_slash_n.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_slash_n.rs new file mode 100644 index 000000000..4f46836a9 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_slash_n.rs @@ -0,0 +1 @@ +b'\n \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_slash_n.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_slash_n.txt new file mode 100644 index 000000000..c408cdb2b --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_slash_n.txt @@ -0,0 +1 @@ +BYTE "b'\\n" error: Missing trailing `'` symbol to terminate the byte literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_slash_single_quote.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_slash_single_quote.rast new file mode 100644 index 000000000..b331f9560 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_slash_single_quote.rast @@ -0,0 +1 @@ +BYTE "b'\\'" error: Missing trailing `'` symbol to terminate the byte literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_slash_single_quote.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_slash_single_quote.rs new file mode 100644 index 000000000..645b641ee --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_slash_single_quote.rs @@ -0,0 +1 @@ +b'\' \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_slash_single_quote.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_slash_single_quote.txt new file mode 100644 index 000000000..b331f9560 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_slash_single_quote.txt @@ -0,0 +1 @@ +BYTE "b'\\'" error: Missing trailing `'` symbol to terminate the byte literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_space.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_space.rast new file mode 100644 index 000000000..80c0e1c00 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_space.rast @@ -0,0 +1 @@ +BYTE "b' " error: Missing trailing `'` symbol to terminate the byte literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_space.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_space.rs new file mode 100644 index 000000000..93b7f9c87 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_space.rs @@ -0,0 +1 @@ +b' \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_space.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_space.txt new file mode 100644 index 000000000..80c0e1c00 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_space.txt @@ -0,0 +1 @@ +BYTE "b' " error: Missing trailing `'` symbol to terminate the byte literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_unicode_escape.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_unicode_escape.rast new file mode 100644 index 000000000..e1c3dc141 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_unicode_escape.rast @@ -0,0 +1 @@ +BYTE "b'\\u{20AA}" error: Missing trailing `'` symbol to terminate the byte literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_unicode_escape.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_unicode_escape.rs new file mode 100644 index 000000000..a3dec7c25 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_unicode_escape.rs @@ -0,0 +1 @@ +b'\u{20AA} \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_unicode_escape.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_unicode_escape.txt new file mode 100644 index 000000000..e1c3dc141 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_unicode_escape.txt @@ -0,0 +1 @@ +BYTE "b'\\u{20AA}" error: Missing trailing `'` symbol to terminate the byte literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_at_eof.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_at_eof.rast new file mode 100644 index 000000000..218c7a2d7 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_at_eof.rast @@ -0,0 +1 @@ +CHAR "'" error: Missing trailing `'` symbol to terminate the character literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_at_eof.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_at_eof.rs new file mode 100644 index 000000000..ad2823b48 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_at_eof.rs @@ -0,0 +1 @@ +' \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_at_eof.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_at_eof.txt new file mode 100644 index 000000000..218c7a2d7 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_at_eof.txt @@ -0,0 +1 @@ +CHAR "'" error: Missing trailing `'` symbol to terminate the character literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_ascii_escape.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_ascii_escape.rast new file mode 100644 index 000000000..a0d8e1b83 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_ascii_escape.rast @@ -0,0 +1 @@ +CHAR "'\\x7f" error: Missing trailing `'` symbol to terminate the character literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_ascii_escape.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_ascii_escape.rs new file mode 100644 index 000000000..cf74b4dad --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_ascii_escape.rs @@ -0,0 +1 @@ +'\x7f \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_ascii_escape.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_ascii_escape.txt new file mode 100644 index 000000000..a0d8e1b83 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_ascii_escape.txt @@ -0,0 +1 @@ +CHAR "'\\x7f" error: Missing trailing `'` symbol to terminate the character literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_ferris.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_ferris.rast new file mode 100644 index 000000000..56f19cce0 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_ferris.rast @@ -0,0 +1 @@ +CHAR "'🦀" error: Missing trailing `'` symbol to terminate the character literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_ferris.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_ferris.rs new file mode 100644 index 000000000..e264a4152 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_ferris.rs @@ -0,0 +1 @@ +'🦀 \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_ferris.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_ferris.txt new file mode 100644 index 000000000..56f19cce0 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_ferris.txt @@ -0,0 +1 @@ +CHAR "'🦀" error: Missing trailing `'` symbol to terminate the character literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_slash.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_slash.rast new file mode 100644 index 000000000..cfa0e0752 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_slash.rast @@ -0,0 +1 @@ +CHAR "'\\" error: Missing trailing `'` symbol to terminate the character literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_slash.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_slash.rs new file mode 100644 index 000000000..6ba258b10 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_slash.rs @@ -0,0 +1 @@ +'\ \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_slash.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_slash.txt new file mode 100644 index 000000000..cfa0e0752 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_slash.txt @@ -0,0 +1 @@ +CHAR "'\\" error: Missing trailing `'` symbol to terminate the character literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_slash_n.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_slash_n.rast new file mode 100644 index 000000000..6a42a4e22 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_slash_n.rast @@ -0,0 +1 @@ +CHAR "'\\n" error: Missing trailing `'` symbol to terminate the character literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_slash_n.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_slash_n.rs new file mode 100644 index 000000000..78bef7e3e --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_slash_n.rs @@ -0,0 +1 @@ +'\n \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_slash_n.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_slash_n.txt new file mode 100644 index 000000000..6a42a4e22 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_slash_n.txt @@ -0,0 +1 @@ +CHAR "'\\n" error: Missing trailing `'` symbol to terminate the character literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_slash_single_quote.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_slash_single_quote.rast new file mode 100644 index 000000000..1275f6aa8 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_slash_single_quote.rast @@ -0,0 +1 @@ +CHAR "'\\'" error: Missing trailing `'` symbol to terminate the character literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_slash_single_quote.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_slash_single_quote.rs new file mode 100644 index 000000000..a0e722065 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_slash_single_quote.rs @@ -0,0 +1 @@ +'\' \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_slash_single_quote.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_slash_single_quote.txt new file mode 100644 index 000000000..1275f6aa8 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_slash_single_quote.txt @@ -0,0 +1 @@ +CHAR "'\\'" error: Missing trailing `'` symbol to terminate the character literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_space.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_space.rast new file mode 100644 index 000000000..746c425c4 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_space.rast @@ -0,0 +1 @@ +CHAR "' " error: Missing trailing `'` symbol to terminate the character literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_space.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_space.rs new file mode 100644 index 000000000..309ecfe47 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_space.rs @@ -0,0 +1 @@ +' \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_space.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_space.txt new file mode 100644 index 000000000..746c425c4 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_space.txt @@ -0,0 +1 @@ +CHAR "' " error: Missing trailing `'` symbol to terminate the character literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_unicode_escape.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_unicode_escape.rast new file mode 100644 index 000000000..9abd59098 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_unicode_escape.rast @@ -0,0 +1 @@ +CHAR "'\\u{20AA}" error: Missing trailing `'` symbol to terminate the character literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_unicode_escape.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_unicode_escape.rs new file mode 100644 index 000000000..50be91f68 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_unicode_escape.rs @@ -0,0 +1 @@ +'\u{20AA} \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_unicode_escape.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_unicode_escape.txt new file mode 100644 index 000000000..9abd59098 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_unicode_escape.txt @@ -0,0 +1 @@ +CHAR "'\\u{20AA}" error: Missing trailing `'` symbol to terminate the character literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_nested_block_comment_entirely.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_nested_block_comment_entirely.rast new file mode 100644 index 000000000..15ce8905a --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_nested_block_comment_entirely.rast @@ -0,0 +1 @@ +COMMENT "/* /* /*\n" error: Missing trailing `*/` symbols to terminate the block comment diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_nested_block_comment_entirely.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_nested_block_comment_entirely.rs new file mode 100644 index 000000000..3fcfc9660 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_nested_block_comment_entirely.rs @@ -0,0 +1 @@ +/* /* /* diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_nested_block_comment_entirely.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_nested_block_comment_entirely.txt new file mode 100644 index 000000000..15ce8905a --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_nested_block_comment_entirely.txt @@ -0,0 +1 @@ +COMMENT "/* /* /*\n" error: Missing trailing `*/` symbols to terminate the block comment diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_nested_block_comment_partially.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_nested_block_comment_partially.rast new file mode 100644 index 000000000..e9b74ee7f --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_nested_block_comment_partially.rast @@ -0,0 +1 @@ +COMMENT "/** /*! /* comment */ */\n" error: Missing trailing `*/` symbols to terminate the block comment diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_nested_block_comment_partially.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_nested_block_comment_partially.rs new file mode 100644 index 000000000..26c898f01 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_nested_block_comment_partially.rs @@ -0,0 +1 @@ +/** /*! /* comment */ */ diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_nested_block_comment_partially.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_nested_block_comment_partially.txt new file mode 100644 index 000000000..e9b74ee7f --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_nested_block_comment_partially.txt @@ -0,0 +1 @@ +COMMENT "/** /*! /* comment */ */\n" error: Missing trailing `*/` symbols to terminate the block comment diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_at_eof.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_at_eof.rast new file mode 100644 index 000000000..6ec1780c3 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_at_eof.rast @@ -0,0 +1 @@ +BYTE_STRING "br##\"" error: Missing trailing `"` with `#` symbols to terminate the raw byte string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_at_eof.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_at_eof.rs new file mode 100644 index 000000000..ae5bae622 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_at_eof.rs @@ -0,0 +1 @@ +br##" \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_at_eof.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_at_eof.txt new file mode 100644 index 000000000..6ec1780c3 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_at_eof.txt @@ -0,0 +1 @@ +BYTE_STRING "br##\"" error: Missing trailing `"` with `#` symbols to terminate the raw byte string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_ascii_escape.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_ascii_escape.rast new file mode 100644 index 000000000..d65f1bb2f --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_ascii_escape.rast @@ -0,0 +1 @@ +BYTE_STRING "br##\"\\x7f" error: Missing trailing `"` with `#` symbols to terminate the raw byte string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_ascii_escape.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_ascii_escape.rs new file mode 100644 index 000000000..d50270afe --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_ascii_escape.rs @@ -0,0 +1 @@ +br##"\x7f \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_ascii_escape.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_ascii_escape.txt new file mode 100644 index 000000000..d65f1bb2f --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_ascii_escape.txt @@ -0,0 +1 @@ +BYTE_STRING "br##\"\\x7f" error: Missing trailing `"` with `#` symbols to terminate the raw byte string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_ferris.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_ferris.rast new file mode 100644 index 000000000..0f9e0a165 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_ferris.rast @@ -0,0 +1 @@ +BYTE_STRING "br##\"🦀" error: Missing trailing `"` with `#` symbols to terminate the raw byte string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_ferris.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_ferris.rs new file mode 100644 index 000000000..9ef01207a --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_ferris.rs @@ -0,0 +1 @@ +br##"🦀 \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_ferris.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_ferris.txt new file mode 100644 index 000000000..0f9e0a165 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_ferris.txt @@ -0,0 +1 @@ +BYTE_STRING "br##\"🦀" error: Missing trailing `"` with `#` symbols to terminate the raw byte string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_slash.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_slash.rast new file mode 100644 index 000000000..202dcd2d4 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_slash.rast @@ -0,0 +1 @@ +BYTE_STRING "br##\"\\" error: Missing trailing `"` with `#` symbols to terminate the raw byte string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_slash.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_slash.rs new file mode 100644 index 000000000..0b3c015d7 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_slash.rs @@ -0,0 +1 @@ +br##"\ \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_slash.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_slash.txt new file mode 100644 index 000000000..202dcd2d4 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_slash.txt @@ -0,0 +1 @@ +BYTE_STRING "br##\"\\" error: Missing trailing `"` with `#` symbols to terminate the raw byte string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_slash_n.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_slash_n.rast new file mode 100644 index 000000000..d45485b52 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_slash_n.rast @@ -0,0 +1 @@ +BYTE_STRING "br##\"\\n" error: Missing trailing `"` with `#` symbols to terminate the raw byte string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_slash_n.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_slash_n.rs new file mode 100644 index 000000000..0d8b0e7ab --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_slash_n.rs @@ -0,0 +1 @@ +br##"\n \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_slash_n.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_slash_n.txt new file mode 100644 index 000000000..d45485b52 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_slash_n.txt @@ -0,0 +1 @@ +BYTE_STRING "br##\"\\n" error: Missing trailing `"` with `#` symbols to terminate the raw byte string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_space.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_space.rast new file mode 100644 index 000000000..1bfabbc3a --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_space.rast @@ -0,0 +1 @@ +BYTE_STRING "br##\" " error: Missing trailing `"` with `#` symbols to terminate the raw byte string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_space.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_space.rs new file mode 100644 index 000000000..14c602fd2 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_space.rs @@ -0,0 +1 @@ +br##" \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_space.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_space.txt new file mode 100644 index 000000000..1bfabbc3a --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_space.txt @@ -0,0 +1 @@ +BYTE_STRING "br##\" " error: Missing trailing `"` with `#` symbols to terminate the raw byte string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_unicode_escape.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_unicode_escape.rast new file mode 100644 index 000000000..104ab8aae --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_unicode_escape.rast @@ -0,0 +1 @@ +BYTE_STRING "br##\"\\u{20AA}" error: Missing trailing `"` with `#` symbols to terminate the raw byte string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_unicode_escape.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_unicode_escape.rs new file mode 100644 index 000000000..90e299a1a --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_unicode_escape.rs @@ -0,0 +1 @@ +br##"\u{20AA} \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_unicode_escape.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_unicode_escape.txt new file mode 100644 index 000000000..104ab8aae --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_unicode_escape.txt @@ -0,0 +1 @@ +BYTE_STRING "br##\"\\u{20AA}" error: Missing trailing `"` with `#` symbols to terminate the raw byte string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_at_eof.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_at_eof.rast new file mode 100644 index 000000000..71b20fd19 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_at_eof.rast @@ -0,0 +1 @@ +STRING "r##\"" error: Missing trailing `"` with `#` symbols to terminate the raw string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_at_eof.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_at_eof.rs new file mode 100644 index 000000000..557c59b62 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_at_eof.rs @@ -0,0 +1 @@ +r##" \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_at_eof.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_at_eof.txt new file mode 100644 index 000000000..71b20fd19 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_at_eof.txt @@ -0,0 +1 @@ +STRING "r##\"" error: Missing trailing `"` with `#` symbols to terminate the raw string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_ascii_escape.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_ascii_escape.rast new file mode 100644 index 000000000..dc106dd24 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_ascii_escape.rast @@ -0,0 +1 @@ +STRING "r##\"\\x7f" error: Missing trailing `"` with `#` symbols to terminate the raw string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_ascii_escape.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_ascii_escape.rs new file mode 100644 index 000000000..5bec883dc --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_ascii_escape.rs @@ -0,0 +1 @@ +r##"\x7f \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_ascii_escape.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_ascii_escape.txt new file mode 100644 index 000000000..dc106dd24 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_ascii_escape.txt @@ -0,0 +1 @@ +STRING "r##\"\\x7f" error: Missing trailing `"` with `#` symbols to terminate the raw string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_ferris.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_ferris.rast new file mode 100644 index 000000000..30ee029f6 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_ferris.rast @@ -0,0 +1 @@ +STRING "r##\"🦀" error: Missing trailing `"` with `#` symbols to terminate the raw string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_ferris.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_ferris.rs new file mode 100644 index 000000000..bd046e4bb --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_ferris.rs @@ -0,0 +1 @@ +r##"🦀 \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_ferris.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_ferris.txt new file mode 100644 index 000000000..30ee029f6 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_ferris.txt @@ -0,0 +1 @@ +STRING "r##\"🦀" error: Missing trailing `"` with `#` symbols to terminate the raw string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_slash.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_slash.rast new file mode 100644 index 000000000..8a6f6cc43 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_slash.rast @@ -0,0 +1 @@ +STRING "r##\"\\" error: Missing trailing `"` with `#` symbols to terminate the raw string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_slash.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_slash.rs new file mode 100644 index 000000000..9242077b8 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_slash.rs @@ -0,0 +1 @@ +r##"\ \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_slash.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_slash.txt new file mode 100644 index 000000000..8a6f6cc43 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_slash.txt @@ -0,0 +1 @@ +STRING "r##\"\\" error: Missing trailing `"` with `#` symbols to terminate the raw string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_slash_n.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_slash_n.rast new file mode 100644 index 000000000..f46eff251 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_slash_n.rast @@ -0,0 +1 @@ +STRING "r##\"\\n" error: Missing trailing `"` with `#` symbols to terminate the raw string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_slash_n.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_slash_n.rs new file mode 100644 index 000000000..db1c16f2b --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_slash_n.rs @@ -0,0 +1 @@ +r##"\n \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_slash_n.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_slash_n.txt new file mode 100644 index 000000000..f46eff251 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_slash_n.txt @@ -0,0 +1 @@ +STRING "r##\"\\n" error: Missing trailing `"` with `#` symbols to terminate the raw string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_space.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_space.rast new file mode 100644 index 000000000..49b6afea4 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_space.rast @@ -0,0 +1 @@ +STRING "r##\" " error: Missing trailing `"` with `#` symbols to terminate the raw string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_space.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_space.rs new file mode 100644 index 000000000..f104bae4f --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_space.rs @@ -0,0 +1 @@ +r##" \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_space.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_space.txt new file mode 100644 index 000000000..49b6afea4 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_space.txt @@ -0,0 +1 @@ +STRING "r##\" " error: Missing trailing `"` with `#` symbols to terminate the raw string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_unicode_escape.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_unicode_escape.rast new file mode 100644 index 000000000..d10d6d8e8 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_unicode_escape.rast @@ -0,0 +1 @@ +STRING "r##\"\\u{20AA}" error: Missing trailing `"` with `#` symbols to terminate the raw string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_unicode_escape.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_unicode_escape.rs new file mode 100644 index 000000000..bf05c3913 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_unicode_escape.rs @@ -0,0 +1 @@ +r##"\u{20AA} \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_unicode_escape.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_unicode_escape.txt new file mode 100644 index 000000000..d10d6d8e8 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_unicode_escape.txt @@ -0,0 +1 @@ +STRING "r##\"\\u{20AA}" error: Missing trailing `"` with `#` symbols to terminate the raw string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_at_eof.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_at_eof.rast new file mode 100644 index 000000000..3b89ce0ca --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_at_eof.rast @@ -0,0 +1 @@ +STRING "\"" error: Missing trailing `"` symbol to terminate the string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_at_eof.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_at_eof.rs new file mode 100644 index 000000000..9d68933c4 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_at_eof.rs @@ -0,0 +1 @@ +" \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_at_eof.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_at_eof.txt new file mode 100644 index 000000000..3b89ce0ca --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_at_eof.txt @@ -0,0 +1 @@ +STRING "\"" error: Missing trailing `"` symbol to terminate the string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_ascii_escape.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_ascii_escape.rast new file mode 100644 index 000000000..6694cf17a --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_ascii_escape.rast @@ -0,0 +1 @@ +STRING "\"\\x7f" error: Missing trailing `"` symbol to terminate the string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_ascii_escape.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_ascii_escape.rs new file mode 100644 index 000000000..56186a344 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_ascii_escape.rs @@ -0,0 +1 @@ +"\x7f \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_ascii_escape.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_ascii_escape.txt new file mode 100644 index 000000000..6694cf17a --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_ascii_escape.txt @@ -0,0 +1 @@ +STRING "\"\\x7f" error: Missing trailing `"` symbol to terminate the string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_ferris.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_ferris.rast new file mode 100644 index 000000000..5f4501c18 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_ferris.rast @@ -0,0 +1 @@ +STRING "\"🦀" error: Missing trailing `"` symbol to terminate the string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_ferris.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_ferris.rs new file mode 100644 index 000000000..d439b8d2a --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_ferris.rs @@ -0,0 +1 @@ +"🦀 \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_ferris.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_ferris.txt new file mode 100644 index 000000000..5f4501c18 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_ferris.txt @@ -0,0 +1 @@ +STRING "\"🦀" error: Missing trailing `"` symbol to terminate the string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_slash.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_slash.rast new file mode 100644 index 000000000..a8ac565ac --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_slash.rast @@ -0,0 +1 @@ +STRING "\"\\" error: Missing trailing `"` symbol to terminate the string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_slash.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_slash.rs new file mode 100644 index 000000000..00a258400 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_slash.rs @@ -0,0 +1 @@ +"\ \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_slash.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_slash.txt new file mode 100644 index 000000000..a8ac565ac --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_slash.txt @@ -0,0 +1 @@ +STRING "\"\\" error: Missing trailing `"` symbol to terminate the string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_slash_double_quote.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_slash_double_quote.rast new file mode 100644 index 000000000..919183b91 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_slash_double_quote.rast @@ -0,0 +1 @@ +STRING "\"\\\"" error: Missing trailing `"` symbol to terminate the string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_slash_double_quote.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_slash_double_quote.rs new file mode 100644 index 000000000..403c2d6dd --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_slash_double_quote.rs @@ -0,0 +1 @@ +"\" \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_slash_double_quote.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_slash_double_quote.txt new file mode 100644 index 000000000..919183b91 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_slash_double_quote.txt @@ -0,0 +1 @@ +STRING "\"\\\"" error: Missing trailing `"` symbol to terminate the string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_slash_n.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_slash_n.rast new file mode 100644 index 000000000..39e288af9 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_slash_n.rast @@ -0,0 +1 @@ +STRING "\"\\n" error: Missing trailing `"` symbol to terminate the string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_slash_n.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_slash_n.rs new file mode 100644 index 000000000..a0c29b8cf --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_slash_n.rs @@ -0,0 +1 @@ +"\n \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_slash_n.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_slash_n.txt new file mode 100644 index 000000000..39e288af9 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_slash_n.txt @@ -0,0 +1 @@ +STRING "\"\\n" error: Missing trailing `"` symbol to terminate the string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_space.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_space.rast new file mode 100644 index 000000000..dcff94d7e --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_space.rast @@ -0,0 +1 @@ +STRING "\" " error: Missing trailing `"` symbol to terminate the string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_space.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_space.rs new file mode 100644 index 000000000..72cdc841f --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_space.rs @@ -0,0 +1 @@ +" \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_space.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_space.txt new file mode 100644 index 000000000..dcff94d7e --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_space.txt @@ -0,0 +1 @@ +STRING "\" " error: Missing trailing `"` symbol to terminate the string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_unicode_escape.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_unicode_escape.rast new file mode 100644 index 000000000..ac232b530 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_unicode_escape.rast @@ -0,0 +1 @@ +STRING "\"\\u{20AA}" error: Missing trailing `"` symbol to terminate the string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_unicode_escape.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_unicode_escape.rs new file mode 100644 index 000000000..ed24095c3 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_unicode_escape.rs @@ -0,0 +1 @@ +"\u{20AA} \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_unicode_escape.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_unicode_escape.txt new file mode 100644 index 000000000..ac232b530 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_unicode_escape.txt @@ -0,0 +1 @@ +STRING "\"\\u{20AA}" error: Missing trailing `"` symbol to terminate the string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_byte_string_at_eof.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_byte_string_at_eof.rast new file mode 100644 index 000000000..cf942c92f --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_byte_string_at_eof.rast @@ -0,0 +1 @@ +BYTE_STRING "br##" error: Missing `"` symbol after `#` symbols to begin the raw byte string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_byte_string_at_eof.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_byte_string_at_eof.rs new file mode 100644 index 000000000..7e8cadf4f --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_byte_string_at_eof.rs @@ -0,0 +1 @@ +br## \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_byte_string_at_eof.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_byte_string_at_eof.txt new file mode 100644 index 000000000..cf942c92f --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_byte_string_at_eof.txt @@ -0,0 +1 @@ +BYTE_STRING "br##" error: Missing `"` symbol after `#` symbols to begin the raw byte string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_byte_string_with_ascii.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_byte_string_with_ascii.rast new file mode 100644 index 000000000..042769c27 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_byte_string_with_ascii.rast @@ -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 "!" diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_byte_string_with_ascii.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_byte_string_with_ascii.rs new file mode 100644 index 000000000..d9b55455a --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_byte_string_with_ascii.rs @@ -0,0 +1 @@ +br## I lack a quote! \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_byte_string_with_ascii.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_byte_string_with_ascii.txt new file mode 100644 index 000000000..042769c27 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_byte_string_with_ascii.txt @@ -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 "!" diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_string_at_eof.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_string_at_eof.rast new file mode 100644 index 000000000..2f7c7529a --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_string_at_eof.rast @@ -0,0 +1 @@ +STRING "r##" error: Missing `"` symbol after `#` symbols to begin the raw string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_string_at_eof.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_string_at_eof.rs new file mode 100644 index 000000000..eddf8d080 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_string_at_eof.rs @@ -0,0 +1 @@ +r## \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_string_at_eof.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_string_at_eof.txt new file mode 100644 index 000000000..2f7c7529a --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_string_at_eof.txt @@ -0,0 +1 @@ +STRING "r##" error: Missing `"` symbol after `#` symbols to begin the raw string literal diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_string_with_ascii.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_string_with_ascii.rast new file mode 100644 index 000000000..4a06b0abe --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_string_with_ascii.rast @@ -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 "!" diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_string_with_ascii.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_string_with_ascii.rs new file mode 100644 index 000000000..534668a9b --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_string_with_ascii.rs @@ -0,0 +1 @@ +r## I lack a quote! \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_string_with_ascii.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_string_with_ascii.txt new file mode 100644 index 000000000..4a06b0abe --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_string_with_ascii.txt @@ -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 "!" diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/block_comment.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/block_comment.rast new file mode 100644 index 000000000..18bb5cad8 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/block_comment.rast @@ -0,0 +1,6 @@ +COMMENT "/* */" +WHITESPACE "\n" +COMMENT "/**/" +WHITESPACE "\n" +COMMENT "/* /* */ */" +WHITESPACE "\n" diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/block_comment.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/block_comment.rs new file mode 100644 index 000000000..b880a59d9 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/block_comment.rs @@ -0,0 +1,3 @@ +/* */ +/**/ +/* /* */ */ diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/block_comment.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/block_comment.txt new file mode 100644 index 000000000..18bb5cad8 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/block_comment.txt @@ -0,0 +1,6 @@ +COMMENT "/* */" +WHITESPACE "\n" +COMMENT "/**/" +WHITESPACE "\n" +COMMENT "/* /* */ */" +WHITESPACE "\n" diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/byte_strings.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/byte_strings.rast new file mode 100644 index 000000000..c848ac368 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/byte_strings.rast @@ -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" diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/byte_strings.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/byte_strings.rs new file mode 100644 index 000000000..b54930f5e --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/byte_strings.rs @@ -0,0 +1,3 @@ +b'' b'x' b"foo" br"" +b''suf b""ix br""br +b'\n' b'\\' b'\'' b'hello' diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/byte_strings.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/byte_strings.txt new file mode 100644 index 000000000..c848ac368 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/byte_strings.txt @@ -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" diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/chars.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/chars.rast new file mode 100644 index 000000000..66e58cc29 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/chars.rast @@ -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" diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/chars.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/chars.rs new file mode 100644 index 000000000..454ee0a5f --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/chars.rs @@ -0,0 +1 @@ +'x' ' ' '0' 'hello' '\x7f' '\n' '\\' '\'' diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/chars.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/chars.txt new file mode 100644 index 000000000..66e58cc29 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/chars.txt @@ -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" diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/hello.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/hello.rast new file mode 100644 index 000000000..7f5ce9de1 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/hello.rast @@ -0,0 +1,3 @@ +IDENT "hello" +WHITESPACE " " +IDENT "world" diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/hello.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/hello.rs new file mode 100644 index 000000000..95d09f2b1 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/hello.rs @@ -0,0 +1 @@ +hello world \ No newline at end of file diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/hello.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/hello.txt new file mode 100644 index 000000000..7f5ce9de1 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/hello.txt @@ -0,0 +1,3 @@ +IDENT "hello" +WHITESPACE " " +IDENT "world" diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/ident.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/ident.rast new file mode 100644 index 000000000..5689644c0 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/ident.rast @@ -0,0 +1,14 @@ +IDENT "foo" +WHITESPACE " " +IDENT "foo_" +WHITESPACE " " +IDENT "_foo" +WHITESPACE " " +UNDERSCORE "_" +WHITESPACE " " +IDENT "__" +WHITESPACE " " +IDENT "x" +WHITESPACE " " +IDENT "привет" +WHITESPACE "\n" diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/ident.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/ident.rs new file mode 100644 index 000000000..c05c9c009 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/ident.rs @@ -0,0 +1 @@ +foo foo_ _foo _ __ x привет diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/ident.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/ident.txt new file mode 100644 index 000000000..5689644c0 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/ident.txt @@ -0,0 +1,14 @@ +IDENT "foo" +WHITESPACE " " +IDENT "foo_" +WHITESPACE " " +IDENT "_foo" +WHITESPACE " " +UNDERSCORE "_" +WHITESPACE " " +IDENT "__" +WHITESPACE " " +IDENT "x" +WHITESPACE " " +IDENT "привет" +WHITESPACE "\n" diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/keywords.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/keywords.rast new file mode 100644 index 000000000..e19b1399a --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/keywords.rast @@ -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" diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/keywords.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/keywords.rs new file mode 100644 index 000000000..1e91bff4e --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/keywords.rs @@ -0,0 +1,3 @@ +async fn use struct trait enum impl true false as extern crate +mod pub self super in where for loop while if match const +static mut type ref let else move return diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/keywords.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/keywords.txt new file mode 100644 index 000000000..e19b1399a --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/keywords.txt @@ -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" diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/lifetimes.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/lifetimes.rast new file mode 100644 index 000000000..eeb1e9541 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/lifetimes.rast @@ -0,0 +1,8 @@ +LIFETIME_IDENT "'a" +WHITESPACE " " +LIFETIME_IDENT "'foo" +WHITESPACE " " +LIFETIME_IDENT "'foo_bar_baz" +WHITESPACE " " +LIFETIME_IDENT "'_" +WHITESPACE "\n" diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/lifetimes.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/lifetimes.rs new file mode 100644 index 000000000..b764f1dce --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/lifetimes.rs @@ -0,0 +1 @@ +'a 'foo 'foo_bar_baz '_ diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/lifetimes.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/lifetimes.txt new file mode 100644 index 000000000..eeb1e9541 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/lifetimes.txt @@ -0,0 +1,8 @@ +LIFETIME_IDENT "'a" +WHITESPACE " " +LIFETIME_IDENT "'foo" +WHITESPACE " " +LIFETIME_IDENT "'foo_bar_baz" +WHITESPACE " " +LIFETIME_IDENT "'_" +WHITESPACE "\n" diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/numbers.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/numbers.rast new file mode 100644 index 000000000..8d13c3f61 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/numbers.rast @@ -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" diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/numbers.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/numbers.rs new file mode 100644 index 000000000..bc761c235 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/numbers.rs @@ -0,0 +1,9 @@ +0 00 0_ 0. 0z +01790 0b1790 0o1790 0x1790aAbBcCdDeEfF 001279 0_1279 0.1279 0e1279 0E1279 +0..2 +0.foo() +0e+1 +0.e+1 +0.0E-2 +0___0.10000____0000e+111__ +1i64 92.0f32 11__s diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/numbers.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/numbers.txt new file mode 100644 index 000000000..8d13c3f61 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/numbers.txt @@ -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" diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/raw_ident.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/raw_ident.rast new file mode 100644 index 000000000..fddad9982 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/raw_ident.rast @@ -0,0 +1,2 @@ +IDENT "r#raw_ident" +WHITESPACE "\n" diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/raw_ident.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/raw_ident.rs new file mode 100644 index 000000000..b40a1b6a2 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/raw_ident.rs @@ -0,0 +1 @@ +r#raw_ident diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/raw_ident.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/raw_ident.txt new file mode 100644 index 000000000..fddad9982 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/raw_ident.txt @@ -0,0 +1,2 @@ +IDENT "r#raw_ident" +WHITESPACE "\n" diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/raw_strings.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/raw_strings.rast new file mode 100644 index 000000000..13cf733b7 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/raw_strings.rast @@ -0,0 +1,2 @@ +STRING "r###\"this is a r##\"raw\"## string\"###" +WHITESPACE "\n" diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/raw_strings.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/raw_strings.rs new file mode 100644 index 000000000..e5ed0b693 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/raw_strings.rs @@ -0,0 +1 @@ +r###"this is a r##"raw"## string"### diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/raw_strings.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/raw_strings.txt new file mode 100644 index 000000000..13cf733b7 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/raw_strings.txt @@ -0,0 +1,2 @@ +STRING "r###\"this is a r##\"raw\"## string\"###" +WHITESPACE "\n" diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/single_line_comments.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/single_line_comments.rast new file mode 100644 index 000000000..a7681e9f5 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/single_line_comments.rast @@ -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" diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/single_line_comments.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/single_line_comments.rs new file mode 100644 index 000000000..4b6653f9c --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/single_line_comments.rs @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +// hello +//! World +//!! Inner line doc +/// Outer line doc +//// Just a comment + +// +//! +//!! +/// +//// diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/single_line_comments.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/single_line_comments.txt new file mode 100644 index 000000000..a7681e9f5 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/single_line_comments.txt @@ -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" diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/strings.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/strings.rast new file mode 100644 index 000000000..ec222591b --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/strings.rast @@ -0,0 +1,8 @@ +STRING "\"hello\"" +WHITESPACE " " +STRING "r\"world\"" +WHITESPACE " " +STRING "\"\\n\\\"\\\\no escape\"" +WHITESPACE " " +STRING "\"multi\nline\"" +WHITESPACE "\n" diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/strings.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/strings.rs new file mode 100644 index 000000000..4ddb5bffc --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/strings.rs @@ -0,0 +1,2 @@ +"hello" r"world" "\n\"\\no escape" "multi +line" diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/strings.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/strings.txt new file mode 100644 index 000000000..ec222591b --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/strings.txt @@ -0,0 +1,8 @@ +STRING "\"hello\"" +WHITESPACE " " +STRING "r\"world\"" +WHITESPACE " " +STRING "\"\\n\\\"\\\\no escape\"" +WHITESPACE " " +STRING "\"multi\nline\"" +WHITESPACE "\n" diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/symbols.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/symbols.rast new file mode 100644 index 000000000..533ccff9a --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/symbols.rast @@ -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" diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/symbols.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/symbols.rs new file mode 100644 index 000000000..487569b5a --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/symbols.rs @@ -0,0 +1,6 @@ +; , ( ) { } [ ] < > @ # ~ ? $ & | + * / ^ % +. .. ... ..= +: :: += => +! != +- -> diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/symbols.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/symbols.txt new file mode 100644 index 000000000..533ccff9a --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/symbols.txt @@ -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" diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/whitespace.rast b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/whitespace.rast new file mode 100644 index 000000000..8ccb79e4e --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/whitespace.rast @@ -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" diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/whitespace.rs b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/whitespace.rs new file mode 100644 index 000000000..08fce1418 --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/whitespace.rs @@ -0,0 +1,4 @@ +a b c +d + +e f diff --git a/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/whitespace.txt b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/whitespace.txt new file mode 100644 index 000000000..8ccb79e4e --- /dev/null +++ b/src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/whitespace.txt @@ -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" -- cgit v1.2.3