diff options
| author | Georg Brandl <georg@python.org> | 2007-01-25 18:29:59 +0100 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2007-01-25 18:29:59 +0100 |
| commit | c420d18b9c470fd018be5b333e611ef66db34784 (patch) | |
| tree | 2270c870264f4fb2194d161122a25edd4a0a9b48 /docs | |
| parent | f6879e93839a1ae1eafa366c8672883ca018b530 (diff) | |
| download | pygments-git-c420d18b9c470fd018be5b333e611ef66db34784.tar.gz | |
[svn] Added using(state=x) and RST lexer by Tim Hatch.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/src/lexerdevelopment.txt | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/docs/src/lexerdevelopment.txt b/docs/src/lexerdevelopment.txt index a004df5c..2af2683f 100644 --- a/docs/src/lexerdevelopment.txt +++ b/docs/src/lexerdevelopment.txt @@ -360,8 +360,12 @@ Here, two states are pushed onto the state stack, ``'script-content'`` and attributes and the closing ``>``, then the ``'tag'`` state is popped and the next state on top of the stack will be ``'script-content'``. -Any keywords arguments passed to ``using()`` are added to the keyword arguments -used to create the lexer. +The `using()` helper has a special keyword argument, `state`, which works as +follows: if given, the lexer to use initially is not in the ``"root"`` state, +but in the state given by this argument. This *only* works with a `RegexLexer`. + +Any other keywords arguments passed to `using()` are added to the keyword +arguments used to create the lexer. Delegating Lexer |
