Skip to content

Commit

Permalink
Adds support for null coalescing assignment operator from PHP 7.4 (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
cfroystad authored Apr 13, 2021
1 parent e0f994f commit c307ec4
Show file tree
Hide file tree
Showing 4 changed files with 5,347 additions and 5,256 deletions.
3 changes: 2 additions & 1 deletion grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,8 @@ module.exports = grammar({
'>>=',
'&=',
'^=',
'|='
'|=',
'??='
)),
field('right', $._expression)
)),
Expand Down
4 changes: 4 additions & 0 deletions src/grammar.json
Original file line number Diff line number Diff line change
Expand Up @@ -4303,6 +4303,10 @@
{
"type": "STRING",
"value": "|="
},
{
"type": "STRING",
"value": "??="
}
]
}
Expand Down
12 changes: 10 additions & 2 deletions src/node-types.json
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,10 @@
"type": ">>=",
"named": false
},
{
"type": "??=",
"named": false
},
{
"type": "^=",
"named": false
Expand Down Expand Up @@ -3564,6 +3568,10 @@
"type": "??",
"named": false
},
{
"type": "??=",
"named": false
},
{
"type": "@",
"named": false
Expand Down Expand Up @@ -3614,11 +3622,11 @@
},
{
"type": "boolean",
"named": true
"named": false
},
{
"type": "boolean",
"named": false
"named": true
},
{
"type": "break",
Expand Down
Loading

0 comments on commit c307ec4

Please sign in to comment.