- Will also report errors in the cast is not possible.
* Arbitrarily typed varargs. They behave similar to C-style varargs.
* vararg_get builtin procedure to retrieve a value from a ... vararg.
-* #private_file directive for placing a symbol at file scope.
+* #local directive for placing a symbol at file scope.
* a basic implentation of printf in the standard library.
* use statements at the function level.
* nested packages, i.e. 'core.array'
* Added println to core library; print followed by a newline.
* Added tests/ folder and runtests.sh which will compile and execute the programs in the
folder and test against their expected output.
-* #private_file for specifying symbols at the file scope.
+* #local for specifying symbols at the file scope.
Removals:
heap_allocator : Allocator;
// The global temp allocator, set up upon program intialization.
-#private_file
+#local
temp_state : ring.RingState;
temp_allocator : Allocator;
Arena :: struct { next : ^Arena; }
-#private_file
+#local
arena_alloc_proc :: (data: rawptr, aa: AllocationAction, size: u32, align: u32, oldptr: rawptr) -> rawptr {
alloc_arena := cast(^ArenaState) data;
size : u32;
}
-#private_file
+#local
fixed_allocator_proc :: (data: rawptr, aa: AllocationAction, size: u32, align: u32, oldptr: rawptr) -> rawptr {
fa_data := cast(^FixedAllocatorData) data;
get_watermark :: () => cast(u32) heap_state.next_alloc;
-#private_file {
+#local {
use package core.intrinsics.wasm {
memory_size, memory_grow,
memory_copy, memory_fill,
"resize",
];
-#private_file
+#local
logging_allocator_proc :: (data: rawptr, aa: AllocationAction, size: u32, align: u32, oldptr: rawptr) -> rawptr {
allocator := cast(^Allocator) data;
res := allocator.func(allocator.data, aa, size, align, oldptr);
first_free : ^Elem;
}
-#private_file
+#local
pool_allocator_proc :: (pool: ^PoolAllocator($Elem), aa: AllocationAction, size: u32, align: u32, oldptr: rawptr) -> rawptr {
switch aa {
case .Alloc {
curr_ptr : rawptr;
}
-#private_file
+#local
ring_alloc_proc :: (data: rawptr, aa: AllocationAction, size: u32, align: u32, oldptr: rawptr) -> rawptr {
ss := cast(^RingState) data;
// CLEANUP: Should builtin.onyx really be including other files in the compilation?
// Does that complicate things too much?
#load "core/runtime/build_opts"
-#private_file runtime :: package runtime
+#local runtime :: package runtime
str :: #type []u8;
cstr :: #type ^u8;
}
#if runtime.Runtime != runtime.Runtime_Custom {
- #private_file default_logger :: (data: rawptr, msg: str) {
+ #local default_logger :: (data: rawptr, msg: str) {
use package core
println(msg);
}
} else {
- #private_file default_logger :: (data: rawptr, msg: str) {
+ #local default_logger :: (data: rawptr, msg: str) {
// In a custom runtime, there is no way to know how to log something.
}
}
// The implementations of all of the allocators can be found in core/alloc/.
// These need to be here so the context structure has the types and enum values.
//
-#private_file
+#local
Default_Allocation_Alignment :: 16
AllocationAction :: enum {
Resize;
}
-#private_file
+#local
allocator_proc :: #type (data: rawptr, action: AllocationAction, size: u32, align: u32, old_ptr: rawptr) -> rawptr;
Allocator :: struct {
return idx, elem;
}
-#private_file cmp_greater :: (x, y) => x > y;
-#private_file cmp_less :: (x, y) => x < y;
+#local cmp_greater :: (x, y) => x > y;
+#local cmp_less :: (x, y) => x < y;
greatest :: #match {
(arr: [..] $T) -> (i32, T) { return fold_idx_elem(arr, cmp_greater); },
(arr: [] $T, cmp: (^T, ^T) -> i32) do quicksort_impl(arr, cmp, 0, arr.count - 1); ,
}
-#private_file {
+#local {
quicksort_impl :: (arr: [] $T, cmp: $PredicateFunction, lo, hi: i32) {
if lo < 0 || hi < 0 do return;
if lo >= hi do return;
package core.bucket_array
-#private_file array :: package core.array
+#local array :: package core.array
Bucket_Array :: struct (T: type_expr) {
allocator : Allocator;
};
}
-#private
+#package
alloc_bucket :: (use b: ^Bucket_Array($T)) -> Bucket_Array.Bucket(T) {
data := raw_alloc(allocator, sizeof T * elements_per_bucket);
return .{ 0, data };
};
}
-#private_file Zipped :: struct (T: type_expr, R: type_expr) {
+#local Zipped :: struct (T: type_expr, R: type_expr) {
first: T;
second: R;
}
};
}
-#private_file Enumeration_Value :: struct (T: type_expr) {
+#local Enumeration_Value :: struct (T: type_expr) {
index: i32;
value: T;
}
};
}
-#private_file
+#local
allocate_elem :: macro (list: ^List($T)) => new(#type ListElem(T), allocator=list.allocator);
package core.map
-#private_file {
+#local {
array :: package core.array
hash :: package core.hash
memory :: package core.memory
use package core.intrinsics.onyx { __zero_value, __initialize }
}
-#private_file {
+#local {
ValidKey :: interface (T: type_expr) {
// In order to use a certain type as a key in a Map, you must
// provide an implementation of core.hash.to_u32() for that type,
// Private symbols
//
-#private_file {
+#local {
MapLookupResult :: struct {
hash_index : i32 = -1;
entry_index : i32 = -1;
package core.set
-#private_file {
+#local {
array :: package core.array
hash :: package core.hash
memory :: package core.memory
// Private symbols
//
-#private_file {
+#local {
SetLookupResult :: struct {
hash_index : i32 = -1;
entry_index : i32 = -1;
package core.intrinsics.atomics
-#private_file {
+#local {
runtime :: package runtime
#if !runtime.Multi_Threading_Enabled {
package core.io
-#private_file runtime :: package runtime
+#local runtime :: package runtime
#if runtime.Runtime != runtime.Runtime_Wasi {
#error "The file system library is currently only available on the WASI runtime, and should only be included if that is the chosen runtime."
}
use package core
-#private_file wasi :: package wasi
+#local wasi :: package wasi
use package wasi {
FileDescriptor,
FDFlags, OFlags, Rights,
file.stream.vtable = null;
}
-#private
+#package
file_stream_vtable := Stream_Vtable.{
seek = (use fs: ^FileStream, to: i32, whence: SeekFrom) -> Error {
// Currently, the new offset is just ignored.
cfree(logger.data);
}
-#private_file
+#local
file_logger_proc :: (data: ^File, msg: str) {
file_write(*data, msg);
file_write(*data, "\n");
vtable : ^Stream_Vtable;
}
-// #private
+// #package
Stream_Vtable :: struct {
seek : (s: ^Stream, to: i32, whence: SeekFrom) -> Error;
tell : (s: ^Stream) -> (Error, u32);
return .{ data.data, curr_pos };
}
-#private
+#package
string_stream_vtable := Stream_Vtable.{
seek = (use ss: ^StringStream, to: i32, whence: SeekFrom) -> Error {
if to >= data.count do return .OutOfBounds;
return data.data[0 .. curr_pos];
}
-#private
+#package
dynamic_string_stream_vtable := Stream_Vtable.{
seek = (use dss: ^DynamicStringStream, to: i32, whence: SeekFrom) -> Error {
dest : i32;
package core.io
-#private_file conv :: package core.conv
+#local conv :: package core.conv
Writer :: struct {
stream : ^Stream;
package core.math
-#private_file wasm :: package core.intrinsics.wasm
+#local wasm :: package core.intrinsics.wasm
// Things that are useful in any math library:
// - Trigonometry
package core.random
-#private_file seed : i64 = 8675309
+#local seed : i64 = 8675309
-#private_file RANDOM_MULTIPLIER :: 25214903917
-#private_file RANDOM_INCREMENT :: cast(i64) 11
-// #private_file RANDOM_MODULUS :: 1 << 32
+#local RANDOM_MULTIPLIER :: 25214903917
+#local RANDOM_INCREMENT :: cast(i64) 11
+// #local RANDOM_MODULUS :: 1 << 32
set_seed :: #match {
(s: u32) do seed = ~~s; ,
#load "./type_info/helper"
-#private_file runtime :: package runtime
+#local runtime :: package runtime
#if runtime.Runtime == runtime.Runtime_Wasi {
#load "./runtime/wasi"
#load "./wasi/wasi"
// in anyway.
-#private_file runtime :: package runtime
+#local runtime :: package runtime
#if runtime.Runtime == runtime.Runtime_Custom {
#error "'stdio' can only be included in the 'wasi' or 'js' runtime."
}
package core.string
-#private_file math :: package core.math
+#local math :: package core.math
String_Buffer :: struct {
data : ^u8;
#if false {
-#private_file array :: package core.array
-#private_file string :: package core.string
-#private_file conv :: package core.conv
+#local array :: package core.array
+#local string :: package core.string
+#local conv :: package core.conv
Builder :: struct {
data : [..] u8;
use package core
use package core.intrinsics.atomics
-#private {
+#package {
runtime :: package runtime
thread_mutex : sync.Mutex;
package builtin.type_info
-#private_file io :: package core.io
+#local io :: package core.io
write_type_name :: (writer: ^io.Writer, t: type_expr) {
info := get_type_info(t);
use package wasi { environ_get, environ_sizes_get, Size }
-#private map :: package core.map
-#private memory :: package core.memory
-#private string :: package core.string
+#package map :: package core.map
+#package memory :: package core.memory
+#package string :: package core.string
Environment :: struct {
vars : Map(str, str);
[X] Pointer math
- Addition and subtraction
- [X] #private
+ [X] #package
- symbol is scoped to package and not brought in from a 'use package' statement
[X] Hex literals
package bmfont
use package core
-#private_file json :: package json
+#local json :: package json
load_bmfont :: (fnt_data: [] u8) -> BMFont {
bmf := create_bmfont();
extract_bmfont_from_json(^bmf, j.root);
}
-#private_file
+#local
create_bmfont :: () -> BMFont {
bmf: BMFont;
memory.set(^bmf, 0, sizeof BMFont);
return bmf;
}
-#private_file
+#local
parse_bmfont :: (fnt_data: [] u8, font: ^BMFont) {
R :: package core.string.reader
}
}
-#private_file
+#local
extract_bmfont_from_json :: (font: ^BMFont, root: ^json.Value) {
font_info := root["info"];
font.info.face_name = font_info["face"]->as_str();
package bmfont
-#private_file {
+#local {
math :: package core.math
renderable_glyph: Renderable_Glyph;
package bmfont
-#private_file math :: package core.math
+#local math :: package core.math
get_width :: (use font: ^BMFont, text: str, size: f32) -> f32 {
max_x := 0.0f;
package immediate_mode
use package core
-#private_file gl :: package gl
+#local gl :: package gl
// This Shader represents an OpenGL program, not a shader. The name
// is confusing but conceptually for most people, shaders are a bundled
#load "./texture"
#load "./transform"
-#private gl :: package gl
+#package gl :: package gl
package js_events
-#private_file Max_Buffered_Events :: 16
+#local Max_Buffered_Events :: 16
// NOTE: These need to match exactly what is in the corresponding javascript
DomEventKind :: enum {
event_setup(^event_storage, sizeof Event);
}
-#private_file processing_event: Event
+#local processing_event: Event
consume :: () -> Iterator(^Event) {
next :: (_: rawptr) -> (^Event, bool) {
if event_storage.event_count == 0 do return null, false;
/* Private members */
-#private EventStorage :: struct {
+#package EventStorage :: struct {
event_count : u32;
max_events : u32;
event_buffer : [Max_Buffered_Events] Event;
}
-#private event_storage : EventStorage;
-#private event_setup :: (event_storage: ^EventStorage, event_size: u32) -> void #foreign "js_events" "setup" ---
+#package event_storage : EventStorage;
+#package event_setup :: (event_storage: ^EventStorage, event_size: u32) -> void #foreign "js_events" "setup" ---
package js_events
// 0 is reserved for dropped files
-#private_file next_request_id := 1;
+#local next_request_id := 1;
request_file :: (filepath: str) -> u32 {
js_request_file :: (event_storage: ^EventStorage, event_size: u32, filepath: str, fileid: u32) -> void #foreign "js_events" "request_file" ---;
package json
use package core
-#private
+#package
Parser :: struct {
tokenizer : Tokenizer;
allocator : Allocator;
previous_token : Token;
}
-#private
+#package
make_parser :: (data: [] u8, allocator := context.allocator) -> Parser {
parser: Parser;
parser.tokenizer = Tokenizer.{ data = data };
return parser;
}
-#private
+#package
parse :: (data: [] u8, allocator := context.allocator) -> (^Value, Error) {
parser := make_parser(data, allocator);
return parse_value(^parser);
}
-#private_file
+#local
consume_token :: (use parser: ^Parser) -> (Token, Error) {
error: Error;
previous_token = current_token;
return previous_token, error;
}
-#private_file
+#local
consume_token_if_next :: (use parser: ^Parser, kind: Token.Kind) -> bool {
if current_token.kind == kind {
consume_token(parser);
return false;
}
-#private_file
+#local
expect_token :: (use parser: ^Parser, kind: Token.Kind) -> (Token, Error) {
previous := current_token;
consume_token(parser);
return previous, error;
}
-#private
+#package
parse_value :: (use parser: ^Parser) -> (^Value, Error) {
return_value: ^Value = null;
return return_value, .{ .None };
}
-#private_file
+#local
parse_array :: (use parser: ^Parser) -> (^Value_Array, Error) {
value := new(Value_Array, allocator);
}
-#private_file
+#local
parse_object :: (use parser: ^Parser) -> (^Value_Object, Error) {
value := new(Value_Object, allocator);
}
-#private_file
+#local
unescape_string :: (token: Token, allocator: Allocator) -> str {
if token.kind != .String do return "";
-// Everything in this file is marked #private because I do not think
+// Everything in this file is marked #package because I do not think
// that this code will be needed outside of this module. I do not see
// the value of having access to the tokenizer and parser of JSON directly.
package json
use package core
-#private
+#package
Tokenizer :: struct {
data: [] u8;
use position := Position.{ 0, 1, 1 };
}
-#private
+#package
Token :: struct {
Kind :: enum {
Invalid;
use position := Position.{ 0, 1, 1 };
}
-#private
+#package
Position :: struct {
offset : u32; // Offset into the stream
line, column : u32; // Line and column number
}
-#private
+#package
token_get :: (use tkn: ^Tokenizer) -> (Token, Error) {
err := Error.{};
return token, err;
}
-#private_file
+#local
next_character :: (use tkn: ^Tokenizer) -> (u8, bool) {
if offset >= data.count do return 0, false;
return retval, true;
}
-#private_file
+#local
skip_whitespace :: (use tkn: ^Tokenizer) {
while offset < data.count {
switch data[offset] {
}
}
-#private_file
+#local
skip_alpha_numeric :: (use tkn: ^Tokenizer) {
while offset < data.count {
switch data[offset] {
}
}
-#private_file
+#local
skip_numeric :: (use tkn: ^Tokenizer) {
while offset < data.count {
switch data[offset] {
}
}
-#private_file
+#local
skip_escape :: (use tkn: ^Tokenizer) {
switch data[offset] {
case #char "u" {
#load "modules/js_events/module"
#load "modules/ui/module"
#load "modules/webgl2/module"
+#load "modules/json/module"
-#load "./ouit"
\ No newline at end of file
+#load "./ouit"
package ouit
-#private_file {
+#local {
gl :: package gl
gfx :: package immediate_mode
events :: package js_events
ouit_draw = d;
}
-#private {
+#package {
ouit_handle_event : (^events.Event) -> void;
ouit_update : (dt: f32) -> void;
ouit_draw : () -> void;
return ttf;
}
-#private
+#package
ttf_read_offset_table :: (use ttf: ^True_Type_Font) {
scalar_type = reader->get_u32();
num_tables := reader->get_u16();
}
}
-#private
+#package
ttf_read_head_table :: (use ttf: ^True_Type_Font) {
head_table_info := map.get(^tables, string_to_beu32("head"));
reader->seek(head_table_info.offset);
raw_free(allocator, glyph);
}
-#private_file
+#local
TTF_Glyph_Flags :: enum #flags {
On_Curve :: 0x01;
X_Is_Byte :: 0x02;
Y_Delta :: 0x20;
}
-#private_file
+#local
ttf_read_simple_glyph :: (use ttf: ^True_Type_Font, glyph: ^TTF_Glyph) {
array.init(^glyph.contour_ends, ~~glyph.contour_count);
array.init(^glyph.points);
return potential_code;
}
-#private_file
+#local
ttf_lookup_in_cmap0 :: (use ttf: ^True_Type_Font, cmap: ^TTF_Cmap0, charcode: u32) -> u32 {
if charcode < 0 || charcode >= 256 do return 0;
return ~~cmap.glyph_indicies[charcode];
}
-#private_file
+#local
ttf_lookup_in_cmap4 :: (use ttf: ^True_Type_Font, cmap: ^TTF_Cmap4, charcode: u32) -> u32 {
if map.has(^cmap.cache, charcode) do return map.get(^cmap.cache, charcode);
}
-#private_file
+#local
ttf_calc_table_checksum :: (reader: ^TTF_Reader, offset: u32, length: u32) -> u32 {
old := reader->seek(offset);
defer reader->seek(old);
return sum;
}
-#private_file
+#local
string_to_beu32 :: (s: str) -> u32 {
return (cast(u32) s[0] << 24)
| (cast(u32) s[1] << 16)
};
}
-#private
+#package
scrollable_region_states : Map(UI_Id, Scrollable_Region_State);
Scrollable_Region_Controls :: struct {
default_textbox_theme := Textbox_Theme.{};
-#private_file
+#local
Textbox_Editing_State :: struct {
hash: UI_Id = 0;
cursor_animation_speed := 0.02f;
}
-#private
+#package
// There is only one 'Textbox_Editing_State', not a map of them because there can only be one textbox being edited at once.
textbox_editing_state := Textbox_Editing_State.{};
return result;
}
-#private_file
+#local
get_cursor_location :: (text_buffer: ^string.String_Buffer, text_x: f32, text_y: f32, text_size: f32, cursor_position: i32) -> f32 {
countdown := cursor_position + 1;
last_x : f32 = text_x;
return last_x + last_w;
}
-#private_file
+#local
get_cursor_position :: (text_buffer: ^string.String_Buffer, text_x: f32, text_y: f32, text_size: f32, mouse_x: f32, mouse_y: f32) -> i32 {
cursor_position := 0;
dragging := false;
}
-#private
+#package
workspace_states : Map(UI_Id, Workspace_State);
workspace_start :: (use r: Rectangle, site := #callsite, state: ^Workspace_State = null) {
// A simple wrapper for a BMFont and an OpenGL Texture
-#private_file RK :: enum { Luminance; Color; }
+#local RK :: enum { Luminance; Color; }
Font :: struct {
texture : gfx.Texture;
Font_Index :: i32;
-#private font_registry : Map(Font_Index, Font);
+#package font_registry : Map(Font_Index, Font);
register_font :: (index: Font_Index, font: Font) {
assert(!map.has(^font_registry, index), "Font with this index already exists.");
map.put(^font_registry, index, font);
mouse_state.y_ = new_y;
}
-#private_file Mouse_Button_Kind :: enum { Left; Right; Middle; WheelUp; WheelDown; }
+#local Mouse_Button_Kind :: enum { Left; Right; Middle; WheelUp; WheelDown; }
button_pressed :: (kind: Mouse_Button_Kind) {
switch kind {
}
}
-#private_file
+#local
__key_state_transition_table := Keyboard_State.Key_State.[
/* KeyUp */ /* KeyDown */
/* Up */ Keyboard_State.Key_State.Up, Keyboard_State.Key_State.Just_Down,
#load "./components/scrollable_region"
// Package inclusions that are part of all files in the "ui" package.
-#private gfx :: package immediate_mode // The immediate_mode module needs to be accessible
-#private gl :: package gl
-#private bmfont :: package bmfont
+#package gfx :: package immediate_mode // The immediate_mode module needs to be accessible
+#package gl :: package gl
+#package bmfont :: package bmfont
-#private math :: package core.math
-#private map :: package core.map
\ No newline at end of file
+#package math :: package core.math
+#package map :: package core.map
\ No newline at end of file
UI_Id :: #type u32
-#private {
+#package {
hot_item : UI_Id = 0
active_item : UI_Id = 0
hot_item_was_set := false
return true;
}
-#private_file hot_item_depth := 0;
-#private_file hot_item_depth_needed := 0;
+#local hot_item_depth := 0;
+#local hot_item_depth_needed := 0;
set_hot_item :: (id: UI_Id, force := false) -> bool {
if active_item != 0 do return false;
// Animation states are stored globally as there is not much to the state of a button.
// Forcing the end user to store a structure for each button that is just the animation
// state of the component feels very wrong.
-#private_file animation_states : Map(UI_Id, Animation_State);
+#local animation_states : Map(UI_Id, Animation_State);
Animation_State :: struct {
hover_time := 0.0f;
if *value > target - step && *value < target + step do *value = target;
}
-#private color_lerp :: macro (t: f32, c1: gfx.Color4, c2: gfx.Color4) -> gfx.Color4 {
+#package color_lerp :: macro (t: f32, c1: gfx.Color4, c2: gfx.Color4) -> gfx.Color4 {
return .{
r = c1.r * (1 - t) + c2.r * t,
g = c1.g * (1 - t) + c2.g * t,
package vecmath
-#private_file io :: package core.io
+#local io :: package core.io
use package core.intrinsics.onyx { __zero_value }
Vector2i :: #type Vector2(i32);
|> iter.to_array(allocator=allocator);
}
-#private
+#package
parse_instruction :: (reader: ^io.Reader, binary: ^WasmBinary, code_offset := 0, current_block_depth: ^i32 = null) -> WasmInstruction {
Parse_After :: enum {
#load "./parser"
#load "./instructions"
-#private map :: package core.map
-#private io :: package core.io
-#private hash :: package core.hash
-#private memory :: package core.memory
-#private iter :: package core.iter
\ No newline at end of file
+#package map :: package core.map
+#package io :: package core.io
+#package hash :: package core.hash
+#package memory :: package core.memory
+#package iter :: package core.iter
\ No newline at end of file
// calling any of the top-level parsing functions. Because this is here, it is
// unsafe to use this library in a multi-threaded context, if Wasm ever officially
// supports that.
-#private_file wasm_allocator : Allocator
+#local wasm_allocator : Allocator
parse_type_section :: (use bin: ^WasmBinary, allocator := context.allocator) -> [] WasmFuncType {
if !map.has(^sections, .Type) do return .{ null, 0 };
}
}
-#private
+#package
parse_vector :: macro (reader: ^io.Reader, bin: ^WasmBinary,
read: (^io.Reader, ^WasmBinary) -> $T) -> [] T {
wasm_allocator :: wasm_allocator;
return result;
}
-#private
+#package
parse_name :: (reader: ^io.Reader, bin: ^WasmBinary) -> [] u8 {
return parse_vector(reader, bin, read_byte);
}
}
-#private
+#package
parse_limits :: (reader: ^io.Reader, bin: ^WasmBinary) -> WasmLimits {
byte := io.read_byte(reader);
return .{ minimum=minimum, maximum=maximum, shared=shared };
}
-#private
+#package
read_val_type :: (reader: ^io.Reader, binary: ^WasmBinary) -> WasmValueType {
byte := io.read_byte(reader);
switch byte {
return ~~0;
}
-#private
+#package
parse_const_uint32 :: (reader: ^io.Reader, binary: ^WasmBinary) -> u32 {
assert(io.read_byte(reader) == 65, "Expected integer constant");
value := read_uleb128(reader);
return ~~value;
}
-#private
+#package
parse_section_locations :: (use bin: ^WasmBinary) -> bool {
stream := io.string_stream_make(data);
reader := io.reader_make(^stream);
package wasm_utils
-#private_file io :: package core.io
+#local io :: package core.io
-#private
+#package
read_uleb128 :: (use reader: ^io.Reader) -> u64 {
result: u64 = 0;
shift := 0;
return result;
}
-#private
+#package
read_sleb128 :: (use reader: ^io.Reader, size := 4) -> i64 {
result: i64 = 0;
shift := 0;
// To be used with the corresponding gl.js
// There are many things that are missing but this suffices for me.
-#private_file runtime :: package runtime
+#local runtime :: package runtime
#if runtime.Runtime != runtime.Runtime_Js {
#error "'webgl' can only be used with the 'js' runtime."
}
private_kind = bh_arr_last(parser->scope_flags);
// :CLEANUP this very repetetive code...
- if (parse_possible_directive(parser, "private")) {
+ if (next_tokens_are(parser, 2, '#', Token_Type_Keyword_Package)) {
+ consume_tokens(parser, 2);
private_kind = Ast_Flag_Private_Package;
if (parser->curr->type == '{') {
bh_arr_push(parser->scope_flags, private_kind);
return;
}
}
- else if (parse_possible_directive(parser, "private_file")) {
+ else if (parse_possible_directive(parser, "local")) {
private_kind = Ast_Flag_Private_File;
if (parser->curr->type == '{') {
bh_arr_push(parser->scope_flags, private_kind);