diff options
| -rw-r--r-- | docs/stats.txt | 2 | ||||
| -rwxr-xr-x | fype | bin | 287968 -> 287944 bytes | |||
| -rw-r--r-- | src/build.h | 2 | ||||
| -rw-r--r-- | src/core/interpret.c | 18 |
4 files changed, 12 insertions, 10 deletions
diff --git a/docs/stats.txt b/docs/stats.txt index 1123c63..e4a2d10 100644 --- a/docs/stats.txt +++ b/docs/stats.txt @@ -1,6 +1,6 @@ make[1]: Entering directory '/home/paul/git/fype' ===> Num of C source files : 46 -===> Num of C source lines : 8742 +===> Num of C source lines : 8744 ===> Num of Fype source examples : 19 ===> Num of Fype source lines : 883 make[1]: Leaving directory '/home/paul/git/fype' Binary files differdiff --git a/src/build.h b/src/build.h index 8c250dc..cd6ed73 100644 --- a/src/build.h +++ b/src/build.h @@ -36,7 +36,7 @@ #ifndef BUILD_H #define BUILD_H -#define BUILDNR 9707 +#define BUILDNR 9709 #define OS_LINUX #endif diff --git a/src/core/interpret.c b/src/core/interpret.c index ba0eade..7fc9334 100644 --- a/src/core/interpret.c +++ b/src/core/interpret.c @@ -467,18 +467,20 @@ _func_decl(Interpret *p_interpret) { return (0); } +/* Try each parse rule in priority order; the first that matches + * returns 1. Every rule either consumes tokens and returns 1, + * or leaves the token stream untouched and returns 0, so a single + * pass suffices — the former double-retry loop was vestigial. */ int _statement(Interpret *p_interpret) { _CHECK TRACK - for (int i = 0; i < 2; ++i) { - if (_proc_decl(p_interpret)) return (1); - if (_func_decl(p_interpret)) return (1); - if (_var_decl(p_interpret)) return (1); - if (_control(p_interpret)) return (1); - if (_expression(p_interpret)) return (1); - if (_block(p_interpret)) return (1); - } + if (_proc_decl(p_interpret)) return (1); + if (_func_decl(p_interpret)) return (1); + if (_var_decl(p_interpret)) return (1); + if (_control(p_interpret)) return (1); + if (_expression(p_interpret)) return (1); + if (_block(p_interpret)) return (1); return (0); } |
