Minor
This commit is contained in:
@@ -435,7 +435,7 @@ public class JetParsing extends AbstractJetParsing {
|
|||||||
*/
|
*/
|
||||||
boolean parseModifierList(
|
boolean parseModifierList(
|
||||||
@NotNull AnnotationParsingMode annotationParsingMode,
|
@NotNull AnnotationParsingMode annotationParsingMode,
|
||||||
@Nullable TokenSet noModifiersBefore
|
@NotNull TokenSet noModifiersBefore
|
||||||
) {
|
) {
|
||||||
return parseModifierList(null, annotationParsingMode, noModifiersBefore);
|
return parseModifierList(null, annotationParsingMode, noModifiersBefore);
|
||||||
}
|
}
|
||||||
@@ -448,7 +448,7 @@ public class JetParsing extends AbstractJetParsing {
|
|||||||
boolean parseModifierList(
|
boolean parseModifierList(
|
||||||
@Nullable Consumer<IElementType> tokenConsumer,
|
@Nullable Consumer<IElementType> tokenConsumer,
|
||||||
@NotNull AnnotationParsingMode annotationParsingMode,
|
@NotNull AnnotationParsingMode annotationParsingMode,
|
||||||
@Nullable TokenSet noModifiersBefore
|
@NotNull TokenSet noModifiersBefore
|
||||||
) {
|
) {
|
||||||
PsiBuilder.Marker list = mark();
|
PsiBuilder.Marker list = mark();
|
||||||
boolean empty = true;
|
boolean empty = true;
|
||||||
@@ -477,12 +477,12 @@ public class JetParsing extends AbstractJetParsing {
|
|||||||
return !empty;
|
return !empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean tryParseModifier(@Nullable Consumer<IElementType> tokenConsumer, @Nullable TokenSet noModifiersBefore) {
|
private boolean tryParseModifier(@Nullable Consumer<IElementType> tokenConsumer, @NotNull TokenSet noModifiersBefore) {
|
||||||
PsiBuilder.Marker marker = mark();
|
PsiBuilder.Marker marker = mark();
|
||||||
|
|
||||||
if (atSet(MODIFIER_KEYWORDS)) {
|
if (atSet(MODIFIER_KEYWORDS)) {
|
||||||
IElementType lookahead = lookahead(1);
|
IElementType lookahead = lookahead(1);
|
||||||
if (noModifiersBefore == null || lookahead != null && !noModifiersBefore.contains(lookahead)) {
|
if (lookahead != null && !noModifiersBefore.contains(lookahead)) {
|
||||||
IElementType tt = tt();
|
IElementType tt = tt();
|
||||||
if (tokenConsumer != null) {
|
if (tokenConsumer != null) {
|
||||||
tokenConsumer.consume(tt);
|
tokenConsumer.consume(tt);
|
||||||
|
|||||||
Reference in New Issue
Block a user