Modules | Files | Inheritance Tree | Inheritance Graph | Name Index | Config
module Synopsis::Core::AST
class Declaration
Files: Synopsis/Core/AST.py
Declaration-inheritance Scopes/Synopsis/Core/AST/Macro.html Scopes/Synopsis/Core/AST/Enum.html Scopes/Synopsis/Core/AST/Typedef.html Scopes/Synopsis/Core/AST/Enumerator.html Scopes/Synopsis/Core/AST/Const.html Scopes/Synopsis/Core/AST/Function.html Scopes/Synopsis/Core/AST/Group.html Scopes/Synopsis/Core/AST/Forward.html Scopes/Synopsis/Core/AST/Variable.html

Declaration base class. Every declaration has a name, comments, accessibility and type. The default accessibility is DEFAULT except for C++ where the Parser always sets it to one of the other three.


Operations Summary:
 __init__(self, file, line, language, strtype, name) [Source]
 file(self)
The SourceFile this declaration appeared in [Source]
 line(self)
The line of the file this declaration started at [Source]
 language(self)
The language this declaration is in [Source]
 type(self)
A string name of the type of this declaration [Source]
 name(self)
The scoped tuple name of this declaration [Source]
 comments(self)
A list of Comment objects [Source]
 accept(self, visitor)
Visit the given visitor [Source]
 accessibility(self)
One of the accessibility constants. [Source]
 set_name(self, name)
Change the name of the declaration. [Source]
 set_accessibility(self, axs)
Change the accessibility [Source]

Operation Details:
  accessibility(self)

One of the accessibility constants. This may be one of DEFAULT, PUBLIC, PROTECTED or PRIVATE, which are defined at module scope (Synopsis.AST)


  set_name(self, name)

Change the name of the declaration. If you do want to change the name (and you probably don't!) then make sure you update your 'types' dictionary too!