compilationUnit abstract method

CompilationUnit compilationUnit({
  1. required Token beginToken,
  2. ScriptTag? scriptTag,
  3. List<Directive>? directives,
  4. List<CompilationUnitMember>? declarations,
  5. required Token endToken,
  6. required FeatureSet featureSet,
  7. LineInfo? lineInfo,
})

Returns a newly created compilation unit to have the given directives and declarations. The scriptTag can be null (or omitted) if there is no script tag in the compilation unit. The list of declarations can be null (or omitted) if there are no directives in the compilation unit. The list of declarations can be null (or omitted) if there are no declarations in the compilation unit.

Implementation

CompilationUnit compilationUnit({
  required Token beginToken,
  ScriptTag? scriptTag,
  List<Directive>? directives,
  List<CompilationUnitMember>? declarations,
  required Token endToken,
  required FeatureSet featureSet,
  LineInfo? lineInfo,
});