Add range-based error messages to -verbose-errors

Example:
Cannot convert '(1 + 2)' to 'untyped bool' from 'untyped integer'

	x := (1 + 2) * true;
	     ^~~~~~^
This commit is contained in:
gingerBill
2021-05-19 14:15:57 +01:00
parent 5108ebf015
commit 9c54ed5792
9 changed files with 429 additions and 167 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ bool is_diverging_stmt(Ast *stmt) {
return false;
}
if (expr->CallExpr.proc->kind == Ast_BasicDirective) {
String name = expr->CallExpr.proc->BasicDirective.name;
String name = expr->CallExpr.proc->BasicDirective.name.string;
return name == "panic";
}
Ast *proc = unparen_expr(expr->CallExpr.proc);