hare

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

commit a150d64f2f36fa60e836eecfd826fc1d6f13dcfa
parent d01e8a831282bc948ad5c02e25413f17289af02e
Author: Eyal Sawady <ecs@d2evs.net>
Date:   Mon, 15 Mar 2021 16:40:17 -0400

hare::lex::lex2: implement ! and !=

Diffstat:
Mhare/lex/lex.ha | 7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)

diff --git a/hare/lex/lex.ha b/hare/lex/lex.ha @@ -307,6 +307,13 @@ fn lex2( }, io::EOF => btoken::COLON, }, + '!' => match (n) { + r: rune => switch (r) { + '=' => return (btoken::NEQUAL: token, loc), + * => btoken::LNOT, + }, + io::EOF => btoken::LNOT, + }, '&' => match (n) { r: rune => switch (r) { '&' => return (btoken::LAND: token, loc),