예제 #1
0
 public Statement Visit(VoidDeclaration voidDeclaration)
 {
     //Console.WriteLine("VOID DECL");
     State.ScopeStart();
     voidDeclaration.stmt.Accept(this);
     //State.Print();
     State.ScopeEnd();
     State.ClearState();
     return(null);
 }
예제 #2
0
        public Void Visit(VoidDeclaration voidDeclaration, SortedSet <string> free)
        {
            var bodyFree = new SortedSet <string>();

            voidDeclaration.flist.Accept(this, bodyFree);
            bodyFree.Remove(voidDeclaration.id);

            free.UnionWith(bodyFree);

            return(null);
        }
예제 #3
0
        public Type Visit(VoidDeclaration voidDeclaration)
        {
            foreach (var arg in ((FormalList)voidDeclaration.flist).list)
            {
                Environment.VariableType.Add(arg.id, (Type)arg.type);
            }
            Environment.ReturnType = null;
            voidDeclaration.stmt.Accept(this);

            return(null);
        }
예제 #4
0
 public void DeclareFunction(VoidDeclaration function)
 {
     this.FunctionDict.Add(function.id, new Tuple <Declaration, bool>(function, true));
 }
예제 #5
0
 public IValue Visit(VoidDeclaration voidDeclaration)
 {
     //Console.WriteLine("VoidFunc STATEMENT");
     voidDeclaration.stmt.Accept(this);
     return(null);
 }
예제 #6
0
 public Type Visit(VoidDeclaration voidDeclaration, FunctionGeneratorEnvironment arg)
 {
     return(null);
 }