-
Notifications
You must be signed in to change notification settings - Fork 128
Open
Labels
Description
Hello. I'm compile that https://github.com/antlr/antlr4/tree/master/runtime/JavaScript
and i get error:
[warning] 'InterpreterRuleContext' is defined but never used. line 218 column 7 in file src\antlr4\ParserRuleContext.js
C:\Users\Professional\AppData\Roaming\npm\node_modules\nectarjs\node_modules\@babel\core\lib\transformation\index.js:45
throw e;
^
TypeError: unknown: Cannot read property 'raw' of undefined
at PluginPass.UnaryExpression (C:\Users\Professional\AppData\Roaming\npm\node_modules\nectarjs\compiler\native\visitor\plugin\UnaryExpression.js:56:52)
at newFn (C:\Users\Professional\AppData\Roaming\npm\node_modules\nectarjs\node_modules\@babel\traverse\lib\visitors.js:175:21)
at NodePath._call (C:\Users\Professional\AppData\Roaming\npm\node_modules\nectarjs\node_modules\@babel\traverse\lib\path\context.js:55:20)
at NodePath.call (C:\Users\Professional\AppData\Roaming\npm\node_modules\nectarjs\node_modules\@babel\traverse\lib\path\context.js:42:17)
at NodePath.visit (C:\Users\Professional\AppData\Roaming\npm\node_modules\nectarjs\node_modules\@babel\traverse\lib\path\context.js:92:31)
at TraversalContext.visitQueue (C:\Users\Professional\AppData\Roaming\npm\node_modules\nectarjs\node_modules\@babel\traverse\lib\context.js:115:16)
at TraversalContext.visitSingle (C:\Users\Professional\AppData\Roaming\npm\node_modules\nectarjs\node_modules\@babel\traverse\lib\context.js:84:19)
at TraversalContext.visit (C:\Users\Professional\AppData\Roaming\npm\node_modules\nectarjs\node_modules\@babel\traverse\lib\context.js:143:19)
at Function.traverse.node (C:\Users\Professional\AppData\Roaming\npm\node_modules\nectarjs\node_modules\@babel\traverse\lib\index.js:82:17)
at NodePath.visit (C:\Users\Professional\AppData\Roaming\npm\node_modules\nectarjs\node_modules\@babel\traverse\lib\path\context.js:99:18) {
code: 'BABEL_TRANSFORM_ERROR'
}
to compile i just chage this file https://github.com/antlr/antlr4/blob/master/runtime/JavaScript/src/antlr4/tree/index.js
i,m replace three dots with:
const Tree = require('./Tree');
const Trees = require('./Trees');
module.exports = {Tree,
RuleNode,
ErrorNode,
TerminalNode,
ErrorNodeImpl,
TerminalNodeImpl,
ParseTreeListener,
ParseTreeVisitor,
ParseTreeWalker,
INVALID_INTERVAL,
Trees}
I'm call like that: nectar --prepare src/antlr4/index.js
or
nectar --generate -o out src/antlr4/index.js
NectarJS v0.7.112
Windows 10 (x64), mingw not installed yet