Esempio n. 1
0
        /// <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 _);
        }
Esempio n. 2
0
 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;
     }
 }
Esempio n. 3
0
 /// <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;
 }
Esempio n. 4
0
 internal Script()
 {
     Scope = new ContextScope();
 }