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

review: feat: CtScanner#scan of Collection and Map #1805

Merged
merged 2 commits into from
Mar 3, 2018

Conversation

pvojtechovsky
Copy link
Collaborator

@pvojtechovsky pvojtechovsky commented Jan 1, 2018

The main purpose of this PR is, to be able to handle scanning of whole collection or whole map. It is needed for #1686 for the matching algorithms which matches a sequence of elements. For example in list of 5 commands match first if followed by for

@INRIA INRIA deleted a comment from spoon-bot Jan 1, 2018
@pvojtechovsky pvojtechovsky changed the title WiP: refactor: EarlyTerminatingScanner review: feat: CtScanner#scan of Collection and Map Mar 3, 2018
@pvojtechovsky
Copy link
Collaborator Author

This PR contains more thinks - but they are related and it is not easily possible to deliver them individually.

  1. CtScanner - has a scan method now which is called for whole scanned Collection or Map
  2. EarlyTerminatingScanner - implements this method and terminates early
  3. EarlyTerminatingScanner - is more encapsulated now - ScanningMode contract is checked directly here - so clients can use it more easily
  4. CtScannerFunction$Scanner - uses that EarlyTerminatingScanner ScanningMode contract

WDYT?

@monperrus
Copy link
Collaborator

I'm OK with that.

Could you add a test case to specify to contract of this new public method?

@spoon-bot
Copy link
Collaborator

API changes: 1 (Detected by Revapi)

Old API: fr.inria.gforge.spoon:spoon-core:jar:6.2.0-20180303.083720-120 / New API: fr.inria.gforge.spoon:spoon-core:jar:6.2.0-SNAPSHOT

The number of parameters of the method have changed.
Old method EarlyTerminatingScanner#doScan(CtElement, ScanningMode)
New method EarlyTerminatingScanner#doScan(CtRole, CtElement, ScanningMode)
Breaking binary: breaking

@monperrus monperrus merged commit 86a4d25 into INRIA:master Mar 3, 2018
@monperrus
Copy link
Collaborator

thanks!

@pvojtechovsky pvojtechovsky deleted the refEarlyTermScanner branch March 3, 2018 14:34
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

Successfully merging this pull request may close these issues.

3 participants