Exemplo n.º 1
0
        public override void VisitFile(FileSyntaxNode node)
        {
            _methodAssignments = new MethodAssignments();
            foreach (var nodeOrToken in node.Body.Statements)
            {
                if (nodeOrToken.IsToken)
                {
                    continue;
                }

                var n = nodeOrToken.AsNode();
                if (n.Kind == TokenKind.FunctionDeclaration)
                {
                    var functionDeclaration = (FunctionDeclarationSyntaxNode)n;
                    _methodAssignments.Add(functionDeclaration.Name.Text, new Variable());
                }
            }
            base.VisitFile(node);
        }