diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2016-11-20 00:21:42 +0100 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2016-11-20 01:52:39 +0100 |
commit | 1cec19df78318aee1330b611c6de58d128c205c4 (patch) | |
tree | 980406001d87083fdf0ed4c1dad0334de8ea6e59 /src | |
parent | 84ab1698e63170a94cfa1c5d99b7316cf3c2b584 (diff) | |
download | sciteco-1cec19df78318aee1330b611c6de58d128c205c4.tar.gz |
fixed interpretation of the Q-Register specification ".."
* From what the documentation says, a dot may only be used
once to introduce a local Q-Register specification.
The parser was accepting arbitrarily many dots though.
* Now, ".." will refer to the local register ".".
Diffstat (limited to 'src')
-rw-r--r-- | src/qregisters.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/qregisters.cpp b/src/qregisters.cpp index 23d7fc4..f6c89a8 100644 --- a/src/qregisters.cpp +++ b/src/qregisters.cpp @@ -990,9 +990,6 @@ QRegSpecMachine::input(gchar chr, QRegister *&result) MICROSTATE_START; switch (chr) { - case '.': - undo.push_var(is_local) = true; - break; case '#': set(&&StateFirstChar); break; @@ -1000,6 +997,12 @@ MICROSTATE_START; set(&&StateString); undo.push_var(nesting)++; break; + case '.': + if (!is_local) { + undo.push_var(is_local) = true; + break; + } + /* fall through */ default: undo.push_str(name) = String::chrdup(String::toupper(chr)); goto done; |