ソースを参照

Move meta language environment initialisation out of main() to init().

master
Ian Piumarta 2年前
コミット
9060483dbd
1個のファイルの変更9行の追加5行の削除
  1. +9
    -5
      src/ccmeta.leg

+ 9
- 5
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 */

読み込み中…
キャンセル
保存