예제 #1
0
        protected override bool Visit(ASTFileNode node)
        {
            foreach (var declaration in node.Declarations)
            {
                if (!Visit(declaration))
                {
                    return(false);
                }

                if (_lastNode is CDeclaration d)
                {
                    _globalScole.Add(d);
                }
                if (_lastNode is CTypedef t)
                {
                    _typedefs.Add(t);
                }
                else
                {
                    return(false); // This should never happen
                }
            }

            return(true);
        }
예제 #2
0
 protected virtual bool Visit(ASTFileNode node) => Visit(node.Declarations);