Exemplo n.º 1
0
 private void ApplyVisitor(DeclarationVisitor visitor)
 {
     foreach (Declaration declaration in m_Class.Declarations)
     {
         declaration.AcceptVisitor(visitor);
     }
 }
Exemplo n.º 2
0
        private static void GetDeclarations(string sourceFileName, IParseTree tree, IEnumerable <Declaration> existingDeclarations, out IEnumerable <Declaration> newDeclarations, out IEnumerable <string> fileTags)
        {
            var variableDeclarationVisitor = new DeclarationVisitor(sourceFileName, existingDeclarations);

            try
            {
                variableDeclarationVisitor.Visit(tree);
            }
            catch (TypeException e)
            {
                throw new TypeException(e.Context, e.InternalMessage, sourceFileName);
            }

            // Upon exit, newDeclarations will now contain every variable
            // declaration we found
            newDeclarations = variableDeclarationVisitor.NewDeclarations;

            fileTags = variableDeclarationVisitor.FileTags;
        }
Exemplo n.º 3
0
 public override void AcceptVisitor(DeclarationVisitor visitor)
 {
     visitor.VisitIntDeclaration(this);
 }
Exemplo n.º 4
0
 public abstract void AcceptVisitor(DeclarationVisitor visitor);