diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2020-09-13 15:55:09 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2020-09-13 15:55:09 -0700 |
| commit | ba5b5196cee8c4a8c3ec47854ed9de8b19065ffa (patch) | |
| tree | ea40323ed68a631c20396fa0fad561339529c450 /grammars | |
| parent | 12d748c76c8eacdcb0fab807782fffd03719acd4 (diff) | |
Added default * **/* glob handling when no files provided
Diffstat (limited to 'grammars')
| -rw-r--r-- | grammars/builtins.bpeg | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/grammars/builtins.bpeg b/grammars/builtins.bpeg index 0de9ae3..0741bfc 100644 --- a/grammars/builtins.bpeg +++ b/grammars/builtins.bpeg @@ -1,10 +1,11 @@ # Meta-rules for acting on everything pattern = !(/); # Not defined by default replacement = {!(/)=>}; # Not defined by default -replace-all = *&&@replacement &&$$; -find-all = *(matching-line / {&&(\n/$$)=>}); -only-matches = *{&&@pattern=>'@1\n'}; +replace-all = +&&@replacement &&$$; +find-all = {&&>matching-line=>} +(matching-line/non-matching-line); +only-matches = +{&&@pattern=>'@1\n'}; matching-line = +&@pattern *. $ ?\n; +non-matching-line = {&&(\n/$$)=>}; # Helper definitions (commonly used) crlf = \r\n; |
