tree-sitter-bp/test/corpus/comments.txt
Bruno BELANYI 2b7323eaf0
All checks were successful
ci/woodpecker/push/check Pipeline was successful
Test non-recursive comments
2025-03-24 12:07:55 +00:00

153 lines
4 KiB
Text

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