Skip to content

Commit fd1930e

Browse files
authored
Merge pull request #1895 from kosak/doc2
Fix listener example in C++ documentation.
2 parents fd5efc2 + 1bb3eb1 commit fd1930e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/cpp-target.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ using namespace org::antlr::v4::runtime;
4949

5050
class TreeShapeListener : public MyGrammarBaseListener {
5151
public:
52-
void enterKey(Ref<ParserRuleContext> ctx) {
52+
void enterKey(ParserRuleContext *ctx) override {
5353
// Do something when entering the key rule.
5454
}
5555
};
@@ -72,7 +72,7 @@ int main(int argc, const char* argv[]) {
7272

7373
```
7474
75-
This example assumes your grammar contains a parser rule named `key` for which the enterKey function was generated. The `Ref<>` template is an alias for `std::shared_ptr<>` to simplify the runtime source code which often makes use of smart pointers.
75+
This example assumes your grammar contains a parser rule named `key` for which the enterKey function was generated.
7676
7777
## Specialities of this ANTLR target
7878

0 commit comments

Comments
 (0)