forked from Taritsyn/JavaScriptEngineSwitcher
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJintPrecompiledScript.cs
More file actions
44 lines (36 loc) · 977 Bytes
/
JintPrecompiledScript.cs
File metadata and controls
44 lines (36 loc) · 977 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
using OriginalParsedScript = Esprima.Ast.Script;
using JavaScriptEngineSwitcher.Core;
namespace JavaScriptEngineSwitcher.Jint
{
/// <summary>
/// Represents a pre-compiled script that can be executed by different instances of the Jint JS engine
/// </summary>
internal sealed class JintPrecompiledScript : IPrecompiledScript
{
/// <summary>
/// Gets a parsed script
/// </summary>
public OriginalParsedScript ParsedScript
{
get;
private set;
}
/// <summary>
/// Constructs an instance of pre-compiled script
/// </summary>
/// <param name="parsedScript">The parsed script</param>
public JintPrecompiledScript(OriginalParsedScript parsedScript)
{
ParsedScript = parsedScript;
}
#region IPrecompiledScript implementation
/// <summary>
/// Gets a name of JS engine for which the pre-compiled script was created
/// </summary>
public string EngineName
{
get { return JintJsEngine.EngineName; }
}
#endregion
}
}