SourceCodeUnit class

A source code implementation of a CodeUnit.

Inheritance
Available Extensions

Constructors

SourceCodeUnit(String language, String source, {String id = '', String? namespace})

Properties

code String
The code.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
id String
The ID of this Code Unit, usually a file path.
finalinherited
language String
Programming language of the code.
finalinherited
lines List<String>
Returns the code lines.
no setter
namespace String?
The namespace of this code.
getter/setter pairinherited
root ASTRoot?
The ASTRoot corresponding to the code.
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

generate<O extends Object, S extends ApolloCodeUnitStorage<D>, D extends Object>(ApolloGenerator<O, S, D> codeGenerator) → O
Generates the code of this ASTRoot (root), using codeGenerator.
inherited
generateCode(ApolloCodeGenerator codeGenerator) StringBuffer
Generates the code of this ASTRoot (root), using codeGenerator.
inherited
getLine(int lineNumber) String?
Returns a source line.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited