hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 3825875eb530ba6354461026bd99cefedf7148ef
parent f8e1221decb4bad55bf5b8feb41e0af56ce74b7a
Author: Drew DeVault <sir@cmpwn.com>
Date:   Mon, 19 Apr 2021 08:52:31 -0400

hare::parse: don't unnecessarily unwrap errors

Diffstat:
Mhare/parse/expr.ha | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/hare/parse/expr.ha b/hare/parse/expr.ha @@ -274,10 +274,10 @@ fn builtin(lexer: *lex::lexer) (ast::expr | error) = { void => return postfix(lexer, void), }; return switch (tok.0) { - ltok::ALLOC => alloc_expr(lexer)?, - ltok::APPEND => append_expr(lexer)?, - ltok::DELETE => delete_expr(lexer)?, - ltok::FREE => free_expr(lexer)?, + ltok::ALLOC => alloc_expr(lexer), + ltok::APPEND => append_expr(lexer), + ltok::DELETE => delete_expr(lexer), + ltok::FREE => free_expr(lexer), ltok::ABORT, ltok::ASSERT => assert_expr(lexer, false), ltok::STATIC => { want(lexer, ltok::STATIC)?; @@ -295,7 +295,7 @@ fn builtin(lexer: *lex::lexer) (ast::expr | error) = { * => abort(), }; }, - ltok::SIZE, ltok::LEN, ltok::OFFSET => measurement(lexer)?, + ltok::SIZE, ltok::LEN, ltok::OFFSET => measurement(lexer), ltok::DEFER => { want(lexer, ltok::DEFER)?; alloc(expression(lexer)?): ast::defer_expr;