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

160 lines
4.1 KiB
Plaintext
Raw Normal View History

================================================================================
numeric literal hex 1
================================================================================
pi = 0x314F
--------------------------------------------------------------------------------
(config_file
(body
(attribute
(identifier)
(expression
(literal_value
(numeric_lit))))))
================================================================================
2021-06-08 23:31:40 +02:00
numeric literal scientific notation 1
================================================================================
2021-06-08 23:31:40 +02:00
pi = 3
--------------------------------------------------------------------------------
2021-06-08 23:31:40 +02:00
(config_file
(body
(attribute
(identifier)
(expression
(literal_value
(numeric_lit))))))
2021-06-08 23:31:40 +02:00
================================================================================
2021-06-08 23:31:40 +02:00
numeric literal scientific notation 2
================================================================================
2021-06-08 23:31:40 +02:00
pi = 3.14
--------------------------------------------------------------------------------
2021-06-08 23:31:40 +02:00
(config_file
(body
(attribute
(identifier)
(expression
(literal_value
(numeric_lit))))))
2021-06-08 23:31:40 +02:00
================================================================================
2021-06-08 23:31:40 +02:00
numeric literal scientific notation 3
================================================================================
2021-06-08 23:31:40 +02:00
big_pi = 3.14e+10
--------------------------------------------------------------------------------
2021-06-08 23:31:40 +02:00
(config_file
(body
(attribute
(identifier)
(expression
(literal_value
(numeric_lit))))))
2021-06-08 23:31:40 +02:00
================================================================================
2021-06-08 23:31:40 +02:00
numeric literal scientific notation 4
================================================================================
2021-06-08 23:31:40 +02:00
big_pi = 3.14E+10
--------------------------------------------------------------------------------
2021-06-08 23:31:40 +02:00
(config_file
(body
(attribute
(identifier)
(expression
(literal_value
(numeric_lit))))))
2021-06-08 23:31:40 +02:00
================================================================================
2021-06-08 23:31:40 +02:00
numeric literal scientific notation 5
================================================================================
2021-06-08 23:31:40 +02:00
small_pi = 3.14e-10
--------------------------------------------------------------------------------
2021-06-08 23:31:40 +02:00
(config_file
(body
(attribute
(identifier)
(expression
(literal_value
(numeric_lit))))))
2021-06-08 23:31:40 +02:00
================================================================================
2021-06-08 23:31:40 +02:00
numeric literal scientific notation 6
================================================================================
2021-06-08 23:31:40 +02:00
small_pi = 3.14E-10
--------------------------------------------------------------------------------
2021-06-08 23:31:40 +02:00
(config_file
(body
(attribute
(identifier)
(expression
(literal_value
(numeric_lit))))))
2021-06-08 23:31:40 +02:00
================================================================================
bool literal true
================================================================================
2021-06-08 23:31:40 +02:00
foo = true
2021-06-08 23:31:40 +02:00
--------------------------------------------------------------------------------
2021-06-08 23:31:40 +02:00
(config_file
(body
(attribute
(identifier)
(expression
(literal_value
(bool_lit))))))
2021-06-08 23:31:40 +02:00
================================================================================
bool literal false
================================================================================
2021-06-11 23:32:22 +02:00
foo = false
2021-06-11 23:32:22 +02:00
--------------------------------------------------------------------------------
2021-06-11 23:32:22 +02:00
(config_file
(body
(attribute
(identifier)
(expression
(literal_value
(bool_lit))))))
2021-06-11 23:32:22 +02:00
================================================================================
null literal
================================================================================
2021-06-08 23:31:40 +02:00
foo = null
2021-06-08 23:31:40 +02:00
--------------------------------------------------------------------------------
2021-06-08 23:31:40 +02:00
(config_file
(body
(attribute
(identifier)
(expression
(literal_value
(null_lit))))))