JavaScript Parser and Analyzer in C# .NET 4.5

后端 未结 2 877
醉酒成梦
醉酒成梦 2020-12-10 07:46

Not sure if the title explains it correctly.

Anyways, I\'m building a .NET WPF application which should go through the JavaScript and identify issues such as

相关标签:
2条回答
  • 2020-12-10 08:27

    Check out IronJS I know they have a pretty good JavaScript library for .Net

    IronJS

    0 讨论(0)
  • 2020-12-10 08:40

    What you're looking for is an abstract syntax tree parser for Javascript written in C#.

    There are a few choices I know of:

    Microsoft's Ajax Minifier library comes with its own AST parser (used to minify / optimize Javascript files). You can find the source code for that on Codeplex.

    Esprima.net is another option. It's a port of the popular Javascript library Esprima.

    The good thing about Esprima is it outputs the AST in a common format (defined by Mozilla here) that's used across a few parsers, making it really easy to port utilities for walking the tree, etc. since they all use the same underlying data structure.

    0 讨论(0)
自定义标题
段落格式
字体
字号
代码语言
提交回复
热议问题