The following features are supported:
While the grammar restricts the order of the directives and declarations within a compilation unit, this class does not enforce those restrictions. In particular, the children of a compilation unit will be visited in lexical order even if lexical order does not conform to the restrictions of the grammar.
compilationUnit ::= directives declarations directives ::= {@link ScriptTag scriptTag}? {@link LibraryDirective libraryDirective}? namespaceDirective* {@link PartDirective partDirective}| {@link PartOfDirective partOfDirective}namespaceDirective ::= {@link ImportDirective importDirective}| {@link ExportDirective exportDirective}declarations ::= {@link CompilationUnitMember compilationUnitMember}@coverage dart.engine.ast
The following features are supported:
Source
object.
@author Clement Wong
@see flex2.compiler.Source
This class represents the entire compilation unit. Each java file denotes a compilation unit.
The CompilationUnit is constructed following the syntax: CompilationUnit ::= ( {@link PackageDeclaration} )?
( {@link ImportDeclaration} )*
( {@link TypeDeclaration} )*
@author Julio Vilmar Gesser
The source range for this type of node is ordinarily the entire source file, including leading and trailing whitespace and comments.
For JLS2:CompilationUnit: [ PackageDeclaration ] { ImportDeclaration } { TypeDeclaration | ; }For JLS3, the kinds of type declarations grew to include enum and annotation type declarations:
CompilationUnit: [ PackageDeclaration ] { ImportDeclaration } { TypeDeclaration | EnumDeclaration | AnnotationTypeDeclaration | ; }@since 2.0
Please do not use outside of jdom.
The source range for this type of node is ordinarily the entire source file, including leading and trailing whitespace and comments.
For JLS2:CompilationUnit: [ PackageDeclaration ] { ImportDeclaration } { TypeDeclaration | ; }For JLS3, the kinds of type declarations grew to include enum and annotation type declarations:
CompilationUnit: [ PackageDeclaration ] { ImportDeclaration } { TypeDeclaration | EnumDeclaration | AnnotationTypeDeclaration | ; }@since 2.0 @noinstantiate This class is not intended to be instantiated by clients.
Please do not use outside of jdom.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|