java.lang.Object
de.grogra.xl.compiler.xl16u.XL16ULoweringSegment
Explicit model for one source slice lowered by the XL 1.6U frontend.
The current backend still consumes compatibility source, but these segments
give migration work an object-level handoff to validate and later replace
slice-by-slice.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionXL16ULoweringSegment(XL16ULoweringSegment.Kind kind, int sourceStart, int sourceEnd, String sourceText, String compatibilityText) XL16ULoweringSegment(XL16ULoweringSegment.Kind kind, int sourceStart, int sourceEnd, String sourceText, String compatibilityText, XL16USymbolMetadata symbolMetadata, XL16URangedSymbol rangedSymbol, XL16UWriteSite writeSite) XL16ULoweringSegment(XL16ULoweringSegment.Kind kind, XL16UOffsetRange sourceRange, String sourceText, String compatibilityText) XL16ULoweringSegment(XL16ULoweringSegment.Kind kind, XL16UOffsetRange sourceRange, String sourceText, String compatibilityText, XL16USymbolMetadata symbolMetadata, XL16URangedSymbol rangedSymbol, XL16UWriteSite writeSite) -
Method Summary
Modifier and TypeMethodDescriptionbooleanintgetCompatibilityRange(int compatibilityStart) getKind()intgetProjectedCompatibilityRange(int accumulatedDelta) intintintbooleanbooleanbooleanbooleanbooleanstatic booleanbooleanstatic booleanstatic StringrewriteSource(String source, List<XL16ULoweringSegment> segments)
-
Constructor Details
-
XL16ULoweringSegment
public XL16ULoweringSegment(XL16ULoweringSegment.Kind kind, int sourceStart, int sourceEnd, String sourceText, String compatibilityText) -
XL16ULoweringSegment
public XL16ULoweringSegment(XL16ULoweringSegment.Kind kind, XL16UOffsetRange sourceRange, String sourceText, String compatibilityText) -
XL16ULoweringSegment
public XL16ULoweringSegment(XL16ULoweringSegment.Kind kind, int sourceStart, int sourceEnd, String sourceText, String compatibilityText, XL16USymbolMetadata symbolMetadata, XL16URangedSymbol rangedSymbol, XL16UWriteSite writeSite) -
XL16ULoweringSegment
public XL16ULoweringSegment(XL16ULoweringSegment.Kind kind, XL16UOffsetRange sourceRange, String sourceText, String compatibilityText, XL16USymbolMetadata symbolMetadata, XL16URangedSymbol rangedSymbol, XL16UWriteSite writeSite)
-
-
Method Details
-
getKind
-
isDeclaration
public boolean isDeclaration() -
isStatement
public boolean isStatement() -
isDeclarationKind
-
isStatementKind
-
getSourceStart
public int getSourceStart() -
getSourceEnd
public int getSourceEnd() -
getSourceRange
-
getCompatibilityRange
-
getProjectedCompatibilityRange
-
getSourceText
-
getCompatibilityText
-
getSourceLength
public int getSourceLength() -
getCompatibilityLength
public int getCompatibilityLength() -
getLengthDelta
public int getLengthDelta() -
changesLength
public boolean changesLength() -
getSymbolMetadata
-
hasSymbolMetadata
public boolean hasSymbolMetadata() -
getValueContract
-
hasValueContract
public boolean hasValueContract() -
getRangedSymbol
-
hasRangedSymbol
public boolean hasRangedSymbol() -
getWriteSite
-
hasWriteSite
public boolean hasWriteSite() -
getSymbolName
-
rewriteSource
-