aboutsummaryrefslogtreecommitdiff
path: root/environment.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-04-30 13:18:47 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-04-30 13:18:47 -0400
commit2e27b88c1b9fa8ec9b9f243909f5b793b376f207 (patch)
treef70433489c8a1fbf3bae6bf4cce364f6bdf8c9f7 /environment.c
parent3c0a8f0b899a343f43caf9c95147b2cf77a7b525 (diff)
Improved syntax for optionals
Diffstat (limited to 'environment.c')
-rw-r--r--environment.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/environment.c b/environment.c
index db3dbe9c..ec9ec5d5 100644
--- a/environment.c
+++ b/environment.c
@@ -52,14 +52,14 @@ env_t *new_compilation_unit(void)
{"Void", Type(VoidType), "Void_t", "$Void", {}},
{"Memory", Type(MemoryType), "Memory_t", "$Memory", {}},
{"Bool", Type(BoolType), "Bool_t", "$Bool", TypedArray(ns_entry_t,
- {"from_text", "Bool$from_text", "func(text:Text, success=!Bool)->Bool"},
+ {"from_text", "Bool$from_text", "func(text:Text, success=!&Bool)->Bool"},
)},
{"Int", Type(IntType, .bits=64), "Int_t", "$Int", TypedArray(ns_entry_t,
{"format", "Int$format", "func(i:Int, digits=0)->Text"},
{"hex", "Int$hex", "func(i:Int, digits=0, uppercase=yes, prefix=yes)->Text"},
{"octal", "Int$octal", "func(i:Int, digits=0, prefix=yes)->Text"},
{"random", "Int$random", "func(min=0, max=0xffffffff)->Int"},
- {"from_text", "Int$from_text", "func(text:Text, the_rest=!Text)->Int"},
+ {"from_text", "Int$from_text", "func(text:Text, the_rest=!&Text)->Int"},
{"bits", "Int$bits", "func(x:Int)->[Bool]"},
{"abs", "labs", "func(i:Int)->Int"},
{"min", "Int$min", "Int"},
@@ -70,7 +70,7 @@ env_t *new_compilation_unit(void)
{"hex", "Int32$hex", "func(i:Int32, digits=0, uppercase=yes, prefix=yes)->Text"},
{"octal", "Int32$octal", "func(i:Int32, digits=0, prefix=yes)->Text"},
{"random", "Int32$random", "func(min=0, max=0xffffffff)->Int32"},
- {"from_text", "Int$from_text", "func(text:Text, the_rest=!Text)->Int32"},
+ {"from_text", "Int$from_text", "func(text:Text, the_rest=!&Text)->Int32"},
{"bits", "Int32$bits", "func(x:Int32)->[Bool]"},
{"abs", "abs", "func(i:Int32)->Int32"},
{"min", "Int32$min", "Int32"},
@@ -81,7 +81,7 @@ env_t *new_compilation_unit(void)
{"hex", "Int16$hex", "func(i:Int16, digits=0, uppercase=yes, prefix=yes)->Text"},
{"octal", "Int16$octal", "func(i:Int16, digits=0, prefix=yes)->Text"},
{"random", "Int16$random", "func(min=0, max=0xffffffff)->Int16"},
- {"from_text", "Int$from_text", "func(text:Text, the_rest=!Text)->Int16"},
+ {"from_text", "Int$from_text", "func(text:Text, the_rest=!&Text)->Int16"},
{"bits", "Int16$bits", "func(x:Int16)->[Bool]"},
{"abs", "abs", "func(i:Int16)->Int16"},
{"min", "Int16$min", "Int16"},
@@ -92,7 +92,7 @@ env_t *new_compilation_unit(void)
{"hex", "Int8$hex", "func(i:Int8, digits=0, uppercase=yes, prefix=yes)->Text"},
{"octal", "Int8$octal", "func(i:Int8, digits=0, prefix=yes)->Text"},
{"random", "Int8$random", "func(min=0, max=0xffffffff)->Int8"},
- {"from_text", "Int$from_text", "func(text:Text, the_rest=!Text)->Int8"},
+ {"from_text", "Int$from_text", "func(text:Text, the_rest=!&Text)->Int8"},
{"bits", "Int8$bits", "func(x:Int8)->[Bool]"},
{"abs", "abs", "func(i:Int8)->Int8"},
{"min", "Int8$min", "Int8"},
@@ -115,7 +115,7 @@ env_t *new_compilation_unit(void)
{"TAU", "(2.*M_PI)", "Num"},
{"random", "Num$random", "func()->Num"},
{"mix", "Num$mix", "func(amount:Num, x:Num, y:Num)->Num"},
- {"from_text", "Num$from_text", "func(text:Text, the_rest=!Text)->Num"},
+ {"from_text", "Num$from_text", "func(text:Text, the_rest=!&Text)->Num"},
{"abs", "fabs", "func(n:Num)->Num"},
F(acos), F(acosh), F(asin), F(asinh), F(atan), F(atanh), F(cbrt), F(ceil), F(cos), F(cosh), F(erf), F(erfc),
F(exp), F(exp2), F(expm1), F(floor), F(j0), F(j1), F(log), F(log10), F(log1p), F(log2), F(logb),
@@ -143,7 +143,7 @@ env_t *new_compilation_unit(void)
{"TAU", "(Num32_t)(2.f*M_PI)", "Num32"},
{"random", "Num32$random", "func()->Num32"},
{"mix", "Num32$mix", "func(amount:Num32, x:Num32, y:Num32)->Num32"},
- {"from_text", "Num32$from_text", "func(text:Text, the_rest=!Text)->Num32"},
+ {"from_text", "Num32$from_text", "func(text:Text, the_rest=!&Text)->Num32"},
{"abs", "fabsf", "func(n:Num32)->Num32"},
F(acos), F(acosh), F(asin), F(asinh), F(atan), F(atanh), F(cbrt), F(ceil), F(cos), F(cosh), F(erf), F(erfc),
F(exp), F(exp2), F(expm1), F(floor), F(j0), F(j1), F(log), F(log10), F(log1p), F(log2), F(logb),