Modules | Files | Inheritance Tree | Inheritance Graph | Name Index | Config
module Synopsis::Core::AST
class AST
Files: Synopsis/Core/AST.py

Top-level Abstract Syntax Tree. The AST represents the whole AST for a file or group of files as a list of declarations and a types dictionary.


Operations Summary:
 __init__(self, files = None, declarations = None, typedict = None)
Constructor [Source]
 files(self)
The files this AST represents. [Source]
 declarations(self)
List of Declaration objects. [Source]
 types(self)
Dictionary of types. [Source]
 accept(self, visitor)
Accept the given visitor [Source]
 merge(self, other_ast)
Merges another AST. [Source]

Operation Details:
  files(self)

The files this AST represents. Returns a dictionary mapping filename to SourceFile objects.


  declarations(self)

List of Declaration objects. These are the declarations at file scope


  types(self)

Dictionary of types. This is a Type.Dictionary object


  merge(self, other_ast)

Merges another AST. Files and declarations are appended to those in this AST, and types are merged by overwriting existing types - Unduplicator is responsible for sorting out the mess this may cause :)