Skip to content

Commit 9972242

Browse files
committed
Relax binary_op rule
1 parent 8371c86 commit 9972242

File tree

4 files changed

+41636
-41807
lines changed

4 files changed

+41636
-41807
lines changed

grammar.js

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1224,19 +1224,7 @@ module.exports = grammar({
12241224
'(', $.binary_op, ':', commaSep1($.identifier), ')',
12251225
),
12261226
),
1227-
binary_op: $ => choice(
1228-
'+',
1229-
'*',
1230-
caseInsensitive('\\.and\\.'),
1231-
caseInsensitive('\\.or\\.'),
1232-
caseInsensitive('\\.eqv\\.'),
1233-
caseInsensitive('\\.neqv\\.'),
1234-
caseInsensitive('iand'),
1235-
caseInsensitive('ieor'),
1236-
caseInsensitive('ior'),
1237-
caseInsensitive('max'),
1238-
caseInsensitive('min'),
1239-
),
1227+
binary_op: $ => choice('+', '*', /(\.\w+\.|\w+)/),
12401228

12411229
if_statement: $ => choice(
12421230
$._inline_if_statement,

src/grammar.json

Lines changed: 2 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -14109,85 +14109,8 @@
1410914109
"value": "*"
1411014110
},
1411114111
{
14112-
"type": "ALIAS",
14113-
"content": {
14114-
"type": "PATTERN",
14115-
"value": "\\.[aA][nN][dD]\\."
14116-
},
14117-
"named": false,
14118-
"value": "\\.and\\."
14119-
},
14120-
{
14121-
"type": "ALIAS",
14122-
"content": {
14123-
"type": "PATTERN",
14124-
"value": "\\.[oO][rR]\\."
14125-
},
14126-
"named": false,
14127-
"value": "\\.or\\."
14128-
},
14129-
{
14130-
"type": "ALIAS",
14131-
"content": {
14132-
"type": "PATTERN",
14133-
"value": "\\.[eE][qQ][vV]\\."
14134-
},
14135-
"named": false,
14136-
"value": "\\.eqv\\."
14137-
},
14138-
{
14139-
"type": "ALIAS",
14140-
"content": {
14141-
"type": "PATTERN",
14142-
"value": "\\.[nN][eE][qQ][vV]\\."
14143-
},
14144-
"named": false,
14145-
"value": "\\.neqv\\."
14146-
},
14147-
{
14148-
"type": "ALIAS",
14149-
"content": {
14150-
"type": "PATTERN",
14151-
"value": "[iI][aA][nN][dD]"
14152-
},
14153-
"named": false,
14154-
"value": "iand"
14155-
},
14156-
{
14157-
"type": "ALIAS",
14158-
"content": {
14159-
"type": "PATTERN",
14160-
"value": "[iI][eE][oO][rR]"
14161-
},
14162-
"named": false,
14163-
"value": "ieor"
14164-
},
14165-
{
14166-
"type": "ALIAS",
14167-
"content": {
14168-
"type": "PATTERN",
14169-
"value": "[iI][oO][rR]"
14170-
},
14171-
"named": false,
14172-
"value": "ior"
14173-
},
14174-
{
14175-
"type": "ALIAS",
14176-
"content": {
14177-
"type": "PATTERN",
14178-
"value": "[mM][aA][xX]"
14179-
},
14180-
"named": false,
14181-
"value": "max"
14182-
},
14183-
{
14184-
"type": "ALIAS",
14185-
"content": {
14186-
"type": "PATTERN",
14187-
"value": "[mM][iI][nN]"
14188-
},
14189-
"named": false,
14190-
"value": "min"
14112+
"type": "PATTERN",
14113+
"value": "(\\.\\w+\\.|\\w+)"
1419114114
}
1419214115
]
1419314116
},

src/node-types.json

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14061,14 +14061,6 @@
1406114061
"type": "host",
1406214062
"named": false
1406314063
},
14064-
{
14065-
"type": "iand",
14066-
"named": false
14067-
},
14068-
{
14069-
"type": "ieor",
14070-
"named": false
14071-
},
1407214064
{
1407314065
"type": "if",
1407414066
"named": false
@@ -14129,10 +14121,6 @@
1412914121
"type": "intrinsic",
1413014122
"named": false
1413114123
},
14132-
{
14133-
"type": "ior",
14134-
"named": false
14135-
},
1413614124
{
1413714125
"type": "kind",
1413814126
"named": false
@@ -14161,18 +14149,10 @@
1416114149
"type": "managed",
1416214150
"named": false
1416314151
},
14164-
{
14165-
"type": "max",
14166-
"named": false
14167-
},
1416814152
{
1416914153
"type": "memory",
1417014154
"named": false
1417114155
},
14172-
{
14173-
"type": "min",
14174-
"named": false
14175-
},
1417614156
{
1417714157
"type": "module",
1417814158
"named": false

0 commit comments

Comments
 (0)