Beispiel #1
0
		public void Push()
		{
			var oldBuf = Buf;
			_stack.Add (Buf);
			Buf = new JsEmitBuffer();
			Buf.EmitContext = this;
			Buf.IndentLevel = oldBuf.IndentLevel; 
		}
Beispiel #2
0
        public JsEmitBuffer Pop()
        {
            var ret = Buf;

            Buf = _stack[_stack.Count - 1];
            _stack.RemoveAt(_stack.Count - 1);
            return(ret);
        }
Beispiel #3
0
        public void Stash(string id)
        {
            var oldBuf = Buf;

            _stash[id]      = Buf;
            Buf             = new JsEmitBuffer();
            Buf.EmitContext = this;
            Buf.IndentLevel = oldBuf.IndentLevel;
        }
Beispiel #4
0
        public void Push()
        {
            var oldBuf = Buf;

            _stack.Add(Buf);
            Buf             = new JsEmitBuffer();
            Buf.EmitContext = this;
            Buf.IndentLevel = oldBuf.IndentLevel;
        }
Beispiel #5
0
		public void Stash(string id)
		{
			var oldBuf = Buf;
			_stash[id] = Buf;
			Buf = new JsEmitBuffer();
			Buf.EmitContext = this;
			Buf.IndentLevel = oldBuf.IndentLevel; 
		}
Beispiel #6
0
		public JsEmitBuffer Pop()
		{
			var ret = Buf;
			Buf = _stack[_stack.Count - 1];
			_stack.RemoveAt(_stack.Count - 1);
			return ret;
		}
Beispiel #7
0
		public JsEmitContext(ModuleContainer module)
		{
			Module = module;
			Buf = new JsEmitBuffer();
			Buf.EmitContext = this;
		}
Beispiel #8
0
		public void Restore(string id)
		{
			Buf = _stash[id];
		}
Beispiel #9
0
 public JsEmitContext(ModuleContainer module)
 {
     Module          = module;
     Buf             = new JsEmitBuffer();
     Buf.EmitContext = this;
 }
Beispiel #10
0
 public void Restore(string id)
 {
     Buf = _stash[id];
 }