Add setGlobal() call to calc.c

Add vgcore files to gitignore.
Add tags alias to pebblisp.pbl
This commit is contained in:
Sage Vaillancourt 2022-04-09 17:24:18 -04:00
parent 9d46a618b6
commit 5a34bcbfbd
5 changed files with 4 additions and 4 deletions

1
.gitignore vendored
View File

@ -2,6 +2,7 @@ build/
tags tags
vgcore*
*.swp *.swp
*.vims *.vims
pl pl

View File

@ -536,6 +536,7 @@ void af(const char* name, Object (* func)(Object*, int, struct Environment*), st
static struct Environment pebbleEnv() static struct Environment pebbleEnv()
{ {
struct Environment e = defaultEnv(); struct Environment e = defaultEnv();
setGlobal(&e);
af("window", &add_window, &e); af("window", &add_window, &e);
af("sc", &run_script, &e); af("sc", &run_script, &e);
af("cw", &createWindow, &e); af("cw", &createWindow, &e);

View File

@ -47,7 +47,6 @@ struct helpText helpTexts[100];
struct symFunc { struct symFunc {
const char* sym; const char* sym;
Object (* func)(Object*, int, struct Environment*); Object (* func)(Object*, int, struct Environment*);
}; };

View File

@ -15,12 +15,10 @@ struct EnvElement {
}; };
struct Environment; struct Environment;
struct Environment { struct Environment {
struct Environment* outer; struct Environment* outer;
struct ObjectTable table; struct ObjectTable table;
// struct EnvElement* elements; // iterative
// int capacity; // iterative
int refs; int refs;
}; };

View File

@ -62,6 +62,7 @@
(Alias "ls" "ls --color") (Alias "ls" "ls --color")
(Alias "alias" "(alias)") (Alias "alias" "(alias)")
(Alias "pbl" (cat (env "EDITOR") " ~/.pebblisp.pbl")) (Alias "pbl" (cat (env "EDITOR") " ~/.pebblisp.pbl"))
(Alias "tags" "ctags --exclude=node_modules -f newtags -R . && mv newtags tags")
(Alias "r" "(reloadConfig)") (Alias "r" "(reloadConfig)")
)) ))