* Compilation on Windows. All you should need is `cl.exe` in the current environment,
and then simply run `build.bat`. I haven't thoroughly tested this, but I believe
it will work on many systems. ARM / PowerPC may not work correctly.
+* procedures can be polymorphic on an array size.
+* structures can be polymorphic on any compile-time known value.
+* basics of operator overloading using `#operator +`.
+* multiple return values and multiple assignment / declarations.
* #solidify directive for explicitly specifying type variables in polymorphic procs.
* properly different kinds of allocators in core/alloc/.
* `null_proc` in builtin.onyx type matches against all procedure types, allowing for a
'null' procedure.
-* '-VV' for very verbose printing. Easier to nail down compiler issues because it stops
+* '-VV' and '-VVV' for very verbose printing. Easier to nail down compiler issues because it stops
printing in the entity where the problem is.
+* `io.Stream` API with `io.Reader` and `io.Writer`.
* `map.empty`
* `string.compare`
* `array.copy`
Removals:
* struct literals can no longer specify values for members brought in through a `use`.
+* Makefile; just use ./build.sh or ./build.bat
Changes:
* `::` declarations in a procedure are treated differently now. They used to represent a constant
* struct member defaults were processed too early in the pipeline, causing errors.
* assignment of array type with array literal optimization.
* probably many more since everything is compiled with warnings now.
+* deferred statements are correctly executed with break, continue and fallthrough.
+* `0..10` was not parsed correctly.
Release v0.0.5
}
stream_peek_byte :: proc (use s: ^Stream) -> (Error, u8) {
- out : u8;
- err : io.Error;
-
- err, out = stream_read_byte(s);
+ err, out := stream_read_byte(s);
if err != Error.None do return err, 0;
err = stream_unread_byte(s);
#define fori(var, lo, hi) for (i64 var = (lo); var < (hi); var++)
#define forir(var, hi, lo) for (i64 var = (hi); var >= (lo); var--)
-#define forll(T, var, start, step) for (T* var = (start); var != NULL; var = var->step)
+#define forll(T, var, start, step) for (T* var = (start); var != NULL; var = (T *) var->step)
#if defined(BH_DEBUG) && !defined(_BH_WINDOWS)
#define DEBUG_HERE __asm("int $3")
CHECK(expression, &retnode->expr);
if (!type_check_or_auto_cast(&retnode->expr, semstate.expected_return_type)) {
- onyx_report_error(retnode->expr->token->pos,
+ onyx_report_error(retnode->token->pos,
"Expected to return a value of type '%s', returning value of type '%s'.",
type_get_name(semstate.expected_return_type),
type_get_name(retnode->expr->type));