yhirose / cpp-peglib

A single file C++ header-only PEG (Parsing Expression Grammars) library
MIT License
884 stars 112 forks source link

Using a custom AST node type is broken #116

Closed peoro closed 4 years ago

peoro commented 4 years ago

Using a custom AST node type is broken in the latest versions.

That's because peg::parser::enable_ast<T> calls peg::add_ast_action (i.e. peg::add_ast_action<peg::Ast>) instead of peg::add_ast_action<T>, in peglib.h:3940.

yhirose commented 4 years ago

@peoro, thanks for catching the bug, and sent a pull request to fix it!