Esempio n. 1
0
 private void ApplyVisitor(DeclarationVisitor visitor)
 {
     foreach (Declaration declaration in m_Class.Declarations)
     {
         declaration.AcceptVisitor(visitor);
     }
 }
Esempio 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;
        }
Esempio n. 3
0
 public override void AcceptVisitor(DeclarationVisitor visitor)
 {
     visitor.VisitIntDeclaration(this);
 }
Esempio n. 4
0
 public abstract void AcceptVisitor(DeclarationVisitor visitor);