tree-sitter-bp/test/corpus/comments.txt
Bruno BELANYI be1e3f07d3 Make 'line_comment' more explicit about newlines
Because of the way regular expressions work, they were already bounded
at newlines here, but explicit is better than implicit :-).
2024-04-10 15:20:29 +00:00

141 lines
3.7 KiB
Plaintext

================================================================================
Empty comment
================================================================================
//
--------------------------------------------------------------------------------
(source_file
(line_comment))
================================================================================
Single comment
================================================================================
// This is a comment
--------------------------------------------------------------------------------
(source_file
(line_comment))
================================================================================
Multiple comments
================================================================================
// This is a comment
// This is a second comment
--------------------------------------------------------------------------------
(source_file
(line_comment)
(line_comment))
================================================================================
Empty block comment
================================================================================
/**/
--------------------------------------------------------------------------------
(source_file
(block_comment))
================================================================================
Whitespace block comment
================================================================================
/* */
--------------------------------------------------------------------------------
(source_file
(block_comment))
================================================================================
Block comment
================================================================================
/* This is a comment */
--------------------------------------------------------------------------------
(source_file
(block_comment))
================================================================================
Block comment with slashes
================================================================================
/* /// */
--------------------------------------------------------------------------------
(source_file
(block_comment))
================================================================================
Block comment with asterisks
================================================================================
/* *** */
--------------------------------------------------------------------------------
(source_file
(block_comment))
================================================================================
Block comment (multiline)
================================================================================
/*
This
is
a
long
comment
*/
--------------------------------------------------------------------------------
(source_file
(block_comment))
================================================================================
Block comment is not recursive
================================================================================
/* /* */
--------------------------------------------------------------------------------
(source_file
(block_comment))
================================================================================
Unterminated comment
================================================================================
/*
--------------------------------------------------------------------------------
(source_file
(ERROR))
================================================================================
Comment end-delimiter only
================================================================================
*/
--------------------------------------------------------------------------------
(source_file
(ERROR
(UNEXPECTED '*')))