From 9a11b5420cba16e54570881287483ca912a89634 Mon Sep 17 00:00:00 2001 From: volodya-lombrozo Date: Thu, 26 Dec 2024 17:41:09 +0300 Subject: [PATCH] feat(#3743): remove redundant code --- .../src/main/java/org/eolang/parser/XeEoListener.java | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/eo-parser/src/main/java/org/eolang/parser/XeEoListener.java b/eo-parser/src/main/java/org/eolang/parser/XeEoListener.java index b324a172cb..a4d46bdd1e 100644 --- a/eo-parser/src/main/java/org/eolang/parser/XeEoListener.java +++ b/eo-parser/src/main/java/org/eolang/parser/XeEoListener.java @@ -1112,7 +1112,7 @@ public void enterData(final EoParser.DataContext ctx) { text.substring(1, text.length() - 1) ).getBytes(StandardCharsets.UTF_8) ); - } else if (ctx.TEXT() != null) { + } else { base = "string"; final int indent = ctx.getStart().getCharPositionInLine(); data = new BytesToHex( @@ -1120,15 +1120,6 @@ public void enterData(final EoParser.DataContext ctx) { XeEoListener.trimMargin(text, indent) ).getBytes(StandardCharsets.UTF_8) ); - } else { - base = "unknown"; - data = ctx::getText; - this.errors.add( - new ParsingException( - ctx.getStart().getLine(), - String.format("Unknown data type: %s", ctx.getText()) - ) - ); } this.objects.prop("base", base).data(data.get()); }