Skip to content

Add %template/%endtemplate pre-processor directives#263

Open
aspizu wants to merge 2 commits intomainfrom
feat/template-directive
Open

Add %template/%endtemplate pre-processor directives#263
aspizu wants to merge 2 commits intomainfrom
feat/template-directive

Conversation

@aspizu
Copy link
Owner

@aspizu aspizu commented Mar 21, 2026

Adds %template and %endtemplate pre-processor directives that allow defining multi-line macro bodies as a named template, stored in simple_defines for later substitution.

Changes

  • src/lexer/token.rs: Added Token::Template and Token::EndTemplate variants with Display implementations
  • src/pre_processor.rs: Added parse_template() method and updated token cleanup filter

Re-implementation of feature/template-directive based from latest main.

@faretek1
Copy link

Isnt it dangerous to use u8 here because of unicode?

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.

2 participants