mirror of
https://github.com/ilyakooo0/intellij-haskell.git
synced 2024-08-17 10:40:44 +03:00
Fix parser
This commit is contained in:
parent
eed48c55ed
commit
cd122ba5ef
@ -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;
|
||||
}
|
||||
|
@ -8,9 +8,6 @@ import java.util.List;
|
||||
|
||||
public interface HaskellExport extends HaskellCompositeElement {
|
||||
|
||||
@Nullable
|
||||
HaskellConid getConid();
|
||||
|
||||
@Nullable
|
||||
HaskellDotDot getDotDot();
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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() {
|
||||
|
@ -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?
|
||||
|
Loading…
Reference in New Issue
Block a user