Fix type class constraint expressions not being correctly parsed
This commit is contained in:
parent
b23dc84f72
commit
acbfeb8975
2 changed files with 4 additions and 4 deletions
|
@ -885,11 +885,11 @@ namespace bolt {
|
|||
class TypeclassConstraintExpression : public ConstraintExpression {
|
||||
public:
|
||||
|
||||
Identifier* Name;
|
||||
IdentifierAlt* Name;
|
||||
std::vector<VarTypeExpression*> TEs;
|
||||
|
||||
TypeclassConstraintExpression(
|
||||
Identifier* Name,
|
||||
IdentifierAlt* Name,
|
||||
std::vector<VarTypeExpression*> TEs
|
||||
): ConstraintExpression(NodeKind::TypeclassConstraintExpression),
|
||||
Name(Name),
|
||||
|
|
|
@ -547,7 +547,7 @@ after_params:
|
|||
return parseExpressionStatement();
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
ConstraintExpression* Parser::parseConstraintExpression() {
|
||||
bool HasTilde = false;
|
||||
for (std::size_t I = 0; ; I++) {
|
||||
|
@ -572,7 +572,7 @@ after_seek:
|
|||
auto Right = parseArrowTypeExpression();
|
||||
return new EqualityConstraintExpression { Left, Tilde, Right };
|
||||
}
|
||||
auto Name = expectToken<Identifier>();
|
||||
auto Name = expectToken<IdentifierAlt>();
|
||||
std::vector<VarTypeExpression*> TEs;
|
||||
for (;;) {
|
||||
auto T1 = Tokens.peek();
|
||||
|
|
Loading…
Reference in a new issue