A declaration.
Most declarations either define or have a type.
The general order of the children of a declaration is as follows:
Annotations (Modifier | Type) Identifier TypeParameters? Parameters* CaseTypes? ExtendedType? SatisfiedTypes? TypeConstraints? (Body | AnySpecifier? ";")
However, the only children common to all declarations are the name
of the declared program element and its annotations
.
Examples:
shared actual String string => "``outer.string`` by ``step``"; shared class Person(shared String name) { string => name; }
Anything
Object
Declaration
Node
Object
Anything
Initializer |
Declaration() |
Attributes | |
annotations | shared formal Annotations annotations The annotations on the declaration. |
name | shared formal Identifier? name The name of the declared program element, if present. |
Inherited Attributes |
Attributes inherited from: Node |
Attributes inherited from: Object hash , string |
Inherited Methods |
Methods inherited from: Node |
Methods inherited from: Object equals |