diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2020-09-28 16:35:22 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2020-09-28 16:35:22 -0700 |
| commit | 907101b42159c3d2a8ee74540fb8e9259b36db7e (patch) | |
| tree | 7f988fd069c4eb445ea89d191dc551086c1fce71 /compiler.c | |
| parent | 5049bd7cad8478ecb3f16f8aa7b9b741825922d7 (diff) | |
Fixes for captures and backrefs, and added block comments
Diffstat (limited to 'compiler.c')
| -rw-r--r-- | compiler.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -267,7 +267,7 @@ vm_op_t *bpeg_simplepattern(file_t *f, const char *str) case '@': { op->op = VM_CAPTURE; const char *a = *str == '!' ? &str[1] : after_name(str); - if (a > str && *after_spaces(a) == '=') { + if (a > str && a[0] == '=' && a[1] != '>') { op->args.capture.name = strndup(str, (size_t)(a-str)); str = a + 1; } |
