llama.cpp
f0ae0d94 - peg-parser: use enum-based tags instead of strings

Commit
249 days ago
peg-parser: use enum-based tags instead of strings Replace string-based AST tags with integer tag IDs backed by enums: - Add common_chat_peg_tag enum with all chat parser tags - Change common_peg_ast_node::tag (string) to tag_id (int) - Add p.tag(enum, parser) and p.atomic_tag(enum, parser) template methods - Refactor mappers to use switch statements for exhaustive dispatch - Update preset.cpp with local ini_tag enum Benefits: - Type safety: compiler catches tag name typos - Exhaustive switches: compiler warns about missing cases - Faster dispatch: integer comparison vs string comparison - Less boilerplate: direct enum usage instead of wrapper methods 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
References
Author
Parents
Loading