Skip to content

chore(base-parsing, base-expression, base-template-processor): wire Rule into ExpressionParser/TemplateParser and port ELParser/JtParser to AbstractParser#53

Merged
deer merged 1 commit intomainfrom
parsing_part3
Apr 30, 2026
Merged

chore(base-parsing, base-expression, base-template-processor): wire Rule into ExpressionParser/TemplateParser and port ELParser/JtParser to AbstractParser#53
deer merged 1 commit intomainfrom
parsing_part3

Conversation

@deer
Copy link
Copy Markdown
Collaborator

@deer deer commented Apr 30, 2026

  • ExpressionParser<N> and TemplateParser<N> now implement Rule<N> / Rule<List<N>>, exposing a tryParse(Scanner) entry point that stops on unrecognised tokens rather than throwing — backed by the new Tokenizer.tokenize(Scanner) overload. The existing parse(String) methods are preserved and delegate to tryParse.
  • ELParser is ported to AbstractParser<Node>: the manual Scanner field, followsKeyword/consumeKeyword private methods, and hand-rolled error translation are all removed in favour of inherited infrastructure. parseComposite replaces its manual depth-tracking loop with Scanner#consumeBalanced.
  • JtParser.parse now accepts a String (full file content) instead of List<String>; the separate HeaderParser is removed and replaced by a new JtFileParser extends AbstractParser<ParsedTemplate> that handles the entire file in one scanner pass. TemplateProcessor uses Files.readString at the call site.

…ule into ExpressionParser/TemplateParser and port ELParser/JtParser to AbstractParser
@deer deer merged commit 5134db2 into main Apr 30, 2026
3 checks passed
@deer deer deleted the parsing_part3 branch April 30, 2026 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant