void VarDec(out VarDecl varDecl) { Type ty; T2V t2v; Typ(out ty); VarDesc(out t2v); varDecl = t2v(ty); }
// Add local function parameter to compilation environment public int DeclareLocal(VarDecl varDecl) { int size = varDecl.type.Size; nextOffset += size; locals.Peek().Add(varDecl.name, nextOffset - 1); return(size); }
public void AddVar(VarDecl decl) { globals.Add(decl.name, decl); }
public void CompileAndDeclare(Generator gen, VarDecl varDecl) { varDecl.type.CompileAllocation(gen); globalsCount += varDecl.type.Size; globals.Add(varDecl.name, globalsCount - 1); }
public void DeclareLocal(VarDecl varDecl) { locals.Peek().Add(varDecl.name, varDecl.type); }