Is there any open source interpreter for JavaScript?

Is JavaScript an open source programming language? I want to know how some objects and methods work.

I mean, is the compiler, interpreter or parser open source JavaScript?

+6
source share
3 answers

There are many open source JavaScript engines ( V8 , Rhino, and SpiderMonkey spring), as well as closed source implementations (I believe that whatever Opera and Microsoft use is not open source).

The language is rather rigidly based on the ECMAScript specification , which is freely available.

+9
source

What do you mean by open source?

JavaScript is interpreted by the browser and depends on the provider and developer, which engine it uses. Some of the popular engines are listed on the ECMAScript Engine List .

+2
source

In addition to the answer above, there is also a version of .NET with open source JavaScript : its name is Jurassic and it is available in CodePlex:

http://jurassic.codeplex.com/

<strong> Examples:

  • Run the expression:

    var engine = new Jurassic.ScriptEngine();

    Console.WriteLine(engine.Evaluate<int>("1.5 + 2.4"));

  • Run the script command:

    var engine = new Jurassic.ScriptEngine();

    engine.ExecuteFile(@"c:\test.js");

Features of version 2.2 (taken from the website):

  • Supports all ECMAScript 3 and ECMAScript 5 functionality, including ES5 strict mode
  • Simple but powerful API
  • Compiles JavaScript in .NET bytecode (CIL); not a translator
  • Deploys as a single .NET assembly (no embedded code)
  • Basic support for integrated debugging in Visual Studio
  • Light code generation is used, therefore the generated code is completely garbage collected
  • Tested on .NET 3.5, .NET 4 and Silverlight
0
source

Source: https://habr.com/ru/post/893402/


All Articles