Exemplo n.º 1
0
        public FlowControlScope BeginControlBlock()
        {
            var subScope = new FlowControlScope(this, this.Depth + 1);

            this.children.Add(subScope);
            return(subScope);
        }
Exemplo n.º 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>();
 }
Exemplo n.º 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;
        }
Exemplo n.º 4
0
 public void EndControlBlock()
 {
     this.flowControl = this.flowControl.EndControlBlock();
 }
Exemplo n.º 5
0
 public void BeginControlBlock()
 {
     this.flowControl = this.flowControl.BeginControlBlock();
 }