modified C api for native functions

This commit is contained in:
cozis
2022-08-17 04:33:00 +02:00
parent 919bc6fcbd
commit 6ba7fd21ef
15 changed files with 171 additions and 497 deletions
+5 -4
View File
@@ -105,7 +105,7 @@ fun parseFloating(context: Map) {
} while context.str[context.cur] != ".";
assert(isDigit(context.str[context.cur+1]));
# Scan the decimal part.
q = 1;
do {
@@ -137,7 +137,8 @@ fun parseIntegerOrFloating(context: Map) {
fun parseString(context: Map) {
assert(context.cur < count(context.str) and context.str[context.cur] == '"');
assert(context.cur < count(context.str)
and context.str[context.cur] == '"');
context.cur = context.cur + 1;
@@ -204,7 +205,7 @@ fun parseArray(context: Map) {
}
fun parseValue(context: Map) {
if context.cur == count(context.str):
return none, "Source ended where a value was expected";
@@ -265,4 +266,4 @@ fun compareAny(A, B) {
error("Maps aren't supported yet!");
return A == B;
}
}