CompilationUnitImpl constructor
CompilationUnitImpl({
- required Token beginToken,
- required ScriptTagImpl? scriptTag,
- required List<
DirectiveImpl> ? directives, - required List<
CompilationUnitMemberImpl> ? declarations, - required Token endToken,
- required FeatureSet featureSet,
- required LineInfo lineInfo,
Initialize a newly created compilation unit to have the given directives
and declarations. The scriptTag
can be null
if there is no script tag
in the compilation unit. The list of directives
can be null
if there
are no directives in the compilation unit. The list of declarations
can
be null
if there are no declarations in the compilation unit.
Implementation
CompilationUnitImpl({
required this.beginToken,
required ScriptTagImpl? scriptTag,
required List<DirectiveImpl>? directives,
required List<CompilationUnitMemberImpl>? declarations,
required this.endToken,
required this.featureSet,
required this.lineInfo,
}) : _scriptTag = scriptTag {
_becomeParentOf(_scriptTag);
_directives._initialize(this, directives);
_declarations._initialize(this, declarations);
}