hare

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

commit 0c3c90e7b5dbfa37090e6d68d9f54533b8a1d7b0
parent d2bd3e64b09c393b8779475e329b8d7ca3fdeae5
Author: Drew DeVault <sir@cmpwn.com>
Date:   Tue, 23 Feb 2021 15:05:30 -0500

hare::parse: simplify namespace usage

Diffstat:
Mhare/parse/+test.ha | 4++--
Mhare/parse/parse.ha | 6+++---
2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/hare/parse/+test.ha b/hare/parse/+test.ha @@ -48,7 +48,7 @@ use fmt; assert(len(ident) == 2); assert(ident[0] == "bar" && ident[1] == "foo"); let tok = lex::lex(&lexer) as (lex::token, lex::location); - assert(tok.0 as lex::btoken == hare::lex::btoken::SEMICOLON); + assert(tok.0 as lex::btoken == lex::btoken::SEMICOLON); }; }; @@ -96,6 +96,6 @@ use fmt; }; let tok = lex::lex(&lexer) as (lex::token, lex::location); - assert(tok.0 as lex::btoken == hare::lex::btoken::EXPORT); + assert(tok.0 as lex::btoken == lex::btoken::EXPORT); }; }; diff --git a/hare/parse/parse.ha b/hare/parse/parse.ha @@ -13,7 +13,7 @@ export fn ident(lexer: *lex::lexer) (ast::ident | error) = { append(ident, name); - match (try_btoken(lexer, hare::lex::btoken::DOUBLE_COLON)) { + match (try_btoken(lexer, lex::btoken::DOUBLE_COLON)) { err: error => return err, void => break, * => void, // Grab the next ident @@ -27,7 +27,7 @@ export fn ident(lexer: *lex::lexer) (ast::ident | error) = { export fn imports(lexer: *lex::lexer) ([]ast::import | error) = { let imports: []ast::import = []; for (true) { - match (try_btoken(lexer, hare::lex::btoken::USE)) { + match (try_btoken(lexer, lex::btoken::USE)) { err: error => return err, void => break, * => void, @@ -39,7 +39,7 @@ export fn imports(lexer: *lex::lexer) ([]ast::import | error) = { }; // TODO: Parse alternate import syntaxes - match (want_btoken(lexer, hare::lex::btoken::SEMICOLON)) { + match (want_btoken(lexer, lex::btoken::SEMICOLON)) { err: error => return err, lex::btoken => void, };