-
Notifications
You must be signed in to change notification settings - Fork 10
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
Fixed a problem with the begin and end position of a MultiTypeParameter #31
base: master
Are you sure you want to change the base?
Conversation
in CatchClause (it was not correctly computed).
Thanks :) ! But notice that the build is failing because of a compilation issue |
I had the same problem, but it was solved after deleting ASTParser.java in src/main/java/org/walkmod/javalang . Javacc should generate ASTParser.java in target/generated-sources/javacc/org/walkmod/javalang . This will be added to the classpath by maven and the rest of the compilation will work properly. I'll update my pull request with the elimination of ASTParser.java |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor suggestion. After that, 👍
final VariableDeclaratorId exceptId, final BlockStmt catchBlock) { | ||
super(beginLine, beginColumn, endLine, endColumn); | ||
setExcept(new MultiTypeParameter(beginLine, beginColumn, endLine, endColumn, exceptModifier, exceptAnnotations, | ||
setExcept(new MultiTypeParameter((modifierBeginLine!=-1)?modifierBeginLine:exceptTypes.get(0).getBeginLine(), (modifierBeginColumn!=-1)?modifierBeginColumn:exceptTypes.get(0).getBeginColumn(), exceptId.getEndLine(), exceptId.getEndColumn(), exceptModifier, exceptAnnotations, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it makes more sense in this case, just add the MultiTypeParameter
as argument instead of exposing the internal properties of this class?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I didn't get your point. MultiTypeParameter
is already an argument in this piece of code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry for the delayed response. My point is if it can be an argument of the CatchClause
constructor, instead of setting the except
to avoid exposing the stucture of MultitypeParameter
in the constructor.
There was a problem in the begin and end position of a MultiTypeParameter. Their values were the same as in the CathClause.