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

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