diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2020-09-14 11:36:16 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2020-09-14 11:36:16 -0700 |
| commit | 45c4fb1049d3f083e932875b1ecd7cb70eb3b507 (patch) | |
| tree | 3afa104664318525a457df9c5e912cab7958df96 | |
| parent | 57669a2d704253d8458371b6ba64fd7af6da9e26 (diff) | |
Tweaks and docs
| -rw-r--r-- | bpeg.1 | 4 | ||||
| -rw-r--r-- | grammars/builtins.bpeg | 4 |
2 files changed, 6 insertions, 2 deletions
@@ -145,6 +145,10 @@ be a string, and it may contain references to captured values: \fB@0\fR Will match only if \fI<pat1>\fR and \fI<pat2>\fR both match and have the exact same length. Pronounced \fI<pat1>\fB-assuming-it-equals-\fI<pat2>\fR +.B | +This pattern matches the indentation at the beginning of a line that has the +same indentation as the line before (or zero indentation on the first line). + .B (/) The empty string (a pattern that always matches). diff --git a/grammars/builtins.bpeg b/grammars/builtins.bpeg index df03104..b90ac12 100644 --- a/grammars/builtins.bpeg +++ b/grammars/builtins.bpeg @@ -8,8 +8,8 @@ only-matches = +{...@pattern=>'@1\n'}; matching-line = +(..@pattern) ..$; # Helper definitions (commonly used) -indent = \n |+(\t/' '); -dedent = >(\n !|); +indent = \n|+(\t/' '); +dedent = $ !(\n|); indented-block = |` ..$ *(\n|..$); crlf = \r\n; cr = \r; r = \r; |
