From 1fdb7cd31d569d3c358ff8f4854561775982a4bc Mon Sep 17 00:00:00 2001 From: Mike Lischke Date: Wed, 19 Apr 2017 14:23:44 +0200 Subject: [PATCH] Update C++ target doc for latest API changes - fixes #1824. --- doc/cpp-target.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/cpp-target.md b/doc/cpp-target.md index 80c57f378..45d4758ad 100644 --- a/doc/cpp-target.md +++ b/doc/cpp-target.md @@ -63,9 +63,9 @@ int main(int argc, const char* argv[]) { CommonTokenStream tokens(&lexer); MyGrammarParser parser(&tokens); - Ref tree = parser.key(); - Ref listener(new TreeShapeListener()); - tree::ParseTreeWalker::DEFAULT->walk(listener, tree); + tree::ParseTree *tree = parser.key(); + TreeShapeListener listener; + tree::ParseTreeWalker::DEFAULT->walk(&listener, tree); return 0; }