Add setGlobal() call to calc.c
Add vgcore files to gitignore. Add tags alias to pebblisp.pbl
This commit is contained in:
parent
9d46a618b6
commit
5a34bcbfbd
|
@ -2,6 +2,7 @@ build/
|
||||||
|
|
||||||
tags
|
tags
|
||||||
|
|
||||||
|
vgcore*
|
||||||
*.swp
|
*.swp
|
||||||
*.vims
|
*.vims
|
||||||
pl
|
pl
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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*);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -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)")
|
||||||
))
|
))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue