Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 1 Packages Projects Releases Wiki Activity
Files
227490c06935d7f901b027621ef77d85aa7cac8a
rust/crates/syntax/test_data/parser/ok/0065_comment_newline.rast

18 lines
402 B
Plaintext
Raw Normal View History

Convert tests to text-size
2020-04-24 23:51:02 +02:00
SOURCE_FILE@0..26
Rename FnDef -> Fn
2020-07-30 14:51:08 +02:00
FN@0..25
Convert tests to text-size
2020-04-24 23:51:02 +02:00
COMMENT@0..11 "/// Example"
WHITESPACE@11..13 "\n\n"
FN_KW@13..15 "fn"
WHITESPACE@15..16 " "
NAME@16..20
IDENT@16..20 "test"
PARAM_LIST@20..22
L_PAREN@20..21 "("
R_PAREN@21..22 ")"
WHITESPACE@22..23 " "
BLOCK_EXPR@23..25
internal: more reasonable grammar for blocks Consider these expples { 92 } async { 92 } 'a: { 92 } #[a] { 92 } Previously the tree for them were BLOCK_EXPR { ... } EFFECT_EXPR async BLOCK_EXPR { ... } EFFECT_EXPR 'a: BLOCK_EXPR { ... } BLOCK_EXPR #[a] { ... } As you see, it gets progressively worse :) The last two items are especially odd. The last one even violates the balanced curleys invariant we have (#10357) The new approach is to say that the stuff in `{}` is stmt_list, and the block is stmt_list + optional modifiers BLOCK_EXPR STMT_LIST { ... } BLOCK_EXPR async STMT_LIST { ... } BLOCK_EXPR 'a: STMT_LIST { ... } BLOCK_EXPR #[a] STMT_LIST { ... }
2021-09-26 12:12:57 +03:00
STMT_LIST@23..25
L_CURLY@23..24 "{"
R_CURLY@24..25 "}"
Convert tests to text-size
2020-04-24 23:51:02 +02:00
WHITESPACE@25..26 "\n"
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 336ms Template: 4ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API