mirror of
https://github.com/bearlanguageorg/bear.git
synced 2026-08-26 14:57:18 +00:00
Critical fixes
This commit is contained in:
+4
-1
@@ -631,7 +631,10 @@ fn builtin_result_type(name string) TypeInfo {
|
||||
'sb_len' { TypeInfo{ kind: .int_t } }
|
||||
'spawn' { TypeInfo{ kind: .int_t } }
|
||||
'spawn_join' { TypeInfo{ kind: .unknown } }
|
||||
'cwd', 'json_pretty' { TypeInfo{ kind: .string_t } }
|
||||
'cwd', 'json_pretty', 'read_line', 'input' { TypeInfo{ kind: .string_t } }
|
||||
'flag_val' { TypeInfo{ kind: .string_t } }
|
||||
'flag_has' { TypeInfo{ kind: .int_t } }
|
||||
'flag_positional' { TypeInfo{ kind: .array_t } }
|
||||
'build_is_dir' { TypeInfo{ kind: .int_t } }
|
||||
// build-module builtins (.vrmm)
|
||||
'build_compile', 'build_assemble', 'build_link', 'build_exec', 'build_base',
|
||||
|
||||
+8
-1
@@ -1040,6 +1040,13 @@ fn builtin_spec(name string) (int, int) {
|
||||
// concurrency
|
||||
'spawn' { native_spawn, 1 }
|
||||
'spawn_join' { native_spawn_join, 1 }
|
||||
// interactive input
|
||||
'read_line' { native_read_line, 0 }
|
||||
'input' { native_input, 1 }
|
||||
// getopt-style flag parsing
|
||||
'flag_val' { native_flag_val, 1 }
|
||||
'flag_has' { native_flag_has, 1 }
|
||||
'flag_positional' { native_flag_positional, 0 }
|
||||
'build_is_dir' { native_build_is_dir, 1 }
|
||||
'cwd' { native_cwd, 0 }
|
||||
'json_pretty' { native_json_pretty, 1 }
|
||||
@@ -1301,7 +1308,7 @@ fn (mut g Gen) expr_type(e Expr) string {
|
||||
'build_dir', 'build_join', 'build_root' { 'string' }
|
||||
'json_encode', 'format', 'replace', 'pad', 'pad_left', 'repeat', 'sb_new', 'sb_add', 'sb_str' { 'string' }
|
||||
'sb_len' { 'int' }
|
||||
'cwd', 'json_pretty' { 'string' }
|
||||
'cwd', 'json_pretty', 'read_line', 'input' { 'string' }
|
||||
else { '' }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -182,3 +182,12 @@ const native_sb_len = 192
|
||||
// concurrency: spawn/join threads
|
||||
const native_spawn = 193
|
||||
const native_spawn_join = 194
|
||||
|
||||
// interactive input: read a line from stdin
|
||||
const native_read_line = 195
|
||||
const native_input = 196
|
||||
|
||||
// getopt-style flag parsing over args()
|
||||
const native_flag_val = 197
|
||||
const native_flag_has = 198
|
||||
const native_flag_positional = 199
|
||||
|
||||
Reference in New Issue
Block a user