aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/parser.h
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2024-10-15 01:46:52 +0300
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2024-10-15 01:46:52 +0300
commit820f716dd16008eef386f6541fa76dcbac793a9b (patch)
tree3b356d114edbec5315de43a400d6888ed4137759 /src/parser.h
parent43924ddb3059a011760346b5b5c65587d80502e9 (diff)
downloadsciteco-820f716dd16008eef386f6541fa76dcbac793a9b.tar.gz
improved support for braces within loops: warn about unclosed braces and allow breaking from within braces
For instance, you can now write <23(1;)> without leaving anything on the stack.
Diffstat (limited to 'src/parser.h')
-rw-r--r--src/parser.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/parser.h b/src/parser.h
index 3bf9050..29b96b6 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -36,7 +36,9 @@ typedef struct {
/** how many iterations are left */
teco_int_t counter;
/** Program counter of loop start command */
- gsize pc : sizeof(gsize)*8 - 1;
+ gsize pc;
+ /** Brace level at loop start */
+ guint brace_level : sizeof(guint)*8 - 1;
/**
* Whether the loop represents an argument
* barrier or not (it "passes through"