mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-28 13:54:57 +00:00
Merge pull request #1583 from semarie/semi-colons-eof
Semi colons and EOF
This commit is contained in:
@@ -479,4 +479,4 @@ discard_to_next_byte_lsb_from_stream :: proc(z: ^Context_Stream_Input) {
|
||||
consume_bits_lsb(z, discard)
|
||||
}
|
||||
|
||||
discard_to_next_byte_lsb :: proc{discard_to_next_byte_lsb_from_memory, discard_to_next_byte_lsb_from_stream};
|
||||
discard_to_next_byte_lsb :: proc{discard_to_next_byte_lsb_from_memory, discard_to_next_byte_lsb_from_stream}
|
||||
|
||||
@@ -677,4 +677,4 @@ inflate_from_byte_array_raw :: proc(input: []u8, buf: ^bytes.Buffer, raw := fals
|
||||
return inflate_raw(z=&ctx, expected_output_size=expected_output_size)
|
||||
}
|
||||
|
||||
inflate :: proc{inflate_from_context, inflate_from_byte_array};
|
||||
inflate :: proc{inflate_from_context, inflate_from_byte_array}
|
||||
|
||||
@@ -1538,7 +1538,7 @@ void fix_advance_to_next_stmt(AstFile *f) {
|
||||
Token expect_closing(AstFile *f, TokenKind kind, String context) {
|
||||
if (f->curr_token.kind != kind &&
|
||||
f->curr_token.kind == Token_Semicolon &&
|
||||
f->curr_token.string == "\n") {
|
||||
(f->curr_token.string == "\n" || f->curr_token.kind == Token_EOF)) {
|
||||
Token tok = f->prev_token;
|
||||
tok.pos.column += cast(i32)tok.string.len;
|
||||
syntax_error(tok, "Missing ',' before newline in %.*s", LIT(context));
|
||||
@@ -1560,6 +1560,7 @@ void assign_removal_flag_to_semicolon(AstFile *f) {
|
||||
switch (curr_token->kind) {
|
||||
case Token_CloseBrace:
|
||||
case Token_CloseParen:
|
||||
case Token_EOF:
|
||||
ok = true;
|
||||
break;
|
||||
}
|
||||
|
||||
2
vendor/sdl2/sdl_keycode.odin
vendored
2
vendor/sdl2/sdl_keycode.odin
vendored
@@ -327,4 +327,4 @@ KMOD_RESERVED :: Keymod{.RESERVED}
|
||||
KMOD_CTRL :: Keymod{.LCTRL, .RCTRL}
|
||||
KMOD_SHIFT :: Keymod{.LSHIFT, .RSHIFT}
|
||||
KMOD_ALT :: Keymod{.LALT, .RALT}
|
||||
KMOD_GUI :: Keymod{.LGUI, .RGUI};
|
||||
KMOD_GUI :: Keymod{.LGUI, .RGUI}
|
||||
|
||||
2
vendor/sdl2/sdl_scancode.odin
vendored
2
vendor/sdl2/sdl_scancode.odin
vendored
@@ -539,4 +539,4 @@ SCANCODE_APP1 :: Scancode.APP1
|
||||
SCANCODE_APP2 :: Scancode.APP2
|
||||
|
||||
SCANCODE_AUDIOREWIND :: Scancode.AUDIOREWIND
|
||||
SCANCODE_AUDIOFASTFORWARD :: Scancode.AUDIOFASTFORWARD;
|
||||
SCANCODE_AUDIOFASTFORWARD :: Scancode.AUDIOFASTFORWARD
|
||||
|
||||
Reference in New Issue
Block a user