diff options
| author | Paul Buetow <paul@buetow.org> | 2009-10-30 15:09:39 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2009-10-30 15:09:39 +0000 |
| commit | dc1cdfb8f8b3130aaff6e92eaf1042e52e8a1a3a (patch) | |
| tree | dacdd1f41797ba92c2d0a80f97894525ac56472e | |
| parent | 1bc73e78278b630768723869d277d05404feae03 (diff) | |
| -rw-r--r-- | docs/help.txt | 2 | ||||
| -rw-r--r-- | docs/version.txt | 2 | ||||
| -rwxr-xr-x | fype | bin | 471287 -> 526969 bytes | |||
| -rw-r--r-- | src/build.h | 2 | ||||
| -rw-r--r-- | src/core/interpret.c | 2 | ||||
| -rw-r--r-- | test.out | 13 |
6 files changed, 18 insertions, 3 deletions
diff --git a/docs/help.txt b/docs/help.txt index df495db..be79117 100644 --- a/docs/help.txt +++ b/docs/help.txt @@ -1,4 +1,4 @@ -Fype Superalpha Build 9666 +Fype Superalpha Build 9667 (c) Paul C. Buetow (2005 - 2008) <fype@dev.buetow.org> -e Executes given code string (see synopses) -h Prints this help diff --git a/docs/version.txt b/docs/version.txt index 5e6f1ea..439f620 100644 --- a/docs/version.txt +++ b/docs/version.txt @@ -1 +1 @@ -Fype Superalpha Build 9666 +Fype Superalpha Build 9667 Binary files differdiff --git a/src/build.h b/src/build.h index 4e046ad..02651cd 100644 --- a/src/build.h +++ b/src/build.h @@ -36,7 +36,7 @@ #ifndef BUILD_H #define BUILD_H -#define BUILDNR 9666 +#define BUILDNR 9667 #define OS_FREEBSD #endif diff --git a/src/core/interpret.c b/src/core/interpret.c index e471e72..9a7eef4 100644 --- a/src/core/interpret.c +++ b/src/core/interpret.c @@ -83,10 +83,12 @@ Interpret* interpret_new(List *p_list_token, Hash *p_hash_syms) { Interpret *p_interpret = malloc(sizeof(Interpret)); + /* No subprocess */ if (p_hash_syms != NULL) { p_interpret->p_scope = scope_new(p_hash_syms); p_interpret->b_scope_delete = true; + /* Subprocess */ } else { p_interpret->p_scope = NULL; p_interpret->b_scope_delete = false; @@ -16,6 +16,11 @@ assert 5 == say len foo; # Print the last index of the array assert 4 == say ind foo; + +# Print the 3rd element of the array +say foo[3]; + +#say "bla"; Token (id=00000, line=00006, pos=0005, type=TT_FUNC, val=func, ival=0, dval=0.000000, refs=1) Token (id=00001, line=00006, pos=0009, type=TT_IDENT, val=bar, ival=0, dval=0.000000, refs=1) Token (id=00002, line=00006, pos=0011, type=TT_PARANT_CL, val={, ival=0, dval=0.000000, refs=1) @@ -69,6 +74,13 @@ Token (id=00049, line=00018, pos=0016, type=TT_IDENT, val=say, ival=0, dval=0.00 Token (id=00050, line=00018, pos=0020, type=TT_IDENT, val=ind, ival=0, dval=0.000000, refs=1) Token (id=00051, line=00018, pos=0024, type=TT_IDENT, val=foo, ival=0, dval=0.000000, refs=1) Token (id=00052, line=00018, pos=0025, type=TT_SEMICOLON, val=;, ival=0, dval=0.000000, refs=1) +Token (id=00053, line=00021, pos=0004, type=TT_IDENT, val=say, ival=0, dval=0.000000, refs=1) +Token (id=00054, line=00021, pos=0008, type=TT_IDENT, val=foo, ival=0, dval=0.000000, refs=1) +Token (id=00055, line=00021, pos=0009, type=TT_PARANT_AL, val=[, ival=0, dval=0.000000, refs=1) +Token (id=00056, line=00021, pos=0010, type=TT_INTEGER, val=3, ival=3, dval=0.000000, refs=1) +Token (id=00057, line=00021, pos=0010, type=TT_SEMICOLON, val=;, ival=0, dval=0.000000, refs=1) +Token (id=00058, line=00021, pos=0011, type=TT_PARANT_AR, val=], ival=0, dval=0.000000, refs=1) +Token (id=00059, line=00021, pos=0012, type=TT_SEMICOLON, val=;, ival=0, dval=0.000000, refs=1) bar 0 1 @@ -79,3 +91,4 @@ BA BB 5 4 +3.000000 |
