Created
May 24, 2022 21:19
-
-
Save hmarcelodn/d25ab3064ddb26a342106f193ae1baa4 to your computer and use it in GitHub Desktop.
thl-grammar.pegjs-09
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| OrCondition = head:AndCondition tail:(_ '||' _ AndCondition)+ { | |
| const accum = [{...head}]; | |
| tail.reduce((accumulated, element) => { | |
| accumulated.push(element[3]); | |
| return accumulated; | |
| }, accum); | |
| return { op: '||', predicates: accum }; | |
| } / AndCondition |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment