/// <summary>Creates a script containing an expression</summary> public ScriptExpression(string text) { int dummy = 0; Scope = new ContextScope(); Parser.Parse(Scope, text, out m_expression, "", ref dummy, out _); }
public static void Parse(ContextScope scope, string text, out Expression result, string srcname, ref int linenumber, out List <LintElement> linter) { using (StringReader reader = new StringReader(text)) { Lexer lex = new Lexer(reader, Definitions, srcname, linenumber); result = new Expression(scope, lex); linenumber = lex.LineNumber; linter = lex.Linter; } }
/// <summary>Creates a script</summary> /// <param name="scriptname">The name of the script</param> /// <param name="registry">The script registry to reference for global scope</param> public Script(string scriptname, Registry registry) { Name = scriptname; registry.Add(scriptname, this); Scope = registry.Global.Scope.Next; }
internal Script() { Scope = new ContextScope(); }