aboutsummaryrefslogtreecommitdiff
path: root/src/all.hff
diff options
context:
space:
mode:
Diffstat (limited to 'src/all.hff')
-rw-r--r--src/all.hff27
1 files changed, 25 insertions, 2 deletions
diff --git a/src/all.hff b/src/all.hff
index 89f2b71..e8298b0 100644
--- a/src/all.hff
+++ b/src/all.hff
@@ -1,4 +1,5 @@
import "libc.hff";
+import "option.hff";
/// Macros
@@ -17,6 +18,10 @@ defmacro assert {
/// Types
+struct Type;
+struct Decl;
+struct Expr;
+
struct Loc {
fileid u16,
idx isize,
@@ -26,13 +31,25 @@ struct Loc {
#[lax]
enum TokT {
- kw_or
+ kw_and, kw_as, kw_break, kw_case, kw_const,
+ kw_continue, kw_def, kw_defmacro, kw_do,
+ kw_else, kw_enum, kw_extern, kw_fn,
+ kw_for, kw_if, kw_import, kw_let, kw_not,
+ kw_or, kw_return, kw_sizeof, kw_static,
+ kw_struct, kw_switch, kw_typedef, kw_typeof,
+ kw_union, kw_while,
}
+
struct Tok {
t int,
+ ty *const Type,
u union {
- i i64
+ int i64,
+ uint u64,
+ float f64,
+ bool bool,
+ str [#]const u8,
},
}
@@ -40,6 +57,12 @@ struct Decl {
}
struct Parser {
+ fp *FILE,
+ curfile [#]const u8,
+ tokloc Loc,
+ curloc Loc,
+ eof bool,
+ peekchr Option<int>,
}