Fix parser

This commit is contained in:
Rik van der Kleij 2019-10-09 21:13:21 +02:00
parent eed48c55ed
commit cd122ba5ef
5 changed files with 4 additions and 13 deletions

View File

@ -2365,7 +2365,7 @@ public class HaskellParser implements PsiParser, LightPsiParser {
}
/* ********************************************************** */
// TYPE onl conid
// TYPE onl q_name
static boolean export3(PsiBuilder b, int l) {
if (!recursion_guard_(b, l, "export3")) return false;
if (!nextTokenIs(b, HS_TYPE)) return false;
@ -2373,7 +2373,7 @@ public class HaskellParser implements PsiParser, LightPsiParser {
Marker m = enter_section_(b);
r = consumeToken(b, HS_TYPE);
r = r && onl(b, l + 1);
r = r && conid(b, l + 1);
r = r && q_name(b, l + 1);
exit_section_(b, m, null, r);
return r;
}

View File

@ -8,9 +8,6 @@ import java.util.List;
public interface HaskellExport extends HaskellCompositeElement {
@Nullable
HaskellConid getConid();
@Nullable
HaskellDotDot getDotDot();

View File

@ -19,7 +19,7 @@ public class HaskellCdeclImpl extends HaskellCompositeElementImpl implements Has
}
public void accept(@NotNull PsiElementVisitor visitor) {
if (visitor instanceof HaskellVisitor) accept((HaskellVisitor)visitor);
if (visitor instanceof HaskellVisitor) accept((HaskellVisitor) visitor);
else super.accept(visitor);
}

View File

@ -25,12 +25,6 @@ public class HaskellExportImpl extends HaskellCompositeElementImpl implements Ha
else super.accept(visitor);
}
@Override
@Nullable
public HaskellConid getConid() {
return PsiTreeUtil.getChildOfType(this, HaskellConid.class);
}
@Override
@Nullable
public HaskellDotDot getDotDot() {

View File

@ -219,7 +219,7 @@ exports ::= LEFT_PAREN onl export ((onl COMMA)? onl export)*
export ::= export1 | export2 | export3
private export1 ::= MODULE modid
private export2 ::= q_name (onl LEFT_PAREN (onl q_name (onl COMMA onl q_name)*)? onl RIGHT_PAREN | onl LEFT_PAREN onl dot_dot onl RIGHT_PAREN)?
private export3 ::= TYPE onl conid
private export3 ::= TYPE onl q_name
newconstr ::= newconstr_fielddecl | q_name atype
newconstr_fielddecl ::= q_name onls LEFT_BRACE? onls type_signature onls RIGHT_BRACE?