Files
tree-sitter-jhcl/test/corpus/comments.txt
Michael Hoffmann 636dbe7030 grammar: remove shim again
Signed-off-by: Michael Hoffmann <mhoffm@posteo.de>
2023-07-25 19:21:31 +02:00

156 lines
3.4 KiB
Plaintext

================================================================================
comment in empty block body
================================================================================
block {
# foo
}
--------------------------------------------------------------------------------
(config_file
(body
(block
(identifier)
(block_start)
(comment)
(block_end))))
================================================================================
multiline comment in empty block body
================================================================================
block {
/*
foo
*/
}
--------------------------------------------------------------------------------
(config_file
(body
(block
(identifier)
(block_start)
(comment)
(block_end))))
================================================================================
multiline comment above attribute in block body
================================================================================
block {
/*
foo
*/
foo = bar
}
--------------------------------------------------------------------------------
(config_file
(body
(block
(identifier)
(block_start)
(comment)
(body
(attribute
(identifier)
(expression
(variable_expr
(identifier)))))
(block_end))))
================================================================================
comment above first attribute in block body
================================================================================
block {
# foo
foo = bar
}
--------------------------------------------------------------------------------
(config_file
(body
(block
(identifier)
(block_start)
(comment)
(body
(attribute
(identifier)
(expression
(variable_expr
(identifier)))))
(block_end))))
================================================================================
comment after last attribute in block body
================================================================================
block {
foo = bar
# foo
}
--------------------------------------------------------------------------------
(config_file
(body
(block
(identifier)
(block_start)
(body
(attribute
(identifier)
(expression
(variable_expr
(identifier)))))
(comment)
(block_end))))
================================================================================
comment between attributes in block body
================================================================================
block {
foo = bar
# foo
baz = quz
}
--------------------------------------------------------------------------------
(config_file
(body
(block
(identifier)
(block_start)
(body
(attribute
(identifier)
(expression
(variable_expr
(identifier))))
(comment)
(attribute
(identifier)
(expression
(variable_expr
(identifier)))))
(block_end))))
================================================================================
comment at end of file
================================================================================
# foo
--------------------------------------------------------------------------------
(config_file
(comment))