From 9f3edcbeea51dd8841b9d89fa7ef98f11682a1c7 Mon Sep 17 00:00:00 2001 From: Mustafa Quraish Date: Thu, 3 Feb 2022 21:01:03 -0500 Subject: Add support for basic structs Structs for now (and probably for the near future) are not allowed to be passed by value, and instead you just pass a pointer to it. Nested structs can also be defined, and they can be either anonymous, or named (in which case only the members can access the type). --- src/tokens.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/tokens.h') diff --git a/src/tokens.h b/src/tokens.h index f02cfb0..6eaad8e 100644 --- a/src/tokens.h +++ b/src/tokens.h @@ -14,6 +14,7 @@ F(TOKEN_CLOSE_PAREN, ")") \ F(TOKEN_COLON, ":") \ F(TOKEN_COMMA, ",") \ + F(TOKEN_DOT, ".") \ F(TOKEN_EOF, "EOF") \ F(TOKEN_EQ, "==") \ F(TOKEN_EXCLAMATION, "!") \ @@ -55,6 +56,7 @@ F(TOKEN_INT, "int") \ F(TOKEN_LET, "let") \ F(TOKEN_RETURN, "return") \ + F(TOKEN_STRUCT, "struct") \ F(TOKEN_WHILE, "while") \ F(TOKEN_IMPORT, "import") \ -- cgit v1.2.3