Example #1
0
 internal static void CheckAst(Parser parser, ScriptBlockAst ast)
 {
     SemanticChecks semanticChecker = new SemanticChecks(parser);
     semanticChecker._scopeStack.Push(ast);
     ast.InternalVisit(semanticChecker);
     semanticChecker._scopeStack.Pop();
     Diagnostics.Assert(semanticChecker._memberScopeStack.Count == 0, "Unbalanced push/pop of member scope stack");
     Diagnostics.Assert(semanticChecker._scopeStack.Count == 0, "Unbalanced push/pop of scope stack");
 }
Example #2
0
        public ScriptBlock GetScriptBlock()
        {
            Parser parser = new Parser();

            SemanticChecks.CheckAst(parser, this);
            if (parser.ErrorList.Any <ParseError>())
            {
                throw new ParseException(parser.ErrorList.ToArray());
            }
            return(new ScriptBlock(this, false));
        }
Example #3
0
        internal static void CheckAst(Parser parser, ScriptBlockAst ast)
        {
            SemanticChecks visitor = new SemanticChecks(parser);

            ast.InternalVisit(visitor);
        }
Example #4
0
 internal static void CheckAst(Parser parser, ScriptBlockAst ast)
 {
     SemanticChecks visitor = new SemanticChecks(parser);
     ast.InternalVisit(visitor);
 }