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

4.7.1 C++ target not translating $ctx.start.text #2265

Open
azrdev opened this issue Mar 29, 2018 · 0 comments
Open

4.7.1 C++ target not translating $ctx.start.text #2265

azrdev opened this issue Mar 29, 2018 · 0 comments

Comments

@azrdev
Copy link

azrdev commented Mar 29, 2018

Docs state that accessing tokens/rules not explicitly named works with statements like these:

$stop.line
$start.text
$ctx.start.index
$ctx.stop.type

However, C++ code generation does not like them:

  • $stop and $start are not recognized, have to use $ctx.stop/start instead
  • above $ctx statements fail to comile with member reference type 'GParser::RContext *' is a pointer; did you mean to use '->'?
  • changing to $ctx->start->text yields no member named 'text' in 'antlr4::Token'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant