diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2015-06-29 14:45:41 +0200 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2015-06-29 14:45:41 +0200 |
commit | cbcda49236665b3721ee9c3c66aa4bad08d777b8 (patch) | |
tree | c52c6eb8092c56429578c639246914170604a290 /src/spawn.cpp | |
parent | 9c19ab0c91b6ac3e91093a2fec12dbfdb021cfb5 (diff) | |
download | sciteco-cbcda49236665b3721ee9c3c66aa4bad08d777b8.tar.gz |
MicroStateMachine::input() returns whether a result was set now
* this means that QRegSpecMachine::input() no longer has to return
a dummy QRegister in parse-only mode.
This saves an unnecessary QRegister table lookup and speeds up
parsing.
* QRegSpecMachine can now be easily extended to behave differently
when returning a Q-Register, e.g. simply returning NULL if a register
does not exist, or returning a register by prefix.
This is important for some planned commands.
* StateExpectQReg::got_register() now gets a QRegister *.
It can theoretically be NULL - still we don't have to check
for NULL in most cases since NULL is only passed in parse-only mode.
Diffstat (limited to 'src/spawn.cpp')
-rw-r--r-- | src/spawn.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/spawn.cpp b/src/spawn.cpp index b5d64e9..a6ca4e8 100644 --- a/src/spawn.cpp +++ b/src/spawn.cpp @@ -482,10 +482,10 @@ gerror: * The register <q> is defined if it does not already exist. */ State * -StateEGCommand::got_register(QRegister ®) +StateEGCommand::got_register(QRegister *reg) { BEGIN_EXEC(&States::executecommand); - undo.push_var(register_argument) = ® + undo.push_var(register_argument) = reg; return &States::executecommand; } |