Class DockerPreprocessor.SourceOffset

    • Field Detail

      • input

        protected final com.sonar.sslr.api.typed.Input input
    • Constructor Detail

      • SourceOffset

        public SourceOffset​(com.sonar.sslr.api.typed.Input input,
                            SortedMap<Integer,​Integer> shiftedOffsetMap)
    • 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)