Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [wtp-dev] About parsing and conversion times


> Possible but I think it is a good idea to keep parser model and DOM
> model separate so that we still have options.

> Also conversion from a strongly typed model to another one may actually 
> be faster than converting from nashorn/esprima.

Closure has two models actually.

One is the "parser's model" set of classes like BinaryOperatorTree BlockTree BreakStatementTree CallExpressionTree and
it's strongly typed model.

The other called IR is presented just by (almost) one Node class that has methods like isAdd(), isAnd(), isArrayLit(),
isYield() etc.

Parser produces AST in form of "ProgramTree extends ParseTree" and then IR is created from that tree.

So, I was thinking of using the latter.

Eugene Melekhov

Back to the top