hare

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

commit d30f6012cfcd7ef95afabe0ae38a6875adb23d4a
parent db6d5277706e606b48035fea8bed8736deb8b2a6
Author: Drew DeVault <sir@cmpwn.com>
Date:   Thu, 15 Apr 2021 12:19:02 -0400

hare::parse: use const where appropriate

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

diff --git a/hare/parse/expr.ha b/hare/parse/expr.ha @@ -42,7 +42,7 @@ fn binarithm( }; fn cast(lexer: *lex::lexer, lvalue: (ast::expr | void)) (ast::expr | error) = { - let lvalue = match (lvalue) { + const lvalue = match (lvalue) { void => unarithm(lexer)?, e: ast::expr => e, }; @@ -65,7 +65,7 @@ fn cast(lexer: *lex::lexer, lvalue: (ast::expr | void)) (ast::expr | error) = { }; fn constant(lexer: *lex::lexer) (ast::expr | error) = { - let tok = want(lexer)?; + const tok = want(lexer)?; return switch (tok.0) { ltok::LIT_U8, ltok::LIT_U16, ltok::LIT_U32, ltok::LIT_U64, ltok::LIT_UINT, ltok::LIT_SIZE, ltok::LIT_I8, ltok::LIT_I16,