Пример #1
0
 public ForLoopExpression(CompoundLeftValue/*!*/ variables, Expression/*!*/ list, Statements body, SourceSpan location)
     : base(location) {
     Assert.NotNull(variables, list);
     
     _block = new BlockDefinition(null, variables, body, location);
     _list = list;
 }
Пример #2
0
        public ForLoopExpression(LexicalScope/*!*/ definedScope, Parameters/*!*/ variables, Expression/*!*/ list, Statements body, SourceSpan location)
            : base(location) {
            Assert.NotNull(definedScope, variables, list);

            _block = new BlockDefinition(definedScope, variables, body, location);
            _list = list;
        }
Пример #3
0
 // misc:
 public virtual bool Enter(BlockDefinition/*!*/ node) { return true; }
Пример #4
0
 public virtual void Exit(BlockDefinition/*!*/ node) { }
Пример #5
0
 public ShutdownHandlerStatement(LexicalScope/*!*/ definedScope, Statements/*!*/ body, SourceSpan location)
     : base(location) {
     _block = new BlockDefinition(definedScope, null, body, location);
 }
Пример #6
0
        protected override void Walk(BlockDefinition node)
        {
            var statements = currentClass == null ? AST.Statements : currentClass.Body.Statements;
            var methodname = "__lambda_" + blockPrefix + "_" + ++blockUniqueId;

            LexicalScope scope = currentClass != null ? currentClass.DefinedScope
                : /* HACK HACK HACK */
                (LexicalScope)AST.GetType().GetField("_definedScope", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(AST);

            statements.Add(new MethodDefinition(scope, null, methodname, node.Parameters, new Body(node.Body, null, null, null, node.Location), node.Location));
            transformations.RefactoredBlocksToMethods.Add(node, methodname);
        }
Пример #7
0
 public ShutdownHandlerStatement(LexicalScope /*!*/ definedScope, Statements /*!*/ body, SourceSpan location)
     : base(location)
 {
     _block = new BlockDefinition(definedScope, null, body, location);
 }
Пример #8
0
 public LambdaDefinition(BlockDefinition block)
     : base(block.Location)
 {
     _block = block;
 }
Пример #9
0
 public virtual void Exit(BlockDefinition /*!*/ node)
 {
 }
Пример #10
0
 // misc:
 public virtual bool Enter(BlockDefinition /*!*/ node)
 {
     return(true);
 }
Пример #11
0
 public LambdaDefinition(BlockDefinition block)
     : base(block.Location)
 {
     _block = block;
 }
Пример #12
0
 public ShutdownHandlerStatement(LexicalScope /*!*/ definedScope, Statements /*!*/ body, SourceSpan location)
     : base(location)
 {
     _block = new BlockDefinition(definedScope, CompoundLeftValue.UnspecifiedBlockSignature, body, location);
 }
 public ShutdownHandlerStatement(LexicalScope/*!*/ definedScope, Statements/*!*/ body, SourceSpan location)
     : base(location) {
     _block = new BlockDefinition(definedScope, CompoundLeftValue.UnspecifiedBlockSignature, body, location);
 }