Skip to content

Commit

Permalink
Remove hardcoded part
Browse files Browse the repository at this point in the history
  • Loading branch information
kiip1 committed Mar 2, 2023
1 parent f325a1a commit 709f470
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,11 @@ else if (peek().type() == TokenType.MACRO) {
}

private @NotNull ASTStructureEntry<?> entry() {
final String key = element(List.of(TokenType.COLON)).visit(null);
final ASTNode node = element(List.of(TokenType.END));
final ASTNode key = element(List.of(TokenType.COLON));
final boolean statementList = ifEat(TokenType.END);

if (key.equals("trigger"))
return new ASTStructureEntry<>(key, statementList());
return new ASTStructureEntry<>(key, node);
if (statementList) return new ASTStructureEntry<>(key, statementList());
else return new ASTStructureEntry<>(key, element(List.of(TokenType.END)));
}

private @NotNull ASTStatementList statementList() {
Expand Down

0 comments on commit 709f470

Please sign in to comment.