*WIP* error sets - correctly resolve inferred error sets

This commit is contained in:
Andrew Kelley
2018-02-02 18:13:32 -05:00
parent 39d5f44863
commit b8f59e14cd
16 changed files with 351 additions and 90 deletions

View File

@@ -1088,12 +1088,13 @@ static BinOpType tok_to_mult_op(Token *token) {
case TokenIdSlash: return BinOpTypeDiv;
case TokenIdPercent: return BinOpTypeMod;
case TokenIdBang: return BinOpTypeErrorUnion;
case TokenIdBarBar: return BinOpTypeMergeErrorSets;
default: return BinOpTypeInvalid;
}
}
/*
MultiplyOperator = "!" | "*" | "/" | "%" | "**" | "*%"
MultiplyOperator = "||" | "*" | "/" | "%" | "**" | "*%"
*/
static BinOpType ast_parse_mult_op(ParseContext *pc, size_t *token_index, bool mandatory) {
Token *token = &pc->tokens->at(*token_index);