Comments (3)
To be fair, in the documentation it says pretty clearly "Curly braces in the action code must be balanced.". Now that's not exactly an excuse; the parser could include a full JS parser as well, but is a tradeoff for that kind of bloat really worth it? I'd say no.
from pegjs.
good call, I missed that in the documentation, and I'm pretty happy with the workaround. Thanks!
from pegjs.
For the record, here is a message with detailed explanation and suggested workarounds.
from pegjs.
Related Issues (20)
- Up-to-date JavaScript grammar HOT 2
- Using PEG.js at runtime works, but generated grammer fails to work? HOT 2
- Operator precedence tree compiling extremely slowly HOT 2
- Merging multiple single-character expressions
- Fork of the online editor with inline errors HOT 1
- Ignore me -- wrong project
- [composable, declarative, typescript] react-peg: parser generator based on pegjs
- Bug with context-sensitive grammar HOT 1
- option to generate an es module instead of commonjs module HOT 12
- Cannot use parseFloat inside grammar HOT 4
- literalEscape HOT 1
- Support for runtime context object? HOT 3
- [META] Switch to Peggy HOT 9
- Grammar action errors need to be more informative HOT 4
- Allow access to different rules in code blocks HOT 2
- Using same rule in pattern HOT 2
- Pegjs online can't parser parser.pegjs HOT 2
- Variables in parentheses can't be accessed
- Documentation should describe all features of the grammar specification language (e.g., dollar sign "$", "text()") HOT 3
- Deprecate/archive and recommend peggy.js as official successor project? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pegjs.