Skip to content

Commit

Permalink
0.0.39
Browse files Browse the repository at this point in the history
  • Loading branch information
jkbz64 committed Sep 18, 2024
1 parent b3b9e48 commit 3415acb
Show file tree
Hide file tree
Showing 4 changed files with 158,480 additions and 151,455 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@usagi-coffee/tree-sitter-abl",
"version": "0.0.38",
"version": "0.0.39",
"description": "ABL grammar for tree-sitter",
"main": "bindings/node",
"scripts": {
Expand Down
181 changes: 112 additions & 69 deletions src/grammar.json
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@
},
"logical_expression": {
"type": "PREC_RIGHT",
"value": 2,
"value": 3,
"content": {
"type": "SEQ",
"members": [
Expand Down Expand Up @@ -593,7 +593,7 @@
"members": [
{
"type": "PREC_LEFT",
"value": 7,
"value": 8,
"content": {
"type": "SEQ",
"members": [
Expand Down Expand Up @@ -626,7 +626,7 @@
},
{
"type": "PREC_LEFT",
"value": 2,
"value": 3,
"content": {
"type": "SEQ",
"members": [
Expand All @@ -648,7 +648,7 @@
},
{
"type": "PREC_LEFT",
"value": 2,
"value": 3,
"content": {
"type": "SYMBOL",
"name": "_expression"
Expand Down Expand Up @@ -895,7 +895,7 @@
},
"additive_expression": {
"type": "PREC_LEFT",
"value": 4,
"value": 5,
"content": {
"type": "CHOICE",
"members": [
Expand Down Expand Up @@ -950,7 +950,7 @@
},
"multiplicative_expression": {
"type": "PREC_LEFT",
"value": 5,
"value": 6,
"content": {
"type": "CHOICE",
"members": [
Expand Down Expand Up @@ -1148,8 +1148,8 @@
]
},
"comparison_expression": {
"type": "PREC_LEFT",
"value": 3,
"type": "PREC_RIGHT",
"value": 4,
"content": {
"type": "SEQ",
"members": [
Expand Down Expand Up @@ -1694,60 +1694,90 @@
]
},
"assignment": {
"type": "SEQ",
"members": [
{
"type": "PREC_LEFT",
"value": 0,
"content": {
"type": "CHOICE",
"members": [
{
"type": "FIELD",
"name": "name",
"content": {
"type": "PREC_RIGHT",
"value": 2,
"content": {
"type": "SEQ",
"members": [
{
"type": "PREC_LEFT",
"value": 0,
"content": {
"type": "FIELD",
"name": "name",
"content": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "identifier"
},
{
"type": "SYMBOL",
"name": "qualified_name"
},
{
"type": "SYMBOL",
"name": "object_access"
},
{
"type": "SYMBOL",
"name": "member_access"
}
]
}
}
},
{
"type": "FIELD",
"name": "operator",
"content": {
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "="
},
{
"type": "SYMBOL",
"name": "identifier"
"name": "_augmented_assignment"
}
},
{
"type": "SYMBOL",
"name": "qualified_name"
},
]
}
},
{
"type": "PREC_RIGHT",
"value": 0,
"content": {
"type": "SYMBOL",
"name": "_expression"
}
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "object_access"
"name": "when_expression"
},
{
"type": "SYMBOL",
"name": "member_access"
"type": "BLANK"
}
]
}
},
{
"type": "STRING",
"value": "="
},
]
}
},
"variable_assignment": {
"type": "SEQ",
"members": [
{
"type": "PREC_RIGHT",
"value": 0,
"content": {
"type": "SYMBOL",
"name": "_expression"
}
"type": "SYMBOL",
"name": "assignment"
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "when_expression"
},
{
"type": "BLANK"
}
]
"type": "SYMBOL",
"name": "_terminator"
}
]
},
Expand Down Expand Up @@ -2261,19 +2291,6 @@
}
]
},
"variable_assignment": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "assignment"
},
{
"type": "SYMBOL",
"name": "_terminator"
}
]
},
"buffer_definition": {
"type": "SEQ",
"members": [
Expand Down Expand Up @@ -6419,8 +6436,21 @@
"type": "FIELD",
"name": "object",
"content": {
"type": "SYMBOL",
"name": "identifier"
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "identifier"
},
{
"type": "SYMBOL",
"name": "new_expression"
},
{
"type": "SYMBOL",
"name": "function_call"
}
]
}
},
{
Expand Down Expand Up @@ -10114,8 +10144,12 @@
{
"type": "REPEAT",
"content": {
"type": "SYMBOL",
"name": "_expression"
"type": "PREC",
"value": -1,
"content": {
"type": "SYMBOL",
"name": "_expression"
}
}
},
{
Expand Down Expand Up @@ -10146,8 +10180,13 @@
{
"type": "REPEAT",
"content": {
"type": "SYMBOL",
"name": "assignment"
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "assignment"
}
]
}
},
{
Expand Down Expand Up @@ -21395,6 +21434,10 @@
"type": "SYMBOL",
"name": "_and_operator"
},
{
"type": "SYMBOL",
"name": "_augmented_assignment"
},
{
"type": "SYMBOL",
"name": "_escaped_string"
Expand Down
32 changes: 31 additions & 1 deletion src/node-types.json
Original file line number Diff line number Diff line change
Expand Up @@ -514,11 +514,33 @@
"fields": {
"name": {
"multiple": false,
"required": false,
"required": true,
"types": [
{
"type": "identifier",
"named": true
},
{
"type": "member_access",
"named": true
},
{
"type": "object_access",
"named": true
},
{
"type": "qualified_name",
"named": true
}
]
},
"operator": {
"multiple": false,
"required": true,
"types": [
{
"type": "=",
"named": false
}
]
}
Expand Down Expand Up @@ -2298,9 +2320,17 @@
"multiple": false,
"required": true,
"types": [
{
"type": "function_call",
"named": true
},
{
"type": "identifier",
"named": true
},
{
"type": "new_expression",
"named": true
}
]
},
Expand Down
Loading

0 comments on commit 3415acb

Please sign in to comment.