[VER] 0.3.5-alpha

[FEAT] 现在,我们的内置类型 Int, String等也有构造函数了!像是StructType一样调用,Int{10}
[FEAT] List,Map赋值默认为Alias, 现在,通过 List{other}/Map{other} 来创建新的container! 复制出新的容器
[IMPL] Object toString对于 String type 输出进行修改!
[IMPL] ... 还有一些忘记了!
[ALL] Happy new year! And hope Fig-lang become better! Let's build a new world!
This commit is contained in:
2026-01-01 16:38:21 +08:00
parent 95f74356a8
commit 28e78be57a
12 changed files with 654 additions and 637 deletions

View File

@@ -0,0 +1,94 @@
/*
Module `_builtins`
This module represents Fig builtin runtime bindings.
Visible to IDEs and documentation tools,
NOT importable, NOT executable as a real module.
Library/_builtins/_builtins.fig
Importing `_builtins` in real programs loads native implementations,
not this file. This file only serves as documentation / IDE reference.
Copyright © 2025 PuqiAR. All rights reserved.
*/
// =======================
// stdout
// =======================
func __fstdout_print(values ...) -> Int;
func __fstdout_println(values ...) -> Int;
// =======================
// stdin
// =======================
func __fstdin_read() -> String;
func __fstdin_readln() -> String;
// =======================
// value utilities
// =======================
func __fvalue_type(value: Any) -> String;
func __fvalue_int_parse(str: String) -> Int;
func __fvalue_int_from(value: Any) -> Int;
func __fvalue_double_parse(str: String) -> Double;
func __fvalue_double_from(value: Any) -> Double;
func __fvalue_string_from(value: Any) -> String;
// =======================
// math
// =======================
func __fmath_acos(x: Any) -> Double;
func __fmath_acosh(x: Any) -> Double;
func __fmath_asin(x: Any) -> Double;
func __fmath_asinh(x: Any) -> Double;
func __fmath_atan(x: Any) -> Double;
func __fmath_atan2(y: Any, x: Any) -> Double;
func __fmath_atanh(x: Any) -> Double;
func __fmath_ceil(x: Any) -> Double;
func __fmath_cos(x: Any) -> Double;
func __fmath_cosh(x: Any) -> Double;
func __fmath_exp(x: Any) -> Double;
func __fmath_expm1(x: Any) -> Double;
func __fmath_fabs(x: Any) -> Double;
func __fmath_floor(x: Any) -> Double;
func __fmath_fmod(x: Any, y: Any) -> Double;
// returns List[Double, Int]
func __fmath_frexp(x: Any) -> List;
func __fmath_gcd(a: Int, b: Int) -> Int;
func __fmath_hypot(a: Any, b: Any) -> Double;
func __fmath_isequal(a: Any, b: Any) -> Bool;
func __fmath_log(x: Any) -> Double;
func __fmath_log10(x: Any) -> Double;
func __fmath_log1p(x: Any) -> Double;
func __fmath_log2(x: Any) -> Double;
func __fmath_sin(x: Any) -> Double;
func __fmath_sinh(x: Any) -> Double;
func __fmath_sqrt(x: Any) -> Double;
func __fmath_tan(x: Any) -> Double;
func __fmath_tanh(x: Any) -> Double;
func __fmath_trunc(x: Any) -> Double;