tests
This commit is contained in:
@@ -10,10 +10,7 @@ pi = 3
|
|||||||
(body
|
(body
|
||||||
(attribute
|
(attribute
|
||||||
(identifier)
|
(identifier)
|
||||||
(expression
|
(expression (expr_term (literal_value (numeric_lit)))))))
|
||||||
(expr_term
|
|
||||||
(literal_value
|
|
||||||
(numeric_lit)))))))
|
|
||||||
|
|
||||||
==================
|
==================
|
||||||
numeric literal scientific notation 2
|
numeric literal scientific notation 2
|
||||||
@@ -27,10 +24,7 @@ pi = 3.14
|
|||||||
(body
|
(body
|
||||||
(attribute
|
(attribute
|
||||||
(identifier)
|
(identifier)
|
||||||
(expression
|
(expression (expr_term (literal_value (numeric_lit)))))))
|
||||||
(expr_term
|
|
||||||
(literal_value
|
|
||||||
(numeric_lit)))))))
|
|
||||||
|
|
||||||
==================
|
==================
|
||||||
numeric literal scientific notation 3
|
numeric literal scientific notation 3
|
||||||
@@ -44,10 +38,7 @@ big_pi = 3.14e+10
|
|||||||
(body
|
(body
|
||||||
(attribute
|
(attribute
|
||||||
(identifier)
|
(identifier)
|
||||||
(expression
|
(expression (expr_term (literal_value (numeric_lit)))))))
|
||||||
(expr_term
|
|
||||||
(literal_value
|
|
||||||
(numeric_lit)))))))
|
|
||||||
|
|
||||||
==================
|
==================
|
||||||
numeric literal scientific notation 4
|
numeric literal scientific notation 4
|
||||||
@@ -61,10 +52,7 @@ big_pi = 3.14E+10
|
|||||||
(body
|
(body
|
||||||
(attribute
|
(attribute
|
||||||
(identifier)
|
(identifier)
|
||||||
(expression
|
(expression (expr_term (literal_value (numeric_lit)))))))
|
||||||
(expr_term
|
|
||||||
(literal_value
|
|
||||||
(numeric_lit)))))))
|
|
||||||
|
|
||||||
==================
|
==================
|
||||||
numeric literal scientific notation 5
|
numeric literal scientific notation 5
|
||||||
@@ -78,10 +66,7 @@ small_pi = 3.14e-10
|
|||||||
(body
|
(body
|
||||||
(attribute
|
(attribute
|
||||||
(identifier)
|
(identifier)
|
||||||
(expression
|
(expression (expr_term (literal_value (numeric_lit)))))))
|
||||||
(expr_term
|
|
||||||
(literal_value
|
|
||||||
(numeric_lit)))))))
|
|
||||||
|
|
||||||
|
|
||||||
==================
|
==================
|
||||||
@@ -96,10 +81,7 @@ small_pi = 3.14E-10
|
|||||||
(body
|
(body
|
||||||
(attribute
|
(attribute
|
||||||
(identifier)
|
(identifier)
|
||||||
(expression
|
(expression (expr_term (literal_value (numeric_lit)))))))
|
||||||
(expr_term
|
|
||||||
(literal_value
|
|
||||||
(numeric_lit)))))))
|
|
||||||
|
|
||||||
==================
|
==================
|
||||||
bool literal true
|
bool literal true
|
||||||
@@ -113,10 +95,7 @@ foo = true
|
|||||||
(body
|
(body
|
||||||
(attribute
|
(attribute
|
||||||
(identifier)
|
(identifier)
|
||||||
(expression
|
(expression (expr_term (literal_value (bool_lit)))))))
|
||||||
(expr_term
|
|
||||||
(literal_value
|
|
||||||
(bool_lit)))))))
|
|
||||||
|
|
||||||
==================
|
==================
|
||||||
bool literal false
|
bool literal false
|
||||||
@@ -130,10 +109,7 @@ foo = false
|
|||||||
(body
|
(body
|
||||||
(attribute
|
(attribute
|
||||||
(identifier)
|
(identifier)
|
||||||
(expression
|
(expression (expr_term (literal_value (bool_lit)))))))
|
||||||
(expr_term
|
|
||||||
(literal_value
|
|
||||||
(bool_lit)))))))
|
|
||||||
|
|
||||||
==================
|
==================
|
||||||
null literal
|
null literal
|
||||||
@@ -147,10 +123,7 @@ foo = null
|
|||||||
(body
|
(body
|
||||||
(attribute
|
(attribute
|
||||||
(identifier)
|
(identifier)
|
||||||
(expression
|
(expression (expr_term (literal_value (null_lit)))))))
|
||||||
(expr_term
|
|
||||||
(literal_value
|
|
||||||
(null_lit)))))))
|
|
||||||
|
|
||||||
==================
|
==================
|
||||||
string literal one line
|
string literal one line
|
||||||
@@ -164,10 +137,7 @@ foo = "bar"
|
|||||||
(body
|
(body
|
||||||
(attribute
|
(attribute
|
||||||
(identifier)
|
(identifier)
|
||||||
(expression
|
(expression (expr_term (literal_value (string_lit)))))))
|
||||||
(expr_term
|
|
||||||
(literal_value
|
|
||||||
(string_lit)))))))
|
|
||||||
|
|
||||||
==================
|
==================
|
||||||
string literal escaped newline
|
string literal escaped newline
|
||||||
@@ -296,3 +266,17 @@ foo = "foo bar"
|
|||||||
(identifier)
|
(identifier)
|
||||||
(expression (expr_term (literal_value (string_lit (ERROR (UNEXPECTED 'b')))))))))
|
(expression (expr_term (literal_value (string_lit (ERROR (UNEXPECTED 'b')))))))))
|
||||||
|
|
||||||
|
==================
|
||||||
|
string literal unescaped backslash
|
||||||
|
==================
|
||||||
|
|
||||||
|
foo = "foo\bar"
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
(config_file
|
||||||
|
(body
|
||||||
|
(attribute
|
||||||
|
(identifier)
|
||||||
|
(expression (expr_term (literal_value (string_lit (ERROR (UNEXPECTED 'b')))))))))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user