add precedence to conditionals; add test for conditional associativity
This commit is contained in:
@@ -798,29 +798,33 @@
|
||||
}
|
||||
},
|
||||
"conditional": {
|
||||
"type": "SEQ",
|
||||
"members": [
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "expression"
|
||||
},
|
||||
{
|
||||
"type": "STRING",
|
||||
"value": "?"
|
||||
},
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "expression"
|
||||
},
|
||||
{
|
||||
"type": "STRING",
|
||||
"value": ":"
|
||||
},
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "expression"
|
||||
}
|
||||
]
|
||||
"type": "PREC_LEFT",
|
||||
"value": 0,
|
||||
"content": {
|
||||
"type": "SEQ",
|
||||
"members": [
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "expression"
|
||||
},
|
||||
{
|
||||
"type": "STRING",
|
||||
"value": "?"
|
||||
},
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "expression"
|
||||
},
|
||||
{
|
||||
"type": "STRING",
|
||||
"value": ":"
|
||||
},
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "expression"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"operation": {
|
||||
"type": "CHOICE",
|
||||
@@ -1228,9 +1232,6 @@
|
||||
[
|
||||
"full_splat"
|
||||
],
|
||||
[
|
||||
"conditional"
|
||||
],
|
||||
[
|
||||
"string_lit",
|
||||
"quoted_template"
|
||||
|
||||
1290
src/parser.c
1290
src/parser.c
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user