public FlowControlScope BeginControlBlock() { var subScope = new FlowControlScope(this, this.Depth + 1); this.children.Add(subScope); return(subScope); }
public FlowControlScope(FlowControlScope parent, int depth) { CurrentStartLabel = Instruction.Label(); CurrentEndLabel = Instruction.Label(); this.parent = parent; this.Depth = depth; this.children = new List <FlowControlScope>(); }
// private int tempVariableCount; public ScriptCompilerContext(string assemblyName, XzaarExpression expressionTree) { MethodInstructions = new CompilerInstructionCollection(this); GlobalInstructions = new CompilerInstructionCollection(this); this.ExpressionTree = expressionTree; this.KnownTypes = new List <TypeReference>(); this.Assembly = XzaarAssembly.CreateAssembly(assemblyName); this.flowControl = new FlowControlScope(null, -1); this.rootFlowControl = this.flowControl; }
public void EndControlBlock() { this.flowControl = this.flowControl.EndControlBlock(); }
public void BeginControlBlock() { this.flowControl = this.flowControl.BeginControlBlock(); }