public CppEmitBuffer Pop() { var ret = Buf; Buf = _stack[_stack.Count - 1]; _stack.RemoveAt(_stack.Count - 1); return(ret); }
public void Push() { var oldBuf = Buf; _stack.Add(Buf); Buf = new CppEmitBuffer(); Buf.EmitContext = this; Buf.IndentLevel = oldBuf.IndentLevel; }
public void Stash(string id) { var oldBuf = Buf; _stash[id] = Buf; Buf = new CppEmitBuffer(); Buf.EmitContext = this; Buf.IndentLevel = oldBuf.IndentLevel; }
public CppEmitBuffer Pop() { var ret = Buf; Buf = _stack[_stack.Count - 1]; _stack.RemoveAt(_stack.Count - 1); return ret; }
public void Push() { var oldBuf = Buf; _stack.Add (Buf); Buf = new CppEmitBuffer(); Buf.EmitContext = this; Buf.IndentLevel = oldBuf.IndentLevel; }
public CppEmitContext(ModuleContainer module) { Module = module; Buf = new CppEmitBuffer(); Buf.EmitContext = this; }
public void Restore(string id) { Buf = _stash[id]; }