Even more work

This commit is contained in:
Michael Fabian 'Xaymar' Dirks
2025-02-12 00:03:19 +01:00
parent b61005bcaa
commit 15b8ed7690
9 changed files with 250 additions and 55 deletions
+13 -1
View File
@@ -29,6 +29,8 @@
// - Function, Return, End Function: Defines a function, and allows returning values. Yes, I know, End itself terminates the program, this is a special case. Thanks younger Sibly.
// - And, Or, Not: Logical operator, self-explanatory really.
#undef NULL
namespace blitz {
namespace ast {
struct node {
@@ -72,7 +74,17 @@ namespace blitz {
static std::shared_ptr<blitz::ast::node> try_parse(std::shared_ptr<blitz::lexer> lexer);
};
struct expression : public node {};
struct declare : public node {
// Local, Global
bool global;
std::list<std::shared_ptr<blitz::ast::node>> nodes;
virtual ~declare();
static bool can_parse(std::shared_ptr<blitz::lexer> lexer);
static std::shared_ptr<blitz::ast::node> try_parse(std::shared_ptr<blitz::lexer> lexer);
};
struct expression : public node {};
} // namespace ast
} // namespace blitz