Skip to content

Conversation

@charlespwd
Copy link
Contributor

Architectural changes

  • parse_expression and safe_parse_expression have been removed from Tag and ParseContext
  • Parser methods now produce AST nodes instead of strings
    • Parser#expression produces a value,
    • Parser#string produces a string,
    • etc.

Breaking changes

  • Parser#expression is renamed to Parser#expression_string
  • safe_parse_expression methods are replaced by Parser#expression
  • parse_expression methods are replaced by Parser#unsafe_parse_expression

@charlespwd charlespwd force-pushed the cp-expression-refactor branch from 9e95ad0 to 5e3d8f4 Compare December 3, 2025 17:46
@charlespwd charlespwd force-pushed the cp-expression-refactor branch from 5e3d8f4 to 34101f9 Compare January 12, 2026 16:56
@charlespwd charlespwd force-pushed the cp-one-parser branch 3 times, most recently from d0ccab5 to f4a5454 Compare January 14, 2026 14:55
- Make `Parser` accept the expression cache
- Remove `safe_parse_expression` from `ParseContext`
- Replace all usage of `safe_parse_expression` with `parser.expression_node`
- Add Parser#string
- Add Parser#unsafe_parse_expression
- Add private Parser#parse_expression
- Remove ParseContext.parse_expression
- Remove Tag.parse_expression
- Condition.parse_expression now takes a parser as argument
We don't need all the multi-dot logic in a world where number comes
out of the Lexer.
Goal is to get rid of it entirely, but baby steps.
@charlespwd charlespwd force-pushed the cp-expression-refactor branch from 34101f9 to 806c613 Compare January 14, 2026 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant