hare

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

commit 6e2bf61ec7170b3d0f003cd4315c09db140f8b6e
parent eedd0843577d6339c7c197cdb1e9450955a65591
Author: Drew DeVault <sir@cmpwn.com>
Date:   Fri, 19 Feb 2021 14:32:42 -0500

update stdlib

Diffstat:
Mgen-stdlib | 2+-
Mmain.ha | 5+++--
2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/gen-stdlib b/gen-stdlib @@ -163,7 +163,7 @@ hare_lex() { gensrcs_hare_lex \ +test.ha fi - gen_ssa hare::lex io bufio strings types fmt + gen_ssa hare::lex io bufio strings types fmt sort } gensrcs_io() { diff --git a/main.ha b/main.ha @@ -8,9 +8,10 @@ export fn main() void = { for (true) match (lex::lex(&lexer)) { t: (lex::token, lex::location) => { let tok = t.0, loc = t.1; - fmt::println("{}@{},{}: '{}'", + fmt::println("{}@{},{}: {4}{}{4}", loc.path, loc.line, loc.col, - lex::tokstr(tok)); + lex::tokstr(tok), + if (tok is lex::name) "'" else ""); }, err: lex::error => fmt::fatal("Error: {}", lex::errstr(err)), io::EOF => break,