public object VisitGlobalVarDefNode(GlobalVarDefNode n) { WriteLine(n.kind + " - " + n.name + ":" + n.Type.Name); Indent(); Visit(n.rhs); Dedent(); return(null); }
public override object VisitGlobalVarDefNode(GlobalVarDefNode n) { TypeSymbol ts = MakeTypeSymbolForString(n.Type.Name); if (ts == null) { Visit(n.rhs); ts = n.rhs.Type; } n.Type = ts; varTypes.PutInScope(n.name, ts); return(null); }
public override MIPSRegister VisitGlobalVarDefNode(GlobalVarDefNode n) { return(base.VisitGlobalVarDefNode(n)); }
public override LLVMRegister VisitGlobalVarDefNode(GlobalVarDefNode n) { throw new NotImplementedException(); }
public override object VisitGlobalVarDefNode(GlobalVarDefNode n) { Visit(n.rhs); semanticChecker.CheckAndReport(varTypes.PutInScope(n.name, n.Type), n.sourceLoc, $"Global Variable {n.name} already declared"); return(null); }
public override object VisitGlobalVarDefNode(GlobalVarDefNode n) { interp.globals.PutInScope(n.name, interp.Eval(n.rhs)); return(null); }
public virtual T VisitGlobalVarDefNode(GlobalVarDefNode n) { T b = n.rhs.Accept(this); return(default(T)); }