diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2016-02-17 13:11:58 +0100 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2016-02-17 13:11:58 +0100 |
commit | 6efa2ebd0e44b758740120374d63874beda7ba6a (patch) | |
tree | cb02fc1b2015cdc0037a7686760321873627fba3 /lib/lexers/html.tes | |
parent | c9c6e63472701017041e66d3eeb2d750b1aafb32 (diff) | |
download | sciteco-6efa2ebd0e44b758740120374d63874beda7ba6a.tar.gz |
simplified "lexer.test..." macros using the $$ return command
* this is slightly more efficient than using repeated conditionals
* the last :EN does not require a conditional, as its return
value can simply be forwarded.
* even without $$, this could have been done easier using
a once-only loop and breaking out of the loop if :EN fails using :;.
The last :EN result is still stored in QReg "_".
* :EN could also be used to match header lines if lexer.tes would
leave the first line (header line) in some Q-Reg, like the local
.[header].
However, repeated :ENs would be necessary as globbing currently
does not support {...,...} expansions.
Since sooner or later, the header line must be evaluated for some
lexer.set macro, this is probably more efficient than the current
solution using SciTECO patterns and [lexer.checkheader] could be removed
as well.
Diffstat (limited to 'lib/lexers/html.tes')
-rw-r--r-- | lib/lexers/html.tes | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/lib/lexers/html.tes b/lib/lexers/html.tes index 6c111c2..79b6a4a 100644 --- a/lib/lexers/html.tes +++ b/lib/lexers/html.tes @@ -1,22 +1,22 @@ ! AUTO-GENERATED FROM SCITE PROPERTY SET ! @[lexer.test.html]{ - :EN*.htmlQ*U.r - Q.r"F :EN*.htmQ*U.r ' - Q.r"F :EN*.aspQ*U.r ' - Q.r"F :EN*.shtmlQ*U.r ' - Q.r"F :EN*.htdQ*U.r ' - Q.r"F :EN*.jspQ*U.r ' - Q.r"F :EN*.xhtmlQ*U.r ' - Q.r"F :EN*.php3Q*U.r ' - Q.r"F :EN*.phtmlQ*U.r ' - Q.r"F :EN*.phpQ*U.r ' - Q.r"F :EN*.httQ*U.r ' - Q.r"F :EN*.cfmQ*U.r ' - Q.r"F :EN*.tplQ*U.r ' - Q.r"F :EN*.dtdQ*U.r ' - Q.r"F :EN*.htaQ*U.r ' -Q.r} + :EN*.htmlQ*"S -1 ' + :EN*.htmQ*"S -1 ' + :EN*.aspQ*"S -1 ' + :EN*.shtmlQ*"S -1 ' + :EN*.htdQ*"S -1 ' + :EN*.jspQ*"S -1 ' + :EN*.xhtmlQ*"S -1 ' + :EN*.php3Q*"S -1 ' + :EN*.phtmlQ*"S -1 ' + :EN*.phpQ*"S -1 ' + :EN*.httQ*"S -1 ' + :EN*.cfmQ*"S -1 ' + :EN*.tplQ*"S -1 ' + :EN*.dtdQ*"S -1 ' + :EN*.htaQ* +} @[lexer.set.html]{ ESSETLEXERLANGUAGEhypertext |