add precedence to conditionals; add test for conditional associativity

This commit is contained in:
mhoffm
2021-06-18 07:17:21 +02:00
parent b04366fc76
commit f4b4b4f026
4 changed files with 706 additions and 677 deletions

View File

@@ -56,3 +56,37 @@ foo = ( true ? false : true ) ? "yes" : "no"
(literal_value
(string_lit
(template_literal)))))))))
================================================================================
nested conditional expression expression without parentheses
================================================================================
foo = true ? false : true ? "yes" : "no"
--------------------------------------------------------------------------------
(config_file
(body
(attribute
(identifier)
(expression
(conditional
(expression
(conditional
(expression
(literal_value
(bool_lit)))
(expression
(literal_value
(bool_lit)))
(expression
(literal_value
(bool_lit)))))
(expression
(literal_value
(string_lit
(template_literal))))
(expression
(literal_value
(string_lit
(template_literal)))))))))