add precedence to splat operators; test for associativity

This commit is contained in:
mhoffm
2021-06-18 07:29:00 +02:00
parent b793cd7c37
commit 9b79cbda48
5 changed files with 6585 additions and 6476 deletions

View File

@@ -480,57 +480,53 @@
]
},
"attr_splat": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "."
},
{
"type": "STRING",
"value": "*"
},
{
"type": "REPEAT",
"content": {
"type": "SYMBOL",
"name": "get_attr"
"type": "PREC_RIGHT",
"value": 0,
"content": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": ".*"
},
{
"type": "REPEAT",
"content": {
"type": "SYMBOL",
"name": "get_attr"
}
}
}
]
]
}
},
"full_splat": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "["
},
{
"type": "STRING",
"value": "*"
},
{
"type": "STRING",
"value": "]"
},
{
"type": "REPEAT",
"content": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "get_attr"
},
{
"type": "SYMBOL",
"name": "index"
}
]
"type": "PREC_RIGHT",
"value": 0,
"content": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "[*]"
},
{
"type": "REPEAT",
"content": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "get_attr"
},
{
"type": "SYMBOL",
"name": "index"
}
]
}
}
}
]
]
}
},
"for_expr": {
"type": "CHOICE",
@@ -1210,12 +1206,6 @@
}
],
"conflicts": [
[
"attr_splat"
],
[
"full_splat"
],
[
"string_lit",
"quoted_template"