Skip to content

Commit 1a4ea99

Browse files
committed
1 parent 29759bb commit 1a4ea99

File tree

8 files changed

+12
-4
lines changed

8 files changed

+12
-4
lines changed
677 Bytes
Binary file not shown.

.doctrees/environment.pickle

0 Bytes
Binary file not shown.

_sources/docs/lexerdevelopment.rst.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,11 @@ contribute a new lexer, but you might find it useful in any case.
783783

784784
into::
785785

786-
(r"[\(\)\[\]{}]", token.Punctuation)
786+
(r"[\(\)\[\]{}]+", token.Punctuation)
787+
788+
.. note::
789+
790+
We're using ``+`` here as well to match successive punctuation tokens together. See below for more information about this.
787791

788792

789793
* Be careful with ``.*``. This matches greedily as much as it can. For instance,
0 Bytes
Binary file not shown.

_static/pyodide/pyodide.asm.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

_static/pyodide/test.tar

0 Bytes
Binary file not shown.

docs/lexerdevelopment/index.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -821,9 +821,13 @@ <h2>Modifying Token Streams<a class="headerlink" href="#modifying-token-streams"
821821
</pre></div>
822822
</div>
823823
<p>into:</p>
824-
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="p">(</span><span class="sa">r</span><span class="s2">&quot;[\(\)\[\]</span><span class="si">{}</span><span class="s2">]&quot;</span><span class="p">,</span> <span class="n">token</span><span class="o">.</span><span class="n">Punctuation</span><span class="p">)</span>
824+
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="p">(</span><span class="sa">r</span><span class="s2">&quot;[\(\)\[\]</span><span class="si">{}</span><span class="s2">]+&quot;</span><span class="p">,</span> <span class="n">token</span><span class="o">.</span><span class="n">Punctuation</span><span class="p">)</span>
825825
</pre></div>
826826
</div>
827+
<div class="admonition note">
828+
<p class="admonition-title">Note</p>
829+
<p>We’re using <code class="docutils literal notranslate"><span class="pre">+</span></code> here as well to match successive punctuation tokens together. See below for more information about this.</p>
830+
</div>
827831
</li>
828832
<li><p>Be careful with <code class="docutils literal notranslate"><span class="pre">.*</span></code>. This matches greedily as much as it can. For instance,
829833
a rule like <code class="docutils literal notranslate"><span class="pre">&#64;.*&#64;</span></code> will match the whole string <code class="docutils literal notranslate"><span class="pre">&#64;first&#64;</span> <span class="pre">second</span> <span class="pre">&#64;third&#64;</span></code>,

searchindex.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)