diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-11-24 16:36:27 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-11-24 16:36:27 -0500 |
| commit | d4b10514fbe3afc7229efe74b015a664b52eba33 (patch) | |
| tree | 133cf2fd377ab8acbfa65908d04473ce0dd0ca49 /environment.c | |
| parent | 1e3fb8a2c0cca385d65c52679411b118b5fb4641 (diff) | |
Clean up some more null->none renames and fix the documentation. Also
change the literal syntax to `NONE:T` instead of `!T`
Diffstat (limited to 'environment.c')
| -rw-r--r-- | environment.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/environment.c b/environment.c index 8be31dc7..6f2ff882 100644 --- a/environment.c +++ b/environment.c @@ -47,7 +47,7 @@ env_t *new_compilation_unit(CORD libname) {"exit", {.code="tomo_exit", .type=Type(FunctionType, .args=new( arg_t, .name="message", .type=Type(OptionalType, .type=Type(TextType)), - .default_val=FakeAST(Null, .type=new(type_ast_t, .tag=VarTypeAST, .__data.VarTypeAST.name="Text")), + .default_val=FakeAST(None, .type=new(type_ast_t, .tag=VarTypeAST, .__data.VarTypeAST.name="Text")), .next=new(arg_t, .name="code", .type=Type(IntType, .bits=TYPE_IBITS32), .default_val=FakeAST(InlineCCode, .code="1", .type=Type(IntType, .bits=TYPE_IBITS32)))), .ret=Type(AbortType))}}, @@ -295,29 +295,29 @@ env_t *new_compilation_unit(CORD libname) // Used as a default for functions below: {"now", "Moment$now", "func(->Moment)"}, - {"after", "Moment$after", "func(moment:Moment,seconds,minutes,hours=0.0,days,weeks,months,years=0,timezone=!Text -> Moment)"}, - {"date", "Moment$date", "func(moment:Moment,timezone=!Text -> Text)"}, - {"day_of_month", "Moment$day_of_month", "func(moment:Moment,timezone=!Text -> Int)"}, - {"day_of_week", "Moment$day_of_week", "func(moment:Moment,timezone=!Text -> Int)"}, - {"day_of_year", "Moment$day_of_year", "func(moment:Moment,timezone=!Text -> Int)"}, - {"format", "Moment$format", "func(moment:Moment,format=\"%Y-%m-%dT%H:%M:%S%z\",timezone=!Text -> Text)"}, + {"after", "Moment$after", "func(moment:Moment,seconds,minutes,hours=0.0,days,weeks,months,years=0,timezone=NONE:Text -> Moment)"}, + {"date", "Moment$date", "func(moment:Moment,timezone=NONE:Text -> Text)"}, + {"day_of_month", "Moment$day_of_month", "func(moment:Moment,timezone=NONE:Text -> Int)"}, + {"day_of_week", "Moment$day_of_week", "func(moment:Moment,timezone=NONE:Text -> Int)"}, + {"day_of_year", "Moment$day_of_year", "func(moment:Moment,timezone=NONE:Text -> Int)"}, + {"format", "Moment$format", "func(moment:Moment,format=\"%Y-%m-%dT%H:%M:%S%z\",timezone=NONE:Text -> Text)"}, {"from_unix_timestamp", "Moment$from_unix_timestamp", "func(timestamp:Int64 -> Moment)"}, {"get_local_timezone", "Moment$get_local_timezone", "func(->Text)"}, - {"hour", "Moment$hour", "func(moment:Moment,timezone=!Text -> Int)"}, + {"hour", "Moment$hour", "func(moment:Moment,timezone=NONE:Text -> Int)"}, {"hours_till", "Moment$hours_till", "func(now,then:Moment -> Num)"}, - {"minute", "Moment$minute", "func(moment:Moment,timezone=!Text -> Int)"}, + {"minute", "Moment$minute", "func(moment:Moment,timezone=NONE:Text -> Int)"}, {"minutes_till", "Moment$minutes_till", "func(now,then:Moment -> Num)"}, - {"month", "Moment$month", "func(moment:Moment,timezone=!Text -> Int)"}, - {"nanosecond", "Moment$nanosecond", "func(moment:Moment,timezone=!Text -> Int)"}, - {"new", "Moment$new", "func(year,month,day:Int,hour,minute=0,second=0.0,timezone=!Text -> Moment)"}, + {"month", "Moment$month", "func(moment:Moment,timezone=NONE:Text -> Int)"}, + {"nanosecond", "Moment$nanosecond", "func(moment:Moment,timezone=NONE:Text -> Int)"}, + {"new", "Moment$new", "func(year,month,day:Int,hour,minute=0,second=0.0,timezone=NONE:Text -> Moment)"}, {"parse", "Moment$parse", "func(text:Text, format=\"%Y-%m-%dT%H:%M:%S%z\" -> Moment?)"}, - {"relative", "Moment$relative", "func(moment:Moment,relative_to=Moment.now(),timezone=!Text -> Text)"}, - {"second", "Moment$second", "func(moment:Moment,timezone=!Text -> Int)"}, + {"relative", "Moment$relative", "func(moment:Moment,relative_to=Moment.now(),timezone=NONE:Text -> Text)"}, + {"second", "Moment$second", "func(moment:Moment,timezone=NONE:Text -> Int)"}, {"seconds_till", "Moment$seconds_till", "func(now:Moment,then:Moment -> Num)"}, - {"set_local_timezone", "Moment$set_local_timezone", "func(timezone=!Text)"}, - {"time", "Moment$time", "func(moment:Moment,seconds=no,am_pm=yes,timezone=!Text -> Text)"}, + {"set_local_timezone", "Moment$set_local_timezone", "func(timezone=NONE:Text)"}, + {"time", "Moment$time", "func(moment:Moment,seconds=no,am_pm=yes,timezone=NONE:Text -> Text)"}, {"unix_timestamp", "Moment$unix_timestamp", "func(moment:Moment -> Int64)"}, - {"year", "Moment$year", "func(moment:Moment,timezone=!Text -> Int)"}, + {"year", "Moment$year", "func(moment:Moment,timezone=NONE:Text -> Int)"}, )}, {"Path", Type(TextType, .lang="Path", .env=namespace_env(env, "Path")), "Text_t", "Text$info", TypedArray(ns_entry_t, {"append", "Path$append", "func(path:Path, text:Text, permissions=Int32(0o644))"}, @@ -340,7 +340,7 @@ env_t *new_compilation_unit(CORD libname) {"is_symlink", "Path$is_symlink", "func(path:Path -> Bool)"}, {"parent", "Path$parent", "func(path:Path -> Path)"}, {"read", "Path$read", "func(path:Path -> Text?)"}, - {"read_bytes", "Path$read_bytes", "func(path:Path, limit=!Int -> [Byte]?)"}, + {"read_bytes", "Path$read_bytes", "func(path:Path, limit=NONE:Int -> [Byte]?)"}, {"relative", "Path$relative", "func(path:Path, relative_to=(./) -> Path)"}, {"remove", "Path$remove", "func(path:Path, ignore_missing=no)"}, {"resolved", "Path$resolved", "func(path:Path, relative_to=(./) -> Path)"}, |
