Skip to content

Commit

Permalink
bless test corpus
Browse files Browse the repository at this point in the history
  • Loading branch information
mrnossiom committed Sep 3, 2024
1 parent 71ce23b commit 796f2e5
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 23 deletions.
12 changes: 8 additions & 4 deletions test/corpus/declarations.txt
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,8 @@ pub unsafe extern "C" fn c_variadic_no_use(fmt: *const i8, mut ap: ...) -> i32 {
(identifier)))
(primitive_type)
(block
(line_comment)
(line_comment
(comment))
(call_expression
(identifier)
(arguments
Expand All @@ -345,7 +346,8 @@ pub unsafe extern "C" fn c_variadic_no_use(fmt: *const i8, mut ap: ...) -> i32 {
(identifier)
(field_identifier))
(arguments))))
(line_comment))))
(line_comment
(comment)))))

================================================================================
Use declarations
Expand Down Expand Up @@ -1318,7 +1320,8 @@ pub enum Error {
--------------------------------------------------------------------------------

(source_file
(line_comment)
(line_comment
(comment))
(use_declaration
(scoped_identifier
(identifier)
Expand Down Expand Up @@ -1614,7 +1617,8 @@ impl Foo {
(parameters)
(primitive_type)
(block
(line_comment)
(line_comment
(comment))
(expression_statement
(call_expression
(field_expression
Expand Down
6 changes: 4 additions & 2 deletions test/corpus/macros.txt
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,10 @@ ok! {
(macro_invocation
(identifier)
(token_tree
(line_comment)
(block_comment))))
(line_comment
(comment))
(block_comment
(comment)))))

================================================================================
Macro definition
Expand Down
51 changes: 34 additions & 17 deletions test/corpus/source_files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ Block comments
----

(source_file
(block_comment)
(block_comment)
(block_comment
comment: (comment))
(block_comment
comment: (comment))
(block_comment
outer: (outer_doc_comment_marker)
doc: (doc_comment))
Expand Down Expand Up @@ -51,12 +53,18 @@ Nested block comments
----

(source_file
(block_comment)
(line_comment)
(block_comment)
(line_comment)
(block_comment)
(line_comment))
(block_comment
(comment))
(line_comment
(comment))
(block_comment
(comment))
(line_comment
(comment))
(block_comment
(comment))
(line_comment
(comment)))

============================================
Line comments
Expand All @@ -71,7 +79,8 @@ Line comments
----

(source_file
(line_comment)
(line_comment
comment: (comment))
(line_comment
outer: (outer_doc_comment_marker)
doc: (doc_comment))
Expand Down Expand Up @@ -99,14 +108,16 @@ Line doc comments
(line_comment
inner: (inner_doc_comment_marker)
doc: (doc_comment))
(line_comment)
(line_comment
comment: (comment))
(line_comment
outer: (outer_doc_comment_marker)
doc: (doc_comment))
(line_comment
outer: (outer_doc_comment_marker)
doc: (doc_comment))
(line_comment))
(line_comment
comment: (comment)))

====================================
Block doc comments
Expand All @@ -128,11 +139,13 @@ Block doc comments
(block_comment
inner: (inner_doc_comment_marker)
doc: (doc_comment))
(block_comment)
(block_comment
comment: (comment))
(block_comment
outer: (outer_doc_comment_marker)
doc: (doc_comment))
(block_comment))
(block_comment
comment: (comment)))

=====================================
Nested doc block comments
Expand All @@ -145,7 +158,8 @@ Nested doc block comments
----

(source_file
(block_comment)
(block_comment
comment: (comment))
(block_comment
inner: (inner_doc_comment_marker)
doc: (doc_comment))
Expand Down Expand Up @@ -178,15 +192,18 @@ let x; // <- immediate item after an empty line doc comment
(doc_comment))
(block_comment
(inner_doc_comment_marker))
(line_comment)
(line_comment
(comment))
(line_comment
(outer_doc_comment_marker)
(doc_comment))
(let_declaration
(identifier))
(line_comment)
(line_comment
(comment))
(block_comment)
(block_comment))
(block_comment
(comment)))

================================================================================
Line doc comment with no EOL
Expand Down

0 comments on commit 796f2e5

Please sign in to comment.