예제 #1
0
        public FlowControlScope BeginControlBlock()
        {
            var subScope = new FlowControlScope(this, this.Depth + 1);

            this.children.Add(subScope);
            return(subScope);
        }
예제 #2
0
 public FlowControlScope(FlowControlScope parent, int depth)
 {
     CurrentStartLabel = Instruction.Label();
     CurrentEndLabel   = Instruction.Label();
     this.parent       = parent;
     this.Depth        = depth;
     this.children     = new List <FlowControlScope>();
 }
예제 #3
0
        // 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;
        }
예제 #4
0
 public void EndControlBlock()
 {
     this.flowControl = this.flowControl.EndControlBlock();
 }
예제 #5
0
 public void BeginControlBlock()
 {
     this.flowControl = this.flowControl.BeginControlBlock();
 }