Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix listener example in C++ documentation. #1895

Merged
merged 1 commit into from
Jun 2, 2017
Merged

Fix listener example in C++ documentation. #1895

merged 1 commit into from
Jun 2, 2017

Conversation

kosak
Copy link
Contributor

@kosak kosak commented Jun 1, 2017

The listener example still refers to Ref<> and shared pointers, but in
reality the generated method does not pass a shared pointer. The actual
signature looks more like this:

  virtual void enterKey(ParserRuleContext * /*ctx*/) override { }

This change updates the example to match that signature, and removes a line
discussing Ref<>. It also adds the override keyword in order to make the
user's code a little more robust against typos/changes in the grammar.

The listener example still refers to Ref<> and shared pointers, but in
reality the generated method does not pass a shared pointer. The actual
signature looks more like this:

  virtual void enterKey(ParserRuleContext * /*ctx*/) override { }

This change updates the example to match that signature, and removes a line
discussing Ref<>. It also adds the "override" keyword in order to make the
user's code a little more robust against typos/changes in the grammar.
@parrt parrt added this to the 4.7.1 milestone Jun 2, 2017
@parrt parrt merged commit fd1930e into antlr:master Jun 2, 2017
@kosak kosak deleted the doc2 branch June 2, 2017 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants