Skip to content

Instantly share code, notes, and snippets.

@ibuziuk
Last active May 27, 2016 17:12
Show Gist options
  • Save ibuziuk/b50b163167a442c03592144a982a1c8e to your computer and use it in GitHub Desktop.
Save ibuziuk/b50b163167a442c03592144a982a1c8e to your computer and use it in GitHub Desktop.
JSDT parser - Before Neon / Neon / Neon 1 / Beyond Neon

Before Neon

Outdated parser which was created from JDT’s Java parser and supported only by JSDT committers:

  • obsolete (support only ECMASCript 3 (1999) / false errors / broken content assist etc.)

  • no commynity support

  • DOM AST model / hard to replace (ASTNode ~ 4000 references)

Neon

Esprima is used as JSDT parser:

  • written in JavaScript

  • supported by commynity (JQuery foundation)

  • tolerant parsing support

  • Nashorn (part of Java 8) is used for running in JSDT (transformation to internal AST is required)

  • relatively fast (benchmarks results)

  • slow with parsing big files (> 2 mb) first time (due to Nashorn perfomance / after JIT optimize it it becomes better)

Neon.1

Closure compiler:

  • written in Java (no integration problem - no need to use Nashorn)

  • fast ( > 10x faster than Esprima)

  • active community

  • tolerant parsing support

  • approved by Eclipse Intellectual Property (IP) team

  • converting from Closure Internal Representation to JSDT DOM AST model is required (might be time consuming)

Beyond Neon

TypeScript Language service via tsserver:

  • Node.js is required (shipping node.js with Eclipse is not yet approved by IP team)

  • no need to use AST

  • just like working with server (send request → get JSON responce)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment