You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 8, 2020. It is now read-only.
const parseFunction = require('parse-function');
let app = parseFunction();
console.warn(app.parse(Math.abs));
This throws an exception SyntaxError: Unexpected token, expected , (1:25) coming from babylon:
SyntaxError: Unexpected token, expected , (1:25)
at Parser.raise (/home/ericmorand/Projects/twing/node_modules/babylon/lib/index.js:808:15)
at Parser.unexpected (/home/ericmorand/Projects/twing/node_modules/babylon/lib/index.js:2185:16)
at Parser.expect (/home/ericmorand/Projects/twing/node_modules/babylon/lib/index.js:2171:28)
at Parser.parseExprList (/home/ericmorand/Projects/twing/node_modules/babylon/lib/index.js:3971:14)
at Parser.parseExprAtom (/home/ericmorand/Projects/twing/node_modules/babylon/lib/index.js:3266:30)
at Parser.parseExprSubscripts (/home/ericmorand/Projects/twing/node_modules/babylon/lib/index.js:2945:21)
at Parser.parseMaybeUnary (/home/ericmorand/Projects/twing/node_modules/babylon/lib/index.js:2923:21)
at Parser.parseExprOps (/home/ericmorand/Projects/twing/node_modules/babylon/lib/index.js:2828:21)
at Parser.parseMaybeConditional (/home/ericmorand/Projects/twing/node_modules/babylon/lib/index.js:2798:21)
at Parser.parseMaybeAssign (/home/ericmorand/Projects/twing/node_modules/babylon/lib/index.js:2757:21)
Is this an expected behavior? Is it possible to parse native functions?
The text was updated successfully, but these errors were encountered:
Hey! I assume yes. Please try out just to parse it with babylon and report back.
Actually when thinking it, probably is not possible cuz we read them with toString.
Consider the following code:
This throws an exception
SyntaxError: Unexpected token, expected , (1:25)
coming from babylon:Is this an expected behavior? Is it possible to parse native functions?
The text was updated successfully, but these errors were encountered: