예제 #1
0
 public override void ResolveNames(LexicalScope scope)
 {
     scope.Add(methodName, this);
     foreach (var child in formalParameterList)
     {
         child.ResolveNames(scope);
     }
     methodBody.ResolveNames(scope);
 }
예제 #2
0
        public override void ResolveNames(LexicalScope scope)
        {
            if (classname != null)
            {
                scope.Add(classname, this);
            }

            foreach (var decl in declarations)
            {
                decl.ResolveNames(scope);
            }
        }
예제 #3
0
 public override void ResolveNames(LexicalScope scope)
 {
     LocalVariableDeclarationStatement.LastLocal = 0;
     if (methodname != null)
     {
         scope.Add(methodname, this);
     }
     if (parameters != null)
     {
         foreach (var parameter in parameters)
         {
             parameter.ResolveNames(scope);
         }
     }
     if (statements != null)
     {
         foreach (var statement in statements)
         {
             statement.ResolveNames(scope);
         }
     }
 }
예제 #4
0
 public override void ResolveNames(LexicalScope scope)
 {
     scope.Add(identifier, this);
     type.ResolveNames(scope);
 }
예제 #5
0
 public override void ResolveNames(LexicalScope scope)
 {
     scope.Add(variableName, this);
     initializer.ResolveNames(scope);
 }
예제 #6
0
 public override void ResolveNames(LexicalScope scope)
 {
     this.num = LastLocal++;           // Find a way to declare extern int variable
     scope.Add(varName, this);
 }
예제 #7
0
 public override void ResolveNames(LexicalScope scope)
 {
     scope.Add(IDENT, this);
 }