This project has moved and is read-only. For the latest updates, please go here.

Getting script complexity

Nov 18, 2011 at 3:04 AM


Is there a way to get an evaluation of the script's complexity (like cyclomatic complexity) ?
If not, any hint about how to hook some complexity evaluator to the Parser ?



Nov 18, 2011 at 10:45 AM

Nope, there is no functionality like that.  If you were looking to build such a system you could definitely use the Jurassic lexer and parser as a starting point.  The code files you would need are under:

  • Jurassic\Compiler\Lexer
  • Jurassic\Compiler\Parser
  • Jurassic\Compiler\Expressions
  • Jurassic\Compiler\Statements

(There may be others)

Good luck!