Comments (4)
Which doesn't have any of the
^^^^^
/-->
ASCII arrows promised in the documentation.
This is because source
is a key, that should match grammarSource
in options
What is an "identifier of a grammar"?
Literally, this is an identifier, like <anonymous glsl>
in your case.
Why is it an array?
Locations in generated errors can have different source
s. Well, right now, because #298 does not yet implemented, the source is always one.
Why does format require an array argument? Doesn't it already have error location information, and source lexeme information, to generate a useful error message?
It contains positions in some input, but not the input itself. To show you pretty printed error with a part of the input you should provide it somehow.
from peggy.
Does #382 fix this adequately for you yet?
from peggy.
@Mingun ah that makes sense. The array thing confused me. Your reply gave me enough information to open https://github.com/peggyjs/peggy/pull/389/files
from peggy.
Fixed in #389
from peggy.
Related Issues (20)
- When grammer file to long getting ERR_STRING_TOO_LONG HOT 2
- [Question] How to create grammar to parse unary post increment and decrement AST? HOT 6
- Question about behavior of repetitions HOT 1
- Refer to specific grammar rule HOT 6
- Return an expression or decide how to continue HOT 4
- Proposal to improve readability of generate-js.js HOT 4
- Because version 3.0 already released, it's time to remove this option
- Release 3.02 HOT 1
- [docs] Parens create a pluck context HOT 7
- Run tests on es modules HOT 3
- Conversion of a pegjs file to BNF or vice versa ? HOT 2
- Type of `ParserBuildOptions` is wrong HOT 3
- [feature request] watch HOT 3
- doc example doesn't correspond to code example HOT 3
- Fix all uses of String.prototype.substr HOT 5
- Performance javascript grammar HOT 7
- test output format HOT 4
- Documentation improvements HOT 8
- use `expression1 / expression2 / ... / expressionn` throw `peg$SyntaxError: Expected end of input but "d" found.` HOT 5
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 peggy.