mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-29 03:25:48 +01:00
Docs and so forth for macro-string/compileMacro changes that snuck into a previous commit.
This commit is contained in:
@@ -639,7 +639,7 @@ execute 'syn match <name>Option "\<\%(no\|inv\)\=\%(' .
|
|||||||
\ join(s:toggleOptions, '\|') .
|
\ join(s:toggleOptions, '\|') .
|
||||||
\ '\)\>!\=" contained nextgroup=<name>SetMod'
|
\ '\)\>!\=" contained nextgroup=<name>SetMod'
|
||||||
|
|
||||||
syn match <name>SetMod "\%(\<lt>[a-z_]\+\)\@<=&" contained
|
syn match <name>SetMod "\%(\<[a-z_]\+\)\@<=&" contained
|
||||||
|
|
||||||
syn region <name>JavaScript start="\%(^\s*\%(javascript\|js\)\s\+\)\@<=" end="$" contains=@javascriptTop keepend oneline
|
syn region <name>JavaScript start="\%(^\s*\%(javascript\|js\)\s\+\)\@<=" end="$" contains=@javascriptTop keepend oneline
|
||||||
syn region <name>JavaScript matchgroup=<name>JavaScriptDelimiter
|
syn region <name>JavaScript matchgroup=<name>JavaScriptDelimiter
|
||||||
@@ -650,7 +650,7 @@ execute 'syn region <name>Css start="' . s:cssRegionStart . '" end="$" contains=
|
|||||||
execute 'syn region <name>Css matchgroup=<name>CssDelimiter'
|
execute 'syn region <name>Css matchgroup=<name>CssDelimiter'
|
||||||
\ 'start="' . s:cssRegionStart . '<<\s*\z(\h\w*\)"hs=s+2 end="^\z1$" contains=@cssTop fold'
|
\ 'start="' . s:cssRegionStart . '<<\s*\z(\h\w*\)"hs=s+2 end="^\z1$" contains=@cssTop fold'
|
||||||
|
|
||||||
syn match <name>Notation "<lt>[0-9A-Za-z-]\+>"
|
syn match <name>Notation "<[0-9A-Za-z-]\+>"
|
||||||
|
|
||||||
syn match <name>Comment +".*$+ contains=<name>Todo,@Spell
|
syn match <name>Comment +".*$+ contains=<name>Todo,@Spell
|
||||||
syn keyword <name>Todo FIXME NOTE TODO XXX contained
|
syn keyword <name>Todo FIXME NOTE TODO XXX contained
|
||||||
|
|||||||
@@ -93,19 +93,20 @@
|
|||||||
the form of <em><<a>name</a>></em>. These tokens are replaced by
|
the form of <em><<a>name</a>></em>. These tokens are replaced by
|
||||||
the parameter <a>name</a> as specified in the relevant documentation.
|
the parameter <a>name</a> as specified in the relevant documentation.
|
||||||
If the token is in the form <em><q-<a>name</a>></em>, the value of the
|
If the token is in the form <em><q-<a>name</a>></em>, the value of the
|
||||||
parameter is automatically <link topic="quoting">quoted</link>.
|
parameter is automatically <link topic="quoting">quoted</link>. If it is in
|
||||||
|
the form of <em><e-<a>name</a>></em>, its value is never shown but may be
|
||||||
|
used to test whether the given parameter is empty.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
Any substring enclosed by <em><[</em>
|
Any substring enclosed by <em><{</em> and <em>}></em> is automatically
|
||||||
and <em>]></em> is automatically elided if any of the contained macros
|
elided if any of the contained macros characters aren't currently valid. A
|
||||||
characters aren't currently valid. A literal <em><</em> or <em>></em>
|
literal <em><</em> or <em>></em> character may be included with the
|
||||||
character may be included with the special escape sequences <em><lt></em>
|
special escape sequences <em><lt></em> or <em><gt></em> respectively.
|
||||||
or <em><gt></em> respectively.
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
For example, given the format string
|
For example, given the format string
|
||||||
<str><em><[</em>(cmd: <em><column></em>) <em>]><[</em>line: <em><line> ]><file></em></str>,
|
<str><em><{</em>(cmd: <em><column></em>) <em>}><{</em>line: <em><line> }><file></em></str>,
|
||||||
where <em>line</em>=<hl key="Number">32</hl> and
|
where <em>line</em>=<hl key="Number">32</hl> and
|
||||||
<em>file</em>=<str delim="'">Lieder eines fahrenden Gesellen.txt</str>,
|
<em>file</em>=<str delim="'">Lieder eines fahrenden Gesellen.txt</str>,
|
||||||
the result is formatted as
|
the result is formatted as
|
||||||
|
|||||||
@@ -303,9 +303,9 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
|
|||||||
let re = util.regexp(<![CDATA[
|
let re = util.regexp(<![CDATA[
|
||||||
([^]*?) // 1
|
([^]*?) // 1
|
||||||
(?:
|
(?:
|
||||||
(<\[) | // 2
|
(<\{) | // 2
|
||||||
(< ((?:[a-z]-)?[a-z-]*?) >) | // 3 4
|
(< ((?:[a-z]-)?[a-z-]*?) >) | // 3 4
|
||||||
(\]>) // 5
|
(\}>) // 5
|
||||||
)
|
)
|
||||||
]]>, "giy");
|
]]>, "giy");
|
||||||
while (match = re.exec(macro)) {
|
while (match = re.exec(macro)) {
|
||||||
@@ -348,7 +348,7 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
|
|||||||
if (end < macro.length)
|
if (end < macro.length)
|
||||||
stack.top.elements.push(macro.substr(end));
|
stack.top.elements.push(macro.substr(end));
|
||||||
|
|
||||||
util.assert(stack.length === 1, "Unmatched <[ in macro");
|
util.assert(stack.length === 1, "Unmatched <{ in macro");
|
||||||
return stack.top;
|
return stack.top;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user