diff --git a/language-antlr-utils/src/main/java/de/jplag/antlr/TokenBuilder.java b/language-antlr-utils/src/main/java/de/jplag/antlr/TokenBuilder.java index 4dab47b9e..08e393ef7 100644 --- a/language-antlr-utils/src/main/java/de/jplag/antlr/TokenBuilder.java +++ b/language-antlr-utils/src/main/java/de/jplag/antlr/TokenBuilder.java @@ -111,7 +111,7 @@ void createToken(T antlrContent, VariableRegistry semantics) { int line = antlrToken.getLine(); int column = antlrToken.getCharPositionInLine() + 1; - int length = antlrToken.getText().length(); + int length = getLength(antlrContent); Token token; if (semantics != null) {