diff options
| author | Robin Haberkorn <rhaberkorn@fmsbw.de> | 2026-07-26 02:36:20 +0200 |
|---|---|---|
| committer | Robin Haberkorn <rhaberkorn@fmsbw.de> | 2026-07-26 12:28:34 +0200 |
| commit | 68364bd3637b6944fa1f63a00dae5caf375afab9 (patch) | |
| tree | 1a6ff54138f6229cbea51a8999df297b9ce90f00 /src/parser.c | |
| parent | a07512149088ec8bb47d16ed8fbbfdefd4745626 (diff) | |
conditionals can be terminated with F" now in addition to a single-quote (')
This is useful when writing small macros directly on the
command-line as in `sciteco --eval`. If you use double quoted shell
strings, too many characters have to be escaped.
If you use single-quotes, though, embedding the conditional end (')
is annoying -- it would have to be written as '\''.
Diffstat (limited to 'src/parser.c')
| -rw-r--r-- | src/parser.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/parser.c b/src/parser.c index c84881b..32e60cd 100644 --- a/src/parser.c +++ b/src/parser.c @@ -378,7 +378,8 @@ teco_machine_main_transition_input(teco_machine_main_t *ctx, if ((ctx->flags.modifier_at && !transitions[chr].modifier_at) || (ctx->flags.mode == TECO_MODE_NORMAL && ctx->flags.modifier_colon > transitions[chr].modifier_colon)) { - teco_error_modifier_set(error, chr); + gchar cmd[] = {chr, '\0'}; + teco_error_modifier_set(error, cmd); return NULL; } |
