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

            foreach (var decl in declarations)
            {
                decl.ResolveNames(scope);
            }
        }
Exemplo n.º 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);
         }
     }
 }
Exemplo n.º 4
0
 public override void ResolveNames(LexicalScope scope)
 {
     scope.Add(identifier, this);
     type.ResolveNames(scope);
 }
Exemplo n.º 5
0
 public override void ResolveNames(LexicalScope scope)
 {
     scope.Add(variableName, this);
     initializer.ResolveNames(scope);
 }
Exemplo n.º 6
0
 public override void ResolveNames(LexicalScope scope)
 {
     this.num = LastLocal++;           // Find a way to declare extern int variable
     scope.Add(varName, this);
 }
Exemplo n.º 7
0
 public override void ResolveNames(LexicalScope scope)
 {
     scope.Add(IDENT, this);
 }