Skip to content

Commit

Permalink
documentation updates
Browse files Browse the repository at this point in the history
  • Loading branch information
katsaii committed Dec 18, 2023
1 parent d0528c1 commit 2deffe1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
9 changes: 6 additions & 3 deletions docs/3.0.2/lib-struct-catspeakenvironment.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
<span class="kw-typ">CatspeakPreset</span>.<span class="kw-mac">MATH</span>,
<span class="kw-typ">CatspeakPreset</span>.<span class="kw-mac">DRAW</span>
);
</code></pre></section><section><h1 class="heading" id="codegentype"><a href="#codegentype">§</a> codegenType</h1><pre><code><span class="kw-val">self</span>.<span class="kw-var">codegenType</span> : <span class="kw-typ">Function</span></code></pre><p>The code generator to use for this Catspeak environment.</p><p>Defaults to <code class="inline-code">CatspeakGMLCompiler</code>.</p><p>@unstable</p><p><strong>Returns</strong> <code class="inline-code">Function</code></p></section><section><h1 class="heading" id="compile"><a href="#compile">§</a> compile</h1><pre><code><span class="kw-key">static</span> <span class="kw-var">compile</span> = <span class="kw-key">function</span>(
</code></pre></section><section><h1 class="heading" id="codegentype"><a href="#codegentype">§</a> codegenType</h1><pre><code><span class="kw-val">self</span>.<span class="kw-var">codegenType</span> : <span class="kw-typ">Function</span></code></pre><blockquote class="stab experimental"><strong>🔬 This is an experimental feature. It may change at any moment.</strong></blockquote><p>The code generator to use for this Catspeak environment. Defaults to
<code class="inline-code">CatspeakGMLCompiler</code>.</p><p><strong>Returns</strong> <code class="inline-code">Function</code></p></section><section><h1 class="heading" id="compile"><a href="#compile">§</a> compile</h1><pre><code><span class="kw-key">static</span> <span class="kw-var">compile</span> = <span class="kw-key">function</span>(
<span class="kw-var">ir</span> : <span class="kw-typ">Struct</span>,
) -> <span class="kw-typ">Function</span></code></pre><p>Compiles Catspeak IR into its final representation.</p><blockquote class="remark"><strong>📝 Note</strong><p>By default, the result is a function callable from GML. However,
this may vary if you have customised the <code class="inline-code">codegen</code> field on this
Expand All @@ -49,7 +50,8 @@
<code class="inline-code">undefined</code> if the feature is disabled.</p><p><strong>Arguments</strong></p><ul><li><p><code class="inline-code">enabled</code> <em>(optional)</em></p><p>Whether to enable this feature. Defaults to <code class="inline-code">true</code>.</p></li></ul><p><strong>Returns</strong> <code class="inline-code">Struct</code></p></section><section><h1 class="heading" id="getinterface"><a href="#getinterface">§</a> getInterface</h1><pre><code><span class="kw-key">static</span> <span class="kw-var">getInterface</span> = <span class="kw-key">function</span>()
-> <span class="kw-typ">Struct</span>.<span class="kw-typ">CatspeakForeignInterface</span></code></pre><blockquote class="stab deprecated"><strong>👎 Deprecated since 3.0.0</strong><p>Use <code class="inline-code">Catspeak.interface</code> instead.</p></blockquote><p><strong>Returns</strong> <code class="inline-code">Struct.CatspeakForeignInterface</code></p></section><section><h1 class="heading" id="interface"><a href="#interface">§</a> interface</h1><pre><code><span class="kw-val">self</span>.<span class="kw-var">interface</span> : <span class="kw-typ">Struct</span>.<span class="kw-typ">CatspeakForeignInterface</span></code></pre><p>The foreign interface used by this Catspeak environment. This is where
all external GML functions and constants are exposed to the Catspeak
runtime environment.</p><p><strong>Returns</strong> <code class="inline-code">Struct.CatspeakForeignInterface</code></p></section><section><h1 class="heading" id="lexertype"><a href="#lexertype">§</a> lexerType</h1><pre><code><span class="kw-val">self</span>.<span class="kw-var">lexerType</span> : <span class="kw-typ">Function</span></code></pre><p>The tokeniser to use for this Catspeak environment.</p><p>Defaults to <code class="inline-code">CatspeakLexer</code>.</p><p>@unstable</p><p><strong>Returns</strong> <code class="inline-code">Function</code></p></section><section><h1 class="heading" id="parse"><a href="#parse">§</a> parse</h1><pre><code><span class="kw-key">static</span> <span class="kw-var">parse</span> = <span class="kw-key">function</span>(
runtime environment.</p><p><strong>Returns</strong> <code class="inline-code">Struct.CatspeakForeignInterface</code></p></section><section><h1 class="heading" id="lexertype"><a href="#lexertype">§</a> lexerType</h1><pre><code><span class="kw-val">self</span>.<span class="kw-var">lexerType</span> : <span class="kw-typ">Function</span></code></pre><blockquote class="stab experimental"><strong>🔬 This is an experimental feature. It may change at any moment.</strong></blockquote><p>The tokeniser to use for this Catspeak environment. Defaults to
<code class="inline-code">CatspeakLexer</code>.</p><p><strong>Returns</strong> <code class="inline-code">Function</code></p></section><section><h1 class="heading" id="parse"><a href="#parse">§</a> parse</h1><pre><code><span class="kw-key">static</span> <span class="kw-var">parse</span> = <span class="kw-key">function</span>(
<span class="kw-var">buff</span> : <span class="kw-typ">Id</span>.<span class="kw-typ">Buffer</span>,
<span class="kw-var">offset</span>? : <span class="kw-typ">Real</span>,
<span class="kw-var">size</span>? : <span class="kw-typ">Real</span>,
Expand All @@ -66,7 +68,8 @@
parsing to this environments async handler.</p><blockquote class="remark"><strong>📝 Note</strong><p>The async handler can be customised, and therefore any
third-party handlers are not guaranteed to finish within a
reasonable time.</p></blockquote><p><strong>Arguments</strong></p><ul><li><p><code class="inline-code">buff</code></p><p>The ID of the GML buffer to use.</p></li><li><p><code class="inline-code">offset</code> <em>(optional)</em></p><p>The offset in the buffer to start parsing from. Defaults to 0.</p></li><li><p><code class="inline-code">size</code> <em>(optional)</em></p><p>The length of the buffer input. Any characters beyond this limit
will be treated as the end of the file. Defaults to <code class="inline-code">infinity</code>.</p></li></ul></section><section><h1 class="heading" id="parsertype"><a href="#parsertype">§</a> parserType</h1><pre><code><span class="kw-val">self</span>.<span class="kw-var">parserType</span> : <span class="kw-typ">Function</span></code></pre><p>The parser to use for this Catspeak environment.</p><p>Defaults to <code class="inline-code">CatspeakParser</code>.</p><p>@unstable</p><p><strong>Returns</strong> <code class="inline-code">Function</code></p></section><section><h1 class="heading" id="parsestring"><a href="#parsestring">§</a> parseString</h1><pre><code><span class="kw-key">static</span> <span class="kw-var">parseString</span> = <span class="kw-key">function</span>(
will be treated as the end of the file. Defaults to <code class="inline-code">infinity</code>.</p></li></ul></section><section><h1 class="heading" id="parsertype"><a href="#parsertype">§</a> parserType</h1><pre><code><span class="kw-val">self</span>.<span class="kw-var">parserType</span> : <span class="kw-typ">Function</span></code></pre><blockquote class="stab experimental"><strong>🔬 This is an experimental feature. It may change at any moment.</strong></blockquote><p>The parser to use for this Catspeak environment. Defaults to
<code class="inline-code">CatspeakParser</code>.</p><p><strong>Returns</strong> <code class="inline-code">Function</code></p></section><section><h1 class="heading" id="parsestring"><a href="#parsestring">§</a> parseString</h1><pre><code><span class="kw-key">static</span> <span class="kw-var">parseString</span> = <span class="kw-key">function</span>(
<span class="kw-var">src</span> : <span class="kw-typ">String</span>,
) -> <span class="kw-typ">Struct</span></code></pre><p>Similar to <code class="inline-code">Catspeak.parse</code>, except a string is used instead of a buffer.</p><p><strong>Arguments</strong></p><ul><li><p><code class="inline-code">src</code></p><p>The string containing Catspeak source code to parse.</p></li></ul><p><strong>Returns</strong> <code class="inline-code">Struct</code></p></section><section><h1 class="heading" id="removeconstant"><a href="#removeconstant">§</a> removeConstant</h1><pre><code><span class="kw-key">static</span> <span class="kw-var">removeConstant</span></code></pre><blockquote class="stab deprecated"><strong>👎 Deprecated since 3.0.1</strong><p>Use <code class="inline-code">Catspeak.interface.addBanList</code> instead.</p></blockquote><p>Used to remove an existing constant from this environment.</p><blockquote class="remark"><strong>📝 Note</strong><p>Although you can use this to remove functions, it's recommended to
use <code class="inline-code">Catspeak.removeFunction</code> for that purpose instead.</p></blockquote><p><strong>Arguments</strong></p><ul><li><p><code class="inline-code">name</code></p><p>The name of the constant to remove.</p></li><li><p><code class="inline-code">...</code></p><p>Additional constants to remove.</p></li></ul></section><section><h1 class="heading" id="removefunction"><a href="#removefunction">§</a> removeFunction</h1><pre><code><span class="kw-key">static</span> <span class="kw-var">removeFunction</span></code></pre><blockquote class="stab deprecated"><strong>👎 Deprecated since 3.0.1</strong><p>Use <code class="inline-code">Catspeak.interface.addBanList</code> instead.</p></blockquote><p>Used to remove an existing function from this environment.</p><p><strong>Arguments</strong></p><ul><li><p><code class="inline-code">name</code></p><p>The name of the function to remove.</p></li><li><p><code class="inline-code">...</code></p><p>Additional functions to remove.</p></li></ul></section><section><h1 class="heading" id="removekeyword"><a href="#removekeyword">§</a> removeKeyword</h1><pre><code><span class="kw-key">static</span> <span class="kw-var">removeKeyword</span> = <span class="kw-key">function</span>(
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
<a href="https://github.com/katsaii/catspeak-lang">GitHub</a>
</article>
<article>
<a href="./3.0.0/hom-welcome.html">Documentation</a>
<a href="./3.0.2/hom-welcome.html">Documentation</a>
</article>
<article>
<a href="https://github.com/katsaii/catspeak-lang/releases/">Download</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,27 +45,24 @@ function CatspeakEnvironment() constructor {
self.interface = new CatspeakForeignInterface();
/// @ignore
self.sharedGlobal = undefined;
/// The tokeniser to use for this Catspeak environment.
/// The tokeniser to use for this Catspeak environment. Defaults to
/// `CatspeakLexer`.
///
/// Defaults to `CatspeakLexer`.
///
/// @unstable
/// @experimental
///
/// @return {Function}
self.lexerType = CatspeakLexer;
/// The parser to use for this Catspeak environment.
///
/// Defaults to `CatspeakParser`.
/// The parser to use for this Catspeak environment. Defaults to
/// `CatspeakParser`.
///
/// @unstable
/// @experimental
///
/// @return {Function}
self.parserType = CatspeakParser;
/// The code generator to use for this Catspeak environment.
///
/// Defaults to `CatspeakGMLCompiler`.
/// The code generator to use for this Catspeak environment. Defaults to
/// `CatspeakGMLCompiler`.
///
/// @unstable
/// @experimental
///
/// @return {Function}
self.codegenType = CatspeakGMLCompiler;
Expand Down

0 comments on commit 2deffe1

Please sign in to comment.