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: |
One of the accessibility constants. This may be one of DEFAULT, PUBLIC, PROTECTED or PRIVATE, which are defined at module scope (Synopsis.AST)
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!