Skip to content

Commit

Permalink
feat(#3743): remove redundant code
Browse files Browse the repository at this point in the history
  • Loading branch information
volodya-lombrozo committed Dec 26, 2024
1 parent fe84ab5 commit 9a11b54
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions eo-parser/src/main/java/org/eolang/parser/XeEoListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -1112,23 +1112,14 @@ 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(
StringEscapeUtils.unescapeJava(
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());
}
Expand Down

0 comments on commit 9a11b54

Please sign in to comment.