summaryrefslogtreecommitdiff
path: root/src/parse/root.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/parse/root.cpp')
-rw-r--r--src/parse/root.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/parse/root.cpp b/src/parse/root.cpp
index 2c0acd4e..1ab010bd 100644
--- a/src/parse/root.cpp
+++ b/src/parse/root.cpp
@@ -640,6 +640,13 @@ AST::Impl Parse_Impl(TokenStream& lex)
}
switch(tok.type())
{
+ case TOK_RWORD_TYPE: {
+ GET_CHECK_TOK(tok, lex, TOK_IDENT);
+ ::std::string name = tok.str();
+ GET_CHECK_TOK(tok, lex, TOK_EQUAL);
+ impl.add_type(is_public, name, Parse_Type(lex));
+ GET_CHECK_TOK(tok, lex, TOK_SEMICOLON);
+ break; }
case TOK_RWORD_FN: {
GET_CHECK_TOK(tok, lex, TOK_IDENT);
::std::string name = tok.str();