diff --git a/src/ccmeta.leg b/src/ccmeta.leg index cd31352..5c8bada 100644 --- a/src/ccmeta.leg +++ b/src/ccmeta.leg @@ -3,7 +3,7 @@ # Copyright (c) 2016-2021 Ian Piumarta and other contributors (see AUTHORS) # All rights reserved (see LICENSE) # -# Last edited: 2023-03-22 16:51:49 by piumarta on zora-10.local +# Last edited: 2023-03-22 16:55:04 by piumarta on zora-10.local %{ /* compile: leg -o ccmeta.c ccmeta.leg @@ -4590,8 +4590,7 @@ void printTree(oop element, language id) { } - -int main(int argc, char **argv) +void init(void) { # if (USE_GC) GC_INIT(); @@ -4612,7 +4611,6 @@ int main(int argc, char **argv) map_set(globals, intern("import" ), makeFunction(prim_import, intern("import" ), null, null, globals, null)); map_set(globals, intern("microseconds"), makeFunction(prim_microseconds, intern("microseconds"), null, null, globals, null)); map_set(globals, intern("string" ), makeFunction(prim_String , intern("string" ), null, null, globals, null)); - map_set(globals, intern("scope"), makeFunction(prim_scope, intern("scope"), null, null, globals, null)); #define _DO(NAME) NAME##_symbol=intern(#NAME); @@ -4639,8 +4637,14 @@ int main(int argc, char **argv) fixScope(globals); - /* File scope */ + /* File scope */ pushScope(); +} + + +int main(int argc, char **argv) +{ + init(); int repled = 0; /* Checking arguments */