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

feat: CtScannerListener knows role of scanned element #2739

Merged
merged 2 commits into from
Nov 4, 2018

Conversation

pvojtechovsky
Copy link
Collaborator

@pvojtechovsky pvojtechovsky commented Nov 3, 2018

Information about role of the scanned element is now available in CtScannerListener.

It makes algorithms of import validators easier and faster.

@pvojtechovsky pvojtechovsky changed the title WIP feat: CtScanerListener knows role of scanned element feat: CtScanerListener knows role of scanned element Nov 3, 2018
Copy link
Collaborator

@monperrus monperrus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

/**
* This method is called after the element and all its children have been visited.
* This method is NOT called if an exception is thrown in {@link #enter(CtElement)} or during the scanning of the element or any of its children element.
* This method is NOT called for an element for which {@link #enter(CtElement)} returned {@link ScanningMode#SKIP_ALL}.
*
* @param role the {@link CtRole}, which `element` has in it's parent. It is null for the first scanned element
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @param role the {@link CtRole}, which `element` has in it's parent. It is null for the first scanned element
* @param role the {@link CtRole}, which `element` has in its parent. It is null for the first scanned element

/**
* Called before the scanner enters an element
*
* @param role the {@link CtRole}, which `element` has in it's parent. It is null for the first scanned element
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @param role the {@link CtRole}, which `element` has in it's parent. It is null for the first scanned element
* @param role the {@link CtRole}, which `element` has in its parent. It is null for the first scanned element

@monperrus monperrus changed the title feat: CtScanerListener knows role of scanned element feat: CtScannerListener knows role of scanned element Nov 3, 2018
@monperrus monperrus merged commit a6b31e9 into INRIA:master Nov 4, 2018
@monperrus
Copy link
Collaborator

Thanks Pavel!

@pvojtechovsky pvojtechovsky deleted the featScanListRole branch November 4, 2018 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants