Example #1
0
        public override bool Walk(FoxPro.Compiler.Ast.FunctionDefinition node)
        {
            FunctionNode functionNode = new FunctionNode(node);

            AddNode(functionNode);
            return(true);
        }
Example #2
0
        public void Analyze(FoxPro.Compiler.Ast.FunctionDefinition function)
        {
            this.argument = 0;
            this.function = function;

            foreach (Expression param in function.Parameters)
            {
                param.Walk(this);
                argument++;
            }
        }
Example #3
0
        // FunctionDefinition
        public override bool Walk(FoxPro.Compiler.Ast.FunctionDefinition node)
        {
            // Name is defined in the enclosing scope
            Define(node.Name, new FunctionDefinition(node));

            // process the default arg values in the outer scope
            foreach (Expression e in node.Defaults)
            {
                e.Walk(this);
            }
            // process the decorators in the outer scope
            if (node.Decorators != null)
            {
                node.Decorators.Walk(this);
            }

            PushScope(node);

            argumentAnalyzer.Analyze(node);
            return(true);
        }
Example #4
0
 public void PostWalk(FoxPro.Compiler.Ast.FunctionDefinition node)
 {
     AssertCurrent(node); current = current.Parent;
 }
Example #5
0
 // FunctionDefinition
 public bool Walk(FoxPro.Compiler.Ast.FunctionDefinition node)
 {
     current = node; return(Process(node));
 }
Example #6
0
 public FunctionScope(Module module, Scope parent, FoxPro.Compiler.Ast.FunctionDefinition statement)
     : base(module, parent)
 {
     this.statement = statement;
 }
Example #7
0
 public FunctionNode(FoxPro.Compiler.Ast.FunctionDefinition functionDefinition)
 {
     this.func = functionDefinition;
 }
Example #8
0
 public override void PostWalk(FoxPro.Compiler.Ast.FunctionDefinition node)
 {
     scopes.Pop();
 }
Example #9
0
 public ArgumentDefinition(SymbolId name, FoxPro.Compiler.Ast.FunctionDefinition function, int argument)
 {
     this.name     = name;
     this.function = function;
     this.argument = argument;
 }
Example #10
0
 private List <Inferred> InferFuncDef(FoxPro.Compiler.Ast.FunctionDefinition node, Scope scope)
 {
     Debug.Print("Not implemented: InferFuncDefIn");
     return(null);
 }
Example #11
0
 private void PushScope(FoxPro.Compiler.Ast.FunctionDefinition func)
 {
     PushScope(new FunctionScope(module, current, func));
 }
Example #12
0
 public FunctionDefinitionInfo(FoxPro.Compiler.Ast.FunctionDefinition function)
 {
     this.function = function;
 }