mirror of
https://github.com/ilyakooo0/intellij-haskell.git
synced 2024-10-26 15:13:25 +03:00
Fix issue #500
This commit is contained in:
parent
59d28aabcf
commit
8a41115958
@ -632,7 +632,7 @@ public class HaskellParser implements PsiParser, LightPsiParser {
|
||||
}
|
||||
|
||||
/* ********************************************************** */
|
||||
// (atype | TILDE | UNDERSCORE)+
|
||||
// (atype | TILDE | UNDERSCORE | VERTICAL_BAR)+
|
||||
static boolean btype(PsiBuilder b, int l) {
|
||||
if (!recursion_guard_(b, l, "btype")) return false;
|
||||
boolean r;
|
||||
@ -647,13 +647,14 @@ public class HaskellParser implements PsiParser, LightPsiParser {
|
||||
return r;
|
||||
}
|
||||
|
||||
// atype | TILDE | UNDERSCORE
|
||||
// atype | TILDE | UNDERSCORE | VERTICAL_BAR
|
||||
private static boolean btype_0(PsiBuilder b, int l) {
|
||||
if (!recursion_guard_(b, l, "btype_0")) return false;
|
||||
boolean r;
|
||||
r = atype(b, l + 1);
|
||||
if (!r) r = consumeToken(b, HS_TILDE);
|
||||
if (!r) r = consumeToken(b, HS_UNDERSCORE);
|
||||
if (!r) r = consumeToken(b, HS_VERTICAL_BAR);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
@ -186,7 +186,7 @@ ttype2 ::= ("forall" | FORALL)? onl ttype (onl DOUBLE_RIGHT
|
||||
|
||||
ttype ::= "!"? (btype (oonls RIGHT_ARROW oonls ttype)* | list_type q_name* | LEFT_PAREN RIGHT_ARROW RIGHT_PAREN)
|
||||
|
||||
private btype ::= (atype | TILDE | UNDERSCORE)+ // generalization because left recursive is not supported and UNDERSCORE because of partial type signatures
|
||||
private btype ::= (atype | TILDE | UNDERSCORE | VERTICAL_BAR)+ // generalization because left recursive is not supported and UNDERSCORE because of partial type signatures
|
||||
|
||||
simpletype ::= ttype | (q_name | LEFT_PAREN RIGHT_PAREN)+ |
|
||||
q_name* oonls LEFT_PAREN q_name RIGHT_PAREN oonls q_name* |
|
||||
|
Loading…
Reference in New Issue
Block a user