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

DSLD: AssignedVariable pointcut does not match in non-declaring assignment #600

Closed
ybayk opened this issue Jun 10, 2018 · 1 comment
Closed
Assignees
Milestone

Comments

@ybayk
Copy link

ybayk commented Jun 10, 2018

For the given pointcut
contribute(bind(exprs: assignedVariable())) {...}

The following use cases work as expected:

  //note we do NOT declare variable foo here 
  foo = {
     bar {
       baz { | }
     }
   }

or works with declaration

def foo = |

But the following use case fails to match:
foo = |

ErrorRecoveredCSTParserPlugin fails to obtain an AST in case of simple assignment, but succeed in case of declarative assignment, for which groovy.g has an GRECLIPSE specific recovery for incomplete binary expression by injecting a right side variable "?"

The problem with simple (non-declarative) assignment is that similar recovery is missing in assignmentExpression.

PR is coming

@ybayk
Copy link
Author

ybayk commented Jun 10, 2018

PR: #601

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants