diff options
| author | Ben Culkin <scorpress@gmail.com> | 2020-11-13 20:34:45 -0500 |
|---|---|---|
| committer | Ben Culkin <scorpress@gmail.com> | 2020-11-13 20:34:45 -0500 |
| commit | b9e6bbe766773e96f1047f89aaa3f171f2e8b3b6 (patch) | |
| tree | 40e21962cc2a6068de0e273162e195865d735ad2 /clformat/data | |
| parent | 51507da5bf7fd5ceb39dab184020bbdb2578234c (diff) | |
Allow using an arbitrary number of '`' when naming directives
This greatly increases the number of possible directives, though some of
them could be hard to name/remember.
The general rule of thumb is that the more '`' you have in a directive
name, the more arcane/specialized/rarely used a given directive is.
Diffstat (limited to 'clformat/data')
| -rw-r--r-- | clformat/data/clformat.sprop | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/clformat/data/clformat.sprop b/clformat/data/clformat.sprop index ba1e83c..2025c25 100644 --- a/clformat/data/clformat.sprop +++ b/clformat/data/clformat.sprop @@ -27,9 +27,9 @@ clFormatPrefixParam (?:(?:[-+]?\d+|'.|[Vv]|#|%|".*?(?<!\\)")?) ## ## Parameters are seperated by ',' ## -## Named parameters are indicated by a preceeding #, which is followed by a -## parameter name (any sequence of non-space, non-seperator (',', ':', ';') -## printing characters), a seperator (: or ;), then the value of the parameter +## Named parameters are indicated by a preceding #, which is followed by a +## parameter name (any sequence of non-space, non-separator (',', ':', ';') +## printing characters), a separator (: or ;), then the value of the parameter clFormatPrefix (?:(?:#[\S&&[^,:;]]+[:;]%1$s)|%1$s) ## Match a format string modifier @@ -42,9 +42,10 @@ clFormatModifier (?:[@$:*]+) ## Matches a directive name. ## A directive name is either -## 1) A single, non-whitespace, non-/ character, optionally preceded by a grave +## 1) A single, non-whitespace, non-/ character, optionally preceded by any +## number of grave characters. ## 2) A name enclosed in /'s -clFormatName (?:(?<name>`?[\S&&[^/]])|(?:/(?<funcname>[\S&&[^/]]+)/)) +clFormatName (?:(?<name>`*?[\S&&[^/]])|(?:/(?<funcname>[\S&&[^/]]+)/)) ################################################# # Generic format strings for regular expressions. |
