tree-sitter-tiger/test/corpus/comments.txt
Bruno BELANYI 50a0eaa071 Add support for nested comments
Unfortunately, the 'extras' array expects single tokens only, so one
can't really use a recursive parsing rule to express nesting comments...
2022-06-02 22:20:37 +02:00

81 lines
2.1 KiB
Plaintext

================================================================================
Empty comment
================================================================================
/**/
--------------------------------------------------------------------------------
(source_file
(comment))
================================================================================
Whitespace comment
================================================================================
/* */
--------------------------------------------------------------------------------
(source_file
(comment))
================================================================================
Comment
================================================================================
/* This is a comment */
--------------------------------------------------------------------------------
(source_file
(comment))
================================================================================
Comment with slashes
================================================================================
/* /// */
--------------------------------------------------------------------------------
(source_file
(comment))
================================================================================
Nested comment
================================================================================
/* This is /* a /* nested */ comment */*/
--------------------------------------------------------------------------------
(source_file
(comment))
================================================================================
Unterminated comment
================================================================================
/*
--------------------------------------------------------------------------------
(source_file
(ERROR
(operator)
(operator)))
================================================================================
Comment end-delimiter only
================================================================================
*/
--------------------------------------------------------------------------------
(source_file
(ERROR
(operator)
(operator)))