More consistent variable naming in .apfl files

Use "C" for all modules that take a dict of builtins from C code
This commit is contained in:
Laria 2023-10-26 21:29:15 +02:00
parent 3bb47d6ad3
commit 85d2c67404

View file

@ -1,41 +1,41 @@
{builtins ->
if := builtins.if
== := builtins.==
> := builtins.>
< := builtins.<
>= := builtins.>=
<= := builtins.<=
+ := builtins.+
- := builtins.-
* := builtins.*
/ := builtins./
join := builtins.join
print := builtins.print
dump := builtins.dump
disasm := builtins.disasm
tostring := builtins.tostring
not := builtins.not
len := builtins.len
type := builtins.type
loop := builtins.loop
gc := builtins.gc
backtrace := builtins.backtrace
fopen := builtins.fopen
fread := builtins.fread
fwrite := builtins.fwrite
fclose := builtins.fclose
load-file := builtins.load-file
load-string := builtins.load-string
get-optional := builtins.get-optional
raise := builtins.raise
symbol := builtins.symbol
-serialize-bytecode := builtins.-serialize-bytecode
-unserialize-bytecode := builtins.-unserialize-bytecode
{ C ->
if := C.if
== := C.==
> := C.>
< := C.<
>= := C.>=
<= := C.<=
+ := C.+
- := C.-
* := C.*
/ := C./
join := C.join
print := C.print
dump := C.dump
disasm := C.disasm
tostring := C.tostring
not := C.not
len := C.len
type := C.type
loop := C.loop
gc := C.gc
backtrace := C.backtrace
fopen := C.fopen
fread := C.fread
fwrite := C.fwrite
fclose := C.fclose
load-file := C.load-file
load-string := C.load-string
get-optional := C.get-optional
raise := C.raise
symbol := C.symbol
-serialize-bytecode := C.-serialize-bytecode
-unserialize-bytecode := C.-unserialize-bytecode
Some := (builtins.getsym-Some)
Some := (C.getsym-Some)
-named := { name f ->
builtins.set-func-name f name
C.set-func-name f name
}
while := { cond body ->
@ -111,7 +111,7 @@
++ := { x -> + x 1 }
-- := { x -> - x 1 }
-raw-substring := builtins.substring
-raw-substring := C.substring
substr := {
start s ->
substr start (len s) s
@ -123,7 +123,7 @@
-raw-substring s start newlen
}
-raw-stringsearch := builtins.stringsearch
-raw-stringsearch := C.stringsearch
strsearch := {
needle haystack ->
-raw-stringsearch haystack needle
@ -169,7 +169,7 @@
keach := {
d?(has type 'dict) body ->
out := nil
builtins.iterate-dict d { k v ->
C.iterate-dict d { k v ->
out = body k v
true
}
@ -244,7 +244,7 @@
10 x?(has type 'number) ->
x
base x ->
builtins.tonumber base (tostring x)
C.tonumber base (tostring x)
}
modules := ({
@ -264,7 +264,7 @@
}
add-searcher { m ->
unwrap-some (builtins.cmod-searcher m) { loader ->
unwrap-some (C.cmod-searcher m) { loader ->
Some::{
Some::(loader)
}
@ -367,7 +367,7 @@
'has-key -> has-key
'symbol -> symbol
'Some -> Some
'get-argv -> builtins.get-argv
'get-argv -> C.get-argv
'andalso -> andalso
'orelse -> orelse
'find-first -> find-first