feat: add async/await keywords, Num/String extensions, and Jinja markdown example

Add `async` and `await` token support to the Wren compiler with scheduler resolution logic, extend `Num` with `e` constant, hyperbolic trig, base conversion, and new methods (`isZero`, `gcd`, `lcm`, `digits`, etc.), extend `String` with `lower`, `upper`, `capitalize`, `title`, and regenerate `wren_core.wren.inc`. Include `Makefile` for multi-platform builds, rewrite `README.md` with updated build instructions, and add `example/await_demo.wren` and `example/jinja_markdown.wren` demonstrating new features.
This commit is contained in:
2026-01-25 03:58:39 +00:00
parent 74ef5cbc11
commit 46fc2e2470
139 changed files with 5078 additions and 73 deletions
+42
View File
@@ -40,6 +40,8 @@
<span class="section-title">API Reference</span>
<ul>
<li><a href="index.html">Overview</a></li>
<li><a href="string.html">String</a></li>
<li><a href="number.html">Num</a></li>
<li><a href="http.html">http</a></li>
<li><a href="websocket.html">websocket</a></li>
<li><a href="tls.html">tls</a></li>
@@ -58,6 +60,7 @@
<li><a href="datetime.html">datetime</a></li>
<li><a href="timer.html">timer</a></li>
<li><a href="io.html">io</a></li>
<li><a href="pathlib.html">pathlib</a></li>
<li><a href="scheduler.html">scheduler</a></li>
<li><a href="math.html">math</a></li>
</ul>
@@ -119,6 +122,7 @@
<li><a href="#tests">Tests</a></li>
<li><a href="#macros">Macros</a></li>
<li><a href="#template-inheritance">Template Inheritance</a></li>
<li><a href="#markdown-tags">Markdown Tags</a></li>
</ul>
</li>
<li><a href="#filters-reference">Filters Reference</a></li>
@@ -357,6 +361,34 @@ var template = env.getTemplate("page.html") // Loads ./templates/page.html</cod
This long text will be truncated to 50 characters...
{% endfilter %}</code></pre>
<h3 id="markdown-tags">Markdown Tags</h3>
<p>Convert between Markdown and HTML within templates using block tags:</p>
<h4>markdowntohtml</h4>
<p>Converts Markdown content to HTML:</p>
<pre><code>{% markdowntohtml %}
# Heading
This is **bold** text.
{% endmarkdowntohtml %}</code></pre>
<p>Variables are resolved before conversion:</p>
<pre><code>{% markdowntohtml %}
# {{ title }}
{{ description }}
{% endmarkdowntohtml %}</code></pre>
<h4>markdownfromhtml</h4>
<p>Converts HTML content back to Markdown:</p>
<pre><code>{% markdownfromhtml %}
&lt;h1&gt;Heading&lt;/h1&gt;
&lt;p&gt;This is &lt;strong&gt;bold&lt;/strong&gt; text.&lt;/p&gt;
{% endmarkdownfromhtml %}</code></pre>
<p>Corresponding filters are also available for inline use:</p>
<pre><code>{{ markdown_text|markdown }}
{{ html_content|markdownfromhtml }}</code></pre>
<h3 id="comments">Comments</h3>
<p>Comments are not included in the output:</p>
@@ -527,6 +559,16 @@ var template = env.getTemplate("page.html") // Loads ./templates/page.html</cod
<td>URL-encode string</td>
<td><code>{{ "hello world"|urlencode }}</code> &rarr; hello+world</td>
</tr>
<tr>
<td><code>markdown</code></td>
<td>Convert Markdown to HTML</td>
<td><code>{{ md_text|markdown }}</code></td>
</tr>
<tr>
<td><code>markdownfromhtml</code></td>
<td>Convert HTML to Markdown</td>
<td><code>{{ html_content|markdownfromhtml }}</code></td>
</tr>
</table>
<h3>List/Collection Filters</h3>