-Release v0.0.7
+Release v0.1.0-beta
--------------
This release contains MANY CHANGES because I am terrible at keeping up to date with a
proper changelog and release schedule. Basically, this is the first release where I
version out there in a packaged format.
Additions:
+* Quick-Functions
+* do-expressions
+* typeof
+* '#auto' return type
* Macros and paste-able code blocks
* overloaded procedures can have polymorphic and overloaded procedures as overloads. This makes them MUCH more powerful.
* types are not required on struct members that have default values. This is still very experimental so there are some
Removals:
Changes:
+* initialization statements on if/while/switch are a lot more powerful.
* the "proc" keyword is now optional in a lot of cases. There are inevitably some bugs with this change,
but you can always add it in when it may be necessary. Note, that for overloaded procedures, "#match"
is now used.
expected_return_type = &func->type->Function.return_type;
if (func->body) {
CheckStatus status = check_block(func->body);
- if (status == Check_Error && func->generated_from)
+ if (status == Check_Error && func->generated_from && context.cycle_detected == 0)
ERROR(func->generated_from->pos, "Error in polymorphic procedure generated from this location.");
if (status != Check_Success) return status;
static AstMacro* parse_macro(OnyxParser* parser) {
AstMacro* macro = make_node(AstMacro, Ast_Kind_Macro);
macro->token = expect_token(parser, Token_Type_Keyword_Macro);
- macro->body = (AstTyped *) parse_function_definition(parser, macro->token);
+
+ // First try quick function
+ if (!parse_possible_quick_function_definition(parser, ¯o->body)) {
+ // Otherwise, do a normal function
+ macro->body = (AstTyped *) parse_function_definition(parser, macro->token);
+ }
ENTITY_SUBMIT(macro);
return macro;