commit 6085c10bebe42fd7dcb41734c86d122e5b8736fe
parent 37f47c120bf9cf72a226eabf12462e22df275c20
Author: Drew DeVault <sir@cmpwn.com>
Date: Sun, 14 Feb 2021 12:37:38 -0500
hare::lex: add ATTR_OFFSET
Diffstat:
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/hare/lex/lex.ha b/hare/lex/lex.ha
@@ -79,7 +79,6 @@ export fn lex(lex: *lexer) ((token, location) | io::EOF | error) = {
')' => btoken::RPAREN,
';' => btoken::SEMICOLON,
};
-
return (tok, loc);
};
diff --git a/hare/lex/token.ha b/hare/lex/token.ha
@@ -5,6 +5,7 @@ export type btoken = enum {
ATTR_FINI,
ATTR_INIT,
ATTR_NORETURN,
+ ATTR_OFFSET,
ATTR_SYMBOL,
ATTR_TEST,
UNDERSCORE,
@@ -117,6 +118,7 @@ const bmap: [_]str = [
"@fini",
"@init",
"@noreturn",
+ "@offset",
"@symbol",
"@test",
"_",
@@ -241,8 +243,10 @@ export type literal_type = enum {
I32,
I64,
INT,
+ ICONST,
F32,
F64,
+ FCONST,
VOID,
};