Skip to content

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