Esempio n. 1
0
        internal Module(LoadDirective[] loadStmts, UseStatementList useStmts, DefStatement[] globalDefStmts, Function[] functions)
            : base(HappySourceLocation.None, HappySourceLocation.None)
        {
            ContractUtils.RequiresNotNull(loadStmts, "loadStmts");
            ContractUtils.RequiresNotNull(useStmts, "useStmts");
            ContractUtils.RequiresNotNull(globalDefStmts, "globalDefStmts");
            ContractUtils.RequiresNotNull(functions,  "functions");

            this.LoadDirectives = loadStmts;
            this.UseStatements = useStmts;
            this.GlobalDefStatements = globalDefStmts;
            this.Functions = functions;
        }
Esempio n. 2
0
 public virtual void AfterVisit(DefStatement node)
 {
     this.AfterVisitCatchAll(node);
 }
Esempio n. 3
0
 public virtual void BeforeVisit(DefStatement node)
 {
     this.BeforeVisitCatchAll(node);
 }
Esempio n. 4
0
 public override void AfterVisit(DefStatement node)
 {
     var initializers = _expressionStack.Pop(node.VariableDefs.Count(vd => vd.InitializerExpression != null)).ToList();
     _expressionStack.Push(node, initializers.Count == 0 ? Expression.Empty() : MaybeBlock(initializers));
     base.AfterVisit(node);
 }