tree-sitter-tiger/test/corpus/comments.txt

133 lines
3.4 KiB
Plaintext
Raw Normal View History

================================================================================
Empty comment
================================================================================
/**/
--------------------------------------------------------------------------------
(source_file
(comment))
================================================================================
Whitespace comment
================================================================================
/* */
--------------------------------------------------------------------------------
(source_file
(comment))
================================================================================
Comment
================================================================================
/* This is a comment */
--------------------------------------------------------------------------------
(source_file
(comment))
================================================================================
Comment with slashes
================================================================================
/* /// */
--------------------------------------------------------------------------------
2022-06-02 22:14:03 +02:00
(source_file
(comment))
================================================================================
Comment with asterisks
================================================================================
/*****/
--------------------------------------------------------------------------------
(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)))
================================================================================
Comment in real code
================================================================================
let
/* This is a comment */
var a := 12
/* This is an other comment */
var b := 27
/* Yet another comment */
in
/* This is the final comment */
(a + b) <> 42
/* Sike! This is the *actual* final comment */
end
--------------------------------------------------------------------------------
(source_file
(let_expression
(comment)
(variable_declaration
(identifier)
2022-06-03 11:42:57 +02:00
(operator)
(integer_literal))
(comment)
(variable_declaration
(identifier)
2022-06-03 11:42:57 +02:00
(operator)
(integer_literal))
(comment)
(comment)
(binary_expression
(sequence_expression
(binary_expression
(identifier)
(operator)
(identifier)))
(operator)
(integer_literal))
(comment)))