Files
tree-sitter-jhcl/test/corpus/blocks.txt

113 lines
2.5 KiB
Plaintext

================================================================================
basic block
================================================================================
block_1 {
}
--------------------------------------------------------------------------------
(config_file
(body
(block
(identifier)
(body))))
================================================================================
basic block on one line
================================================================================
block_1 {}
--------------------------------------------------------------------------------
(config_file
(body
(block
(identifier))))
================================================================================
block with attribute
================================================================================
block_1 "strlit1" "strlit2" {
attr1 = "val1"
}
--------------------------------------------------------------------------------
(config_file
(body
(block
(identifier)
(string_lit
(template_literal))
(string_lit
(template_literal))
(body
(attribute
(identifier)
(expression
(literal_value
(string_lit
(template_literal)))))))))
================================================================================
nested block
================================================================================
block_1 {
block_2 {
}
}
--------------------------------------------------------------------------------
(config_file
(body
(block
(identifier)
(body
(block
(identifier)
(body))))))
================================================================================
nested block on one line
================================================================================
block_1 {
block_2 {}
}
--------------------------------------------------------------------------------
(config_file
(body
(block
(identifier)
(body
(block
(identifier))))))
================================================================================
nested blocks
================================================================================
block_1 {
block_2 {}
block_3 {}
}
--------------------------------------------------------------------------------
(config_file
(body
(block
(identifier)
(body
(block
(identifier))
(block
(identifier))))))