public override void Accept (NameExpression ident) { if (symbolTable.IsSymbolDefined (ident.Value)) { Symbol sym = symbolTable.GetSymbol (ident.Value); if (sym.Type == SymbolType.Local) { methodBuilder.EmitInstruction (ident.Location, Opcode.LoadLocal, sym.Index); } else { methodBuilder.EmitInstruction (ident.Location, Opcode.LoadGlobal, methodBuilder.Module.DefineConstant (new IodineName (ident.Value))); } } else { methodBuilder.EmitInstruction (ident.Location, Opcode.LoadGlobal, methodBuilder.Module.DefineConstant (new IodineName (ident.Value))); } }
public void Accept(NameExpression ident) { ident.Visit (functionCompiler); }
public override void Accept (NameExpression ident) { if (ident.Value == "_") { methodBuilder.EmitInstruction (ident.Location, Opcode.LoadTrue); } else { methodBuilder.EmitInstruction (ident.Location, Opcode.LoadLocal, temporary); methodBuilder.EmitInstruction (ident.Location, Opcode.StoreLocal, symbolTable.GetSymbol (ident.Value).Index); methodBuilder.EmitInstruction (ident.Location, Opcode.LoadTrue); } }
public override void Accept (NameExpression ident) { symbolTable.AddSymbol (ident.Value); }
public virtual void Accept(NameExpression ident) { }