Removed optional parameter from enable_ast().

This commit is contained in:
yhirose 2015-06-12 18:12:54 -04:00
parent 79c6b7ce9b
commit 46470071f3
2 changed files with 9 additions and 8 deletions

View File

@ -49,7 +49,7 @@ int main(int argc, const char** argv)
" ~_ <- [ \t\r\n]* "
);
parser.enable_ast();
parser.enable_ast(true);
auto expr = argv[1];
shared_ptr<Ast> ast;

View File

@ -148,7 +148,13 @@ private:
/*
* Semantic values
*/
struct SemanticValue {
struct SemanticValue
{
any val;
const char* name;
const char* s;
size_t n;
SemanticValue()
: s(nullptr), n(0) {}
@ -168,11 +174,6 @@ struct SemanticValue {
std::string str() const {
return std::string(s, n);
}
any val;
const char* name;
const char* s;
size_t n;
};
struct SemanticValues : protected std::vector<SemanticValue>
@ -2057,7 +2058,7 @@ public:
return *this;
}
peg& enable_ast(bool optimize_nodes = true) {
peg& enable_ast(bool optimize_nodes) {
ast_end(optimize_nodes);
return *this;
}