private class SourceMapGeneratorV3.LineMapper extends java.lang.Object implements SourceMapGeneratorV3.MappingVisitor
Modifier and Type | Field and Description |
---|---|
private int |
maxLine |
private java.lang.Appendable |
out |
private int |
previousColumn |
private int |
previousLine |
private int |
previousNameId |
private int |
previousSourceColumn |
private int |
previousSourceFileId |
private int |
previousSourceLine |
Constructor and Description |
---|
LineMapper(java.lang.Appendable out,
int maxLine) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
appendLineMappings() |
private void |
closeLine(boolean finalEntry)
End the entry for a line.
|
private void |
openLine(boolean firstEntry)
Begin the entry for a new line.
|
void |
visit(SourceMapGeneratorV3.Mapping m,
int line,
int col,
int nextLine,
int nextCol)
As each segment is visited write out the appropriate line mapping.
|
(package private) void |
writeEntry(SourceMapGeneratorV3.Mapping m,
int column)
Writes an entry for the given column (of the generated text) and
associated mapping.
|
private final java.lang.Appendable out
private final int maxLine
private int previousLine
private int previousColumn
private int previousSourceFileId
private int previousSourceLine
private int previousSourceColumn
private int previousNameId
public void visit(SourceMapGeneratorV3.Mapping m, int line, int col, int nextLine, int nextCol) throws java.io.IOException
visit
in interface SourceMapGeneratorV3.MappingVisitor
m
- The mapping for the current code segment. null if the segment
is unmapped.line
- The starting line for this code segment.col
- The starting column for this code segment.nextLine
- The ending linenextCol
- The ending columnjava.io.IOException
void writeEntry(SourceMapGeneratorV3.Mapping m, int column) throws java.io.IOException
java.io.IOException
void appendLineMappings() throws java.io.IOException
java.io.IOException
private void openLine(boolean firstEntry) throws java.io.IOException
java.io.IOException
private void closeLine(boolean finalEntry) throws java.io.IOException
java.io.IOException