Skip to content

Commit

Permalink
build based on e7226ea
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed Jul 2, 2024
1 parent 89507a6 commit d2adc24
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion previews/PR445/.documenter-siteinfo.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"documenter":{"julia_version":"1.10.4","generation_timestamp":"2024-07-02T16:24:52","documenter_version":"1.2.1"}}
{"documenter":{"julia_version":"1.10.4","generation_timestamp":"2024-07-02T16:26:21","documenter_version":"1.2.1"}}
14 changes: 7 additions & 7 deletions previews/PR445/api/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion previews/PR445/design/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@
d)</code></pre><p>But not always!</p><pre><code class="language-julia hljs">f(a,
g(b,
c # -- missing closing `,` ?
d))</code></pre><p>Another particularly difficult problem for diagnostics in the current system is broken parentheses or double quotes in string interpolations, especially when nested.</p><h1 id="Fun-research-questions"><a class="docs-heading-anchor" href="#Fun-research-questions">Fun research questions</a><a id="Fun-research-questions-1"></a><a class="docs-heading-anchor-permalink" href="#Fun-research-questions" title="Permalink"></a></h1><h3 id="Parser-Recovery"><a class="docs-heading-anchor" href="#Parser-Recovery">Parser Recovery</a><a id="Parser-Recovery-1"></a><a class="docs-heading-anchor-permalink" href="#Parser-Recovery" title="Permalink"></a></h3><p>Can we learn fast and reasonably accurate recovery heuristics for when the parser encounters broken syntax, rather than hand-coding these? How would we set the parser up so that training works and injecting the model is nonintrusive? If the model is embedded in and works together with the parser, can it be made compact enough that training is fast and the model itself is tiny?</p><h3 id="Formatting"><a class="docs-heading-anchor" href="#Formatting">Formatting</a><a id="Formatting-1"></a><a class="docs-heading-anchor-permalink" href="#Formatting" title="Permalink"></a></h3><p>Given source and syntax tree, can we regress/learn a generative model of indentation from the syntax tree? Source formatting involves a big pile of heuristics to get something which &quot;looks nice&quot;... and ML systems have become very good at heuristics. Also, we&#39;ve got huge piles of training data — just choose some high quality, tastefully hand-formatted libraries.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../api/">« API Reference</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Tuesday 2 July 2024 16:24">Tuesday 2 July 2024</span>. Using Julia version 1.10.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
d))</code></pre><p>Another particularly difficult problem for diagnostics in the current system is broken parentheses or double quotes in string interpolations, especially when nested.</p><h1 id="Fun-research-questions"><a class="docs-heading-anchor" href="#Fun-research-questions">Fun research questions</a><a id="Fun-research-questions-1"></a><a class="docs-heading-anchor-permalink" href="#Fun-research-questions" title="Permalink"></a></h1><h3 id="Parser-Recovery"><a class="docs-heading-anchor" href="#Parser-Recovery">Parser Recovery</a><a id="Parser-Recovery-1"></a><a class="docs-heading-anchor-permalink" href="#Parser-Recovery" title="Permalink"></a></h3><p>Can we learn fast and reasonably accurate recovery heuristics for when the parser encounters broken syntax, rather than hand-coding these? How would we set the parser up so that training works and injecting the model is nonintrusive? If the model is embedded in and works together with the parser, can it be made compact enough that training is fast and the model itself is tiny?</p><h3 id="Formatting"><a class="docs-heading-anchor" href="#Formatting">Formatting</a><a id="Formatting-1"></a><a class="docs-heading-anchor-permalink" href="#Formatting" title="Permalink"></a></h3><p>Given source and syntax tree, can we regress/learn a generative model of indentation from the syntax tree? Source formatting involves a big pile of heuristics to get something which &quot;looks nice&quot;... and ML systems have become very good at heuristics. Also, we&#39;ve got huge piles of training data — just choose some high quality, tastefully hand-formatted libraries.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../api/">« API Reference</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Tuesday 2 July 2024 16:26">Tuesday 2 July 2024</span>. Using Julia version 1.10.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
2 changes: 1 addition & 1 deletion previews/PR445/howto/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>How To · JuliaSyntax.jl</title><meta name="title" content="How To · JuliaSyntax.jl"/><meta property="og:title" content="How To · JuliaSyntax.jl"/><meta property="twitter:title" content="How To · JuliaSyntax.jl"/><meta name="description" content="Documentation for JuliaSyntax.jl."/><meta property="og:description" content="Documentation for JuliaSyntax.jl."/><meta property="twitter:description" content="Documentation for JuliaSyntax.jl."/><script data-outdated-warner src="../assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.050/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.8/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../search_index.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><div class="docs-package-name"><span class="docs-autofit"><a href="../">JuliaSyntax.jl</a></span></div><button class="docs-search-query input is-rounded is-small is-clickable my-2 mx-auto py-1 px-2" id="documenter-search-query">Search docs (Ctrl + /)</button><ul class="docs-menu"><li><a class="tocitem" href="../">Overview</a></li><li class="is-active"><a class="tocitem" href>How To</a><ul class="internal"><li><a class="tocitem" href="#Use-JuliaSyntax-as-the-default-parser"><span>Use JuliaSyntax as the default parser</span></a></li></ul></li><li><span class="tocitem">Reference</span><ul><li><a class="tocitem" href="../reference/">Syntax Trees</a></li><li><a class="tocitem" href="../api/">API Reference</a></li></ul></li><li><a class="tocitem" href="../design/">Design Discussion</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><a class="docs-sidebar-button docs-navbar-link fa-solid fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>How To</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>How To</a></li></ul></nav><div class="docs-right"><a class="docs-navbar-link" href="https://github.com/JuliaLang/JuliaSyntax.jl" title="View the repository on GitHub"><span class="docs-icon fa-brands"></span><span class="docs-label is-hidden-touch">GitHub</span></a><a class="docs-navbar-link" href="https://github.com/JuliaLang/JuliaSyntax.jl/blob/main/docs/src/howto.md#L" title="Edit source on GitHub"><span class="docs-icon fa-solid"></span></a><a class="docs-settings-button docs-navbar-link fa-solid fa-gear" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-article-toggle-button fa-solid fa-chevron-up" id="documenter-article-toggle-button" href="javascript:;" title="Collapse all docstrings"></a></div></header><article class="content" id="documenter-page"><h1 id="How-To"><a class="docs-heading-anchor" href="#How-To">How-To</a><a id="How-To-1"></a><a class="docs-heading-anchor-permalink" href="#How-To" title="Permalink"></a></h1><p>This section contains brief recipes for particular tasks</p><h2 id="Use-JuliaSyntax-as-the-default-parser"><a class="docs-heading-anchor" href="#Use-JuliaSyntax-as-the-default-parser">Use JuliaSyntax as the default parser</a><a id="Use-JuliaSyntax-as-the-default-parser-1"></a><a class="docs-heading-anchor-permalink" href="#Use-JuliaSyntax-as-the-default-parser" title="Permalink"></a></h2><p>To use JuliaSyntax as the default Julia parser for the REPL and to <code>include()</code> files, parse code with <code>Meta.parse()</code>, etc, put the following in your startup.jl file:</p><pre><code class="language-julia hljs">using JuliaSyntax
JuliaSyntax.enable_in_core!()</code></pre><p>This works well in Julia 1.9 but in Julia 1.8 will cause some startup latency. To reduce that you can create a custom system image by running the code in <code>./sysimage/compile.jl</code> as a Julia script (or directly using the shell, on unix). Then use <code>julia -J $resulting_sysimage</code>.</p><p>Using a custom sysimage has the advantage that package precompilation will also go through the JuliaSyntax parser.</p><h3 id="VSCode"><a class="docs-heading-anchor" href="#VSCode">VSCode</a><a id="VSCode-1"></a><a class="docs-heading-anchor-permalink" href="#VSCode" title="Permalink"></a></h3><p>To use JuliaSyntax as the default parser for Julia within VSCode, add the following to your <code>startup.jl</code> file:</p><pre><code class="language-julia hljs">import JuliaSyntax
JuliaSyntax.enable_in_core!()</code></pre><p>To reduce startup latency you can combine with a custom system as described in the <a href="https://www.julia-vscode.org/docs/dev/userguide/compilesysimage/#Creating-a-sysimage-for-the-active-environment">Julia VScode docs</a>, combined with the precompile execution file in <code>sysimage/precompile_exec.jl</code> in the source tree. For additional detail see the discussion in <a href="https://github.com/JuliaLang/JuliaSyntax.jl/issues/128">issue #128</a>.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« Overview</a><a class="docs-footer-nextpage" href="../reference/">Syntax Trees »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Tuesday 2 July 2024 16:24">Tuesday 2 July 2024</span>. Using Julia version 1.10.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
JuliaSyntax.enable_in_core!()</code></pre><p>To reduce startup latency you can combine with a custom system as described in the <a href="https://www.julia-vscode.org/docs/dev/userguide/compilesysimage/#Creating-a-sysimage-for-the-active-environment">Julia VScode docs</a>, combined with the precompile execution file in <code>sysimage/precompile_exec.jl</code> in the source tree. For additional detail see the discussion in <a href="https://github.com/JuliaLang/JuliaSyntax.jl/issues/128">issue #128</a>.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« Overview</a><a class="docs-footer-nextpage" href="../reference/">Syntax Trees »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Tuesday 2 July 2024 16:26">Tuesday 2 July 2024</span>. Using Julia version 1.10.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
2 changes: 1 addition & 1 deletion previews/PR445/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@
7:7 │ ) &quot;)&quot;
8:8 │ * ✔ &quot;*&quot;
9:9 │ Identifier ✔ &quot;z&quot;</code></pre><p>Julia <code>Expr</code> can also be produced:</p><pre><code class="language-julia hljs">julia&gt; JuliaSyntax.parsestmt(Expr, &quot;(x + y)*z&quot;)
:((x + y) * z)</code></pre></article><nav class="docs-footer"><a class="docs-footer-nextpage" href="howto/">How To »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Tuesday 2 July 2024 16:24">Tuesday 2 July 2024</span>. Using Julia version 1.10.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
:((x + y) * z)</code></pre></article><nav class="docs-footer"><a class="docs-footer-nextpage" href="howto/">How To »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Tuesday 2 July 2024 16:26">Tuesday 2 July 2024</span>. Using Julia version 1.10.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
Loading

0 comments on commit d2adc24

Please sign in to comment.