Package org.sonar.iac.docker.parser
Class DockerPreprocessor.SourceOffset
- java.lang.Object
-
- org.sonar.iac.docker.parser.DockerPreprocessor.SourceOffset
-
- Enclosing class:
- DockerPreprocessor
public static class DockerPreprocessor.SourceOffset extends Object
-
-
Constructor Summary
Constructors Constructor Description SourceOffset(com.sonar.sslr.api.typed.Input input, SortedMap<Integer,Integer> shiftedOffsetMap)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intadjustIndex(int index)int[]sourceLineAndColumnAt(int index)Adjust index of parsed token to reflect actual location in the code.
-
-
-
Method Detail
-
sourceLineAndColumnAt
public int[] sourceLineAndColumnAt(int index)
Adjust index of parsed token to reflect actual location in the code. This adjustment only works in ascending order, i.e. the indices must be the same or higher for each call. This is done for performance reasons.
-
adjustIndex
public int adjustIndex(int index)
-
-