Skip to content

Commit

Permalink
feat: support floor division update operator
Browse files Browse the repository at this point in the history
  • Loading branch information
amaanq committed May 21, 2024
1 parent 5b088fa commit 773eae8
Show file tree
Hide file tree
Showing 4 changed files with 7,513 additions and 7,370 deletions.
2 changes: 1 addition & 1 deletion grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ module.exports = grammar(lua, {

update_statement: $ => seq(
alias($._variable_assignment_varlist, $.variable_list),
choice('+=', '-=', '*=', '/=', '%=', '^=', '..='),
choice('+=', '-=', '*=', '/=', '%=', '//=', '^=', '..='),
alias($._variable_assignment_explist, $.expression_list),
),

Expand Down
7 changes: 7 additions & 0 deletions src/grammar.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"0": "l",
"1": "u",
"2": "a",
"name": "luau",
"word": "identifier",
"rules": {
Expand Down Expand Up @@ -3011,6 +3014,10 @@
"type": "STRING",
"value": "%="
},
{
"type": "STRING",
"value": "//="
},
{
"type": "STRING",
"value": "^="
Expand Down
4 changes: 4 additions & 0 deletions src/node-types.json
Original file line number Diff line number Diff line change
Expand Up @@ -1588,6 +1588,10 @@
"type": "//",
"named": false
},
{
"type": "//=",
"named": false
},
{
"type": "/=",
"named": false
Expand Down
Loading

0 comments on commit 773eae8

Please sign in to comment.