Encapsulate data about the correspondence between ranges of generated code and ranges of a Lingua Franca file.
More...
|
| Position | adjusted (Path lfFile, Position generatedFilePosition) |
| | Returns the position in lfFile corresponding to generatedFilePosition if such a position is known, or the zero Position otherwise.
|
| Range | adjusted (Path lfFile, Range generatedFileRange) |
| | Returns the range in lfFile corresponding to generatedFileRange if such a range is known, or a degenerate Range otherwise.
|
| int | firstNonWhitespace (int line) |
| String | getGeneratedCode () |
| | Returns the generated code (without Correspondences).
|
| Set< Path > | lfSourcePaths () |
| | Returns the set of all paths to Lingua Franca files that are known to contain code that corresponds to code in the generated file represented by this.
|
Encapsulate data about the correspondence between ranges of generated code and ranges of a Lingua Franca file.
◆ adjusted() [1/2]
| Position org.lflang.generator.CodeMap.adjusted |
( |
Path | lfFile, |
|
|
Position | generatedFilePosition ) |
Returns the position in lfFile corresponding to generatedFilePosition if such a position is known, or the zero Position otherwise.
- Parameters
-
| lfFile | the path to an arbitrary Lingua Franca source file |
| generatedFilePosition | a position in a generated file |
- Returns
- the position in lfFile corresponding to generatedFilePosition
◆ adjusted() [2/2]
| Range org.lflang.generator.CodeMap.adjusted |
( |
Path | lfFile, |
|
|
Range | generatedFileRange ) |
Returns the range in lfFile corresponding to generatedFileRange if such a range is known, or a degenerate Range otherwise.
- Parameters
-
| lfFile | the path to an arbitrary Lingua Franca source file |
| generatedFileRange | a position in a generated file |
- Returns
- the range in lfFile corresponding to generatedFileRange
◆ firstNonWhitespace()
| int org.lflang.generator.CodeMap.firstNonWhitespace |
( |
int | line | ) |
|
◆ fromGeneratedCode()
| CodeMap org.lflang.generator.CodeMap.fromGeneratedCode |
( |
String | internalGeneratedCode | ) |
|
|
static |
Instantiate a CodeMap from internalGeneratedCode.
internalGeneratedCode may be invalid code that is different from the final generated code because it should contain deserializable representations of Correspondences.
- Parameters
-
| internalGeneratedCode | code from a code generator that contains serialized Correspondences |
- Returns
- a CodeMap documenting the provided code
◆ getGeneratedCode()
| String org.lflang.generator.CodeMap.getGeneratedCode |
( |
| ) |
|
Returns the generated code (without Correspondences).
- Returns
- the generated code (without Correspondences)
◆ lfSourcePaths()
| Set< Path > org.lflang.generator.CodeMap.lfSourcePaths |
( |
| ) |
|
Returns the set of all paths to Lingua Franca files that are known to contain code that corresponds to code in the generated file represented by this.
The documentation for this class was generated from the following file:
- /Users/runner/work/lingua-franca/lingua-franca/core/src/main/java/org/lflang/generator/CodeMap.java