Skip to content

Commit 0f09701

Browse files
committed
update peggy rules
1 parent ea32d13 commit 0f09701

3 files changed

Lines changed: 17 additions & 35 deletions

File tree

src/libs/SearchParser/autocompleteParser.js

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1616,28 +1616,19 @@ function peg$parse(input, options) {
16161616
function peg$parseaction() {
16171617
var s0, s1;
16181618

1619-
s0 = input.substr(peg$currPos, 6);
1620-
if (s0.toLowerCase() === peg$c43) {
1619+
s0 = peg$currPos;
1620+
s1 = input.substr(peg$currPos, 6);
1621+
if (s1.toLowerCase() === peg$c43) {
16211622
peg$currPos += 6;
16221623
} else {
1623-
s0 = peg$FAILED;
1624+
s1 = peg$FAILED;
16241625
if (peg$silentFails === 0) { peg$fail(peg$e44); }
16251626
}
1626-
if (s0 === peg$FAILED) {
1627-
s0 = peg$currPos;
1628-
s1 = input.substr(peg$currPos, 6);
1629-
if (s1.toLowerCase() === peg$c43) {
1630-
peg$currPos += 6;
1631-
} else {
1632-
s1 = peg$FAILED;
1633-
if (peg$silentFails === 0) { peg$fail(peg$e44); }
1634-
}
1635-
if (s1 !== peg$FAILED) {
1636-
peg$savedPos = s0;
1637-
s1 = peg$f40();
1638-
}
1639-
s0 = s1;
1627+
if (s1 !== peg$FAILED) {
1628+
peg$savedPos = s0;
1629+
s1 = peg$f40();
16401630
}
1631+
s0 = s1;
16411632

16421633
return s0;
16431634
}

src/libs/SearchParser/baseRules.peggy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ feed = "feed"i { return "feed"; }
6161
title = "title"i { return "title"; }
6262
assignee = "assignee"i { return "assignee"; }
6363
createdBy = "createdBy"i / "created-by"i { return "createdBy"; }
64-
action = "action"i / "action"i { return "action"; }
64+
action = "action"i { return "action"; }
6565

6666
operator "operator"
6767
= (":" / "=") { return "eq"; }

src/libs/SearchParser/searchParser.js

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1816,28 +1816,19 @@ function peg$parse(input, options) {
18161816
function peg$parseaction() {
18171817
var s0, s1;
18181818

1819-
s0 = input.substr(peg$currPos, 6);
1820-
if (s0.toLowerCase() === peg$c43) {
1819+
s0 = peg$currPos;
1820+
s1 = input.substr(peg$currPos, 6);
1821+
if (s1.toLowerCase() === peg$c43) {
18211822
peg$currPos += 6;
18221823
} else {
1823-
s0 = peg$FAILED;
1824+
s1 = peg$FAILED;
18241825
if (peg$silentFails === 0) { peg$fail(peg$e46); }
18251826
}
1826-
if (s0 === peg$FAILED) {
1827-
s0 = peg$currPos;
1828-
s1 = input.substr(peg$currPos, 6);
1829-
if (s1.toLowerCase() === peg$c43) {
1830-
peg$currPos += 6;
1831-
} else {
1832-
s1 = peg$FAILED;
1833-
if (peg$silentFails === 0) { peg$fail(peg$e46); }
1834-
}
1835-
if (s1 !== peg$FAILED) {
1836-
peg$savedPos = s0;
1837-
s1 = peg$f41();
1838-
}
1839-
s0 = s1;
1827+
if (s1 !== peg$FAILED) {
1828+
peg$savedPos = s0;
1829+
s1 = peg$f41();
18401830
}
1831+
s0 = s1;
18411832

18421833
return s0;
18431834
}

0 commit comments

Comments
 (0)