From fcee181236de3f31e8332c83af03eed22671bcfc Mon Sep 17 00:00:00 2001 From: Alexander Milster Date: Thu, 10 Aug 2023 20:55:59 +0200 Subject: [PATCH] Fixed an error when extracting the token length --- .../src/main/java/de/jplag/antlr/TokenBuilder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {