Skip to content

Commit 333924c

Browse files
committed
v0.3 Release
1 parent 574b82c commit 333924c

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

code/demo.odin

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ main :: proc() {
4141

4242
// Divisor based modulo operator
4343
{
44-
x: i128 = -5;
44+
x: i128 = -15;
4545
y: i128 = 2;
4646

4747
fmt.println(x % y); // Dividend based
@@ -73,6 +73,7 @@ main :: proc() {
7373
id: u64,
7474
position: [vector 2]f32,
7575
name: string,
76+
7677
Tree{leaf_count: int},
7778
Frog{ribbit_volume: f32},
7879
}
@@ -81,7 +82,7 @@ main :: proc() {
8182
e = Entity.Frog{ribbit_volume = 0.5, name = "Trevor"};
8283

8384
if frog, ok := e.(Entity.Frog); ok {
84-
fmt.printf("%s the frog ribbit's at %f\n", frog.name, frog.ribbit_volume);
85+
fmt.printf("%s the frog ribbits at %f\n", frog.name, frog.ribbit_volume);
8586
}
8687

8788
// Panics if the type assertion fails
@@ -153,7 +154,7 @@ main :: proc() {
153154

154155

155156

156-
Float32Data :: bit_field {
157+
Float32Data :: bit_field #align 4 {
157158
fraction: 23,
158159
exponent: 8,
159160
sign: 1,
@@ -182,7 +183,7 @@ main :: proc() {
182183
}
183184

184185
// Goals for v0.4 and further
185-
// * Compile as C++and use some of its constructs for sanity e.g. overloading
186+
// * Compile as C++ and use some of its constructs for sanity e.g. overloading
186187
// - Safe array with bounds checking
187188
// - Map type for self documentation
188189
// - u128 i128 acting like core types
@@ -196,4 +197,5 @@ main :: proc() {
196197
// - Foreign variables
197198
// * Documentation Generation System for code
198199
// * General Documentation for Odin
200+
// * Attributes
199201
}

core/_preload.odin

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ TypeInfoEnumValue :: raw_union {
3030
}
3131
// NOTE(bill): This must match the compiler's
3232
CallingConvention :: enum {
33-
ODIN = 0,
33+
Odin = 0,
3434
C = 1,
35-
STD = 2,
36-
FAST = 3,
35+
Std = 2,
36+
Fast = 3,
3737
}
3838

3939
TypeInfoRecord :: struct #ordered {
@@ -326,7 +326,6 @@ __complex64_ne :: proc(a, b: complex64) -> bool #inline { return real(a) != re
326326
__complex128_eq :: proc(a, b: complex128) -> bool #inline { return real(a) == real(b) && imag(a) == imag(b); }
327327
__complex128_ne :: proc(a, b: complex128) -> bool #inline { return real(a) != real(b) || imag(a) != imag(b); }
328328

329-
330329
__assert :: proc(file: string, line, column: int, msg: string) #inline {
331330
fmt.fprintf(os.stderr, "%s(%d:%d) Runtime assertion: %s\n",
332331
file, line, column, msg);

src/parser.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3880,7 +3880,6 @@ AstNodeArray parse_stmt_list(AstFile *f) {
38803880
AstNodeArray list = make_ast_node_array(f);
38813881

38823882
while (f->curr_token.kind != Token_case &&
3883-
// f->curr_token.kind != Token_default &&
38843883
f->curr_token.kind != Token_CloseBrace &&
38853884
f->curr_token.kind != Token_EOF) {
38863885
AstNode *stmt = parse_stmt(f);

0 commit comments

Comments
 (0)