Skip to content

Commit

Permalink
chore: switch to antlr4
Browse files Browse the repository at this point in the history
  • Loading branch information
thesayyn committed Jul 15, 2021
1 parent a5509fb commit d21b94e
Show file tree
Hide file tree
Showing 30 changed files with 10,958 additions and 414 deletions.
15 changes: 15 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "pwa-node",
"request": "launch",
"name": "Debug File",
"skipFiles": [
"<node_internals>/**"
],
"cwd": "${workspaceFolder}",
"args": ["--inspect", "--experimental-specifier-resolution=node", "./src/index.js"],
}
]
}
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ WARNING: This is a work in progress implementation of CEL. Any help is appreciat
## Roadmap

- Add support for macros
- Add support for macros via Public API
- Add support for macro overloads
- Support built in macros out-of-the-box
- Run conformance tests against [cel-spec](https://github.com/google/cel-spec) repository.
14 changes: 7 additions & 7 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
module.exports = {
presets: [
"presets": [
[
"@babel/preset-env",
{
targets: {
node: "current",
},
},
],
],
"targets": {
"esmodules": true
}
}
]
]
};
Binary file added bin/antlr-4.9-complete.jar
Binary file not shown.
8 changes: 8 additions & 0 deletions bin/generate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

alias antlr4='java -jar ${DIR}/antlr-4.9-complete.jar'

antlr4 -Dlanguage=JavaScript \
-o ${DIR}/../src/parser/gen \
-visitor ${DIR}/../src/parser/gen/CEL.g4

Loading

0 comments on commit d21b94e

Please sign in to comment.