Skip to content

Commit 6258caa

Browse files
Kill expression grammar enhancement
1 parent a128619 commit 6258caa

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"printableName": "Cache Web Terminal",
66
"description": "Web-based terminal emulator for Caché administering.",
77
"author": "ZitRo",
8-
"version": "4.2.11",
8+
"version": "4.2.12",
99
"gaID": "UA-83005064-2",
1010
"releaseNumber": 26,
1111
"scripts": {

src/client/js/parser/grammar.js

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,10 @@ rule("cosCommand").split(
344344
id([
345345
{ CI, value: "kill", class: "keyword" },
346346
{ CI, value: "k", class: "keyword" }
347-
]).call("postCondition").whitespace().branch().call("variable").optWhitespace().split(
347+
]).call("postCondition").whitespace().branch().split(
348+
char("(").call("variableListExpression").char(")"),
349+
call("variable")
350+
).optWhitespace().split(
348351
char(",").optWhitespace().merge(), // -> loop to the last branch
349352
any().exit()
350353
),
@@ -472,12 +475,15 @@ rule("cosCommand").split(
472475
).end();
473476

474477
rule("setExpression").split(
475-
char("(").branch().optWhitespace().call("variable").optWhitespace().split(
476-
char(",").merge(),
477-
any()
478-
).char(")"),
478+
char("(").call("variableListExpression").char(")"),
479479
call("variable")
480-
).optWhitespace().char("=").optWhitespace().call("expression").exit().end();
480+
).optWhitespace().char("=").optWhitespace()
481+
.call("expression").exit().end();
482+
483+
rule("variableListExpression").branch().optWhitespace().call("variable").optWhitespace().split(
484+
char(",").merge(),
485+
any()
486+
).exit().end();
481487

482488
rule("deviceParameters").branch().split(
483489
char({ value: "/", class: "special" }).id({ class: "special" }).split(

0 commit comments

Comments
 (0)