4f7145e360
Replace |line|, |column|, and |offset| functions with the |location| function. It returns an object like this: { start: { offset: 23, line: 5, column: 6 }, end: { offset: 25, line: 5, column: 8 } } In actions, |start| refers to the position at the beginning of action's expression and |end| refers to the position after the end of action's expression. This allows one to easily add location info e.g. to AST nodes created in actions. In predicates, both |start| and |end| refer to the current position. Fixes #246. |
||
---|---|---|
.. | ||
compiler | ||
utils | ||
compiler.js | ||
grammar-error.js | ||
parser.js | ||
peg.js |