package graphql.parser;

import graphql.language.SourceLocation;
import org.antlr.v4.runtime.Token;

class SourceLocationHelper {

    static SourceLocation mkSourceLocation(MultiSourceReader multiSourceReader, Token token) {
        //
        // multi source reader lines are 0 based while Antler lines are 1's based
        //
        // Antler columns ironically are 0 based - go figure!
        //
        int tokenLine = token.getLine() - 1;
        MultiSourceReader.SourceAndLine sourceAndLine = multiSourceReader.getSourceAndLineFromOverallLine(tokenLine);
        //
        // graphql spec says line numbers and columns start at 1
        int line = sourceAndLine.getLine() + 1;
        int column = token.getCharPositionInLine() + 1;
        return new SourceLocation(line, column, sourceAndLine.getSourceName());
    }

}

@@ -18,16 +18,41 @@
 arser;%0A%0A
+import graphql.Internal;%0A
 import g
@@ -119,16 +119,33 @@
 Token;%0A%0A
+@Internal%0Apublic 
 class So

make SourceLocationHelper public