This commit is contained in:
edg-l 2024-02-27 10:25:37 +00:00
parent 3447e0c18f
commit 1df5b1d8b0
8 changed files with 8551 additions and 8329 deletions

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `lower_type` fn in crate `edlang_lowering`."><title>lower_type in edlang_lowering - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-ac92e1bbe349e143.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="edlang_lowering" data-themes="" data-resource-suffix="" data-rustdoc-version="1.76.0 (07dca489a 2024-02-04)" data-channel="1.76.0" data-search-js="search-2b6ce74ff89ae146.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../static.files/storage-f2adc0d6ca4d09fb.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-305769736d49e732.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-feafe1bb7466e4bd.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../edlang_lowering/index.html">edlang_lowering</a><span class="version">0.0.1-alpha.9</span></h2></div><div class="sidebar-elems"></div></nav><div class="sidebar-resizer"></div>
<main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../edlang_lowering/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="index.html">edlang_lowering</a>::<wbr><a class="fn" href="#">lower_type</a><button id="copy-path" title="Copy item path to clipboard"><img src="../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../src/edlang_lowering/lib.rs.html#1167-1261">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub fn lower_type(
<main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../edlang_lowering/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="index.html">edlang_lowering</a>::<wbr><a class="fn" href="#">lower_type</a><button id="copy-path" title="Copy item path to clipboard"><img src="../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../src/edlang_lowering/lib.rs.html#1136-1230">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub fn lower_type(
ctx: &amp;BuildCtx,
t: &amp;<a class="struct" href="../edlang_ast/struct.Type.html" title="struct edlang_ast::Type">Type</a>,
module_id: <a class="struct" href="../edlang_ir/struct.DefId.html" title="struct edlang_ir::DefId">DefId</a>

View file

@ -1,3 +1,3 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `edlang_lowering` crate."><title>edlang_lowering - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-ac92e1bbe349e143.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="edlang_lowering" data-themes="" data-resource-suffix="" data-rustdoc-version="1.76.0 (07dca489a 2024-02-04)" data-channel="1.76.0" data-search-js="search-2b6ce74ff89ae146.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../static.files/storage-f2adc0d6ca4d09fb.js"></script><script defer src="../crates.js"></script><script defer src="../static.files/main-305769736d49e732.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-feafe1bb7466e4bd.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod crate"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../edlang_lowering/index.html">edlang_lowering</a><span class="version">0.0.1-alpha.9</span></h2></div><div class="sidebar-elems"><ul class="block">
<li><a id="all-types" href="all.html">All Items</a></li></ul><section><ul class="block"><li><a href="#modules">Modules</a></li><li><a href="#functions">Functions</a></li></ul></section></div></nav><div class="sidebar-resizer"></div>
<main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../edlang_lowering/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Crate <a class="mod" href="#">edlang_lowering</a><button id="copy-path" title="Copy item path to clipboard"><img src="../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../src/edlang_lowering/lib.rs.html#1-1261">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><h2 id="modules" class="section-header"><a href="#modules">Modules</a></h2><ul class="item-table"><li><div class="item-name"><a class="mod" href="errors/index.html" title="mod edlang_lowering::errors">errors</a></div></li></ul><h2 id="functions" class="section-header"><a href="#functions">Functions</a></h2><ul class="item-table"><li><div class="item-name"><a class="fn" href="fn.lower_modules.html" title="fn edlang_lowering::lower_modules">lower_modules</a></div></li><li><div class="item-name"><a class="fn" href="fn.lower_type.html" title="fn edlang_lowering::lower_type">lower_type</a></div></li></ul></section></div></main></body></html>
<main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../edlang_lowering/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Crate <a class="mod" href="#">edlang_lowering</a><button id="copy-path" title="Copy item path to clipboard"><img src="../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../src/edlang_lowering/lib.rs.html#1-1230">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><h2 id="modules" class="section-header"><a href="#modules">Modules</a></h2><ul class="item-table"><li><div class="item-name"><a class="mod" href="errors/index.html" title="mod edlang_lowering::errors">errors</a></div></li></ul><h2 id="functions" class="section-header"><a href="#functions">Functions</a></h2><ul class="item-table"><li><div class="item-name"><a class="fn" href="fn.lower_modules.html" title="fn edlang_lowering::lower_modules">lower_modules</a></div></li><li><div class="item-name"><a class="fn" href="fn.lower_type.html" title="fn edlang_lowering::lower_type">lower_type</a></div></li></ul></section></div></main></body></html>

View file

@ -1,13 +1,13 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `__ToTriple` trait in crate `edlang_parser`."><title>__ToTriple in edlang_parser::grammar::grammar - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-ac92e1bbe349e143.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="edlang_parser" data-themes="" data-resource-suffix="" data-rustdoc-version="1.76.0 (07dca489a 2024-02-04)" data-channel="1.76.0" data-search-js="search-2b6ce74ff89ae146.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../../static.files/storage-f2adc0d6ca4d09fb.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-305769736d49e732.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-feafe1bb7466e4bd.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../edlang_parser/index.html">edlang_parser</a><span class="version">0.0.1-alpha.9</span></h2></div><h2 class="location"><a href="#">__ToTriple</a></h2><div class="sidebar-elems"><section><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.to_triple">to_triple</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-__ToTriple-for-(usize,+Token,+usize)">(usize, Token, usize)</a></li><li><a href="#impl-__ToTriple-for-Result%3C(usize,+Token,+usize),+LexicalError%3E">Result&lt;(usize, Token, usize), LexicalError&gt;</a></li></ul><h3><a href="#object-safety">Object Safety</a></h3><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In edlang_parser::grammar::grammar</a></h2></div></nav><div class="sidebar-resizer"></div>
<main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../../edlang_parser/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Trait <a href="../../index.html">edlang_parser</a>::<wbr><a href="../index.html">grammar</a>::<wbr><a href="index.html">grammar</a>::<wbr><a class="trait" href="#">__ToTriple</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../../src/edlang_parser/home/runner/work/edlang/edlang/target/debug/build/edlang_parser-e2c6b27b08503d1f/out/grammar.rs.html#311989-311992">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub trait __ToTriple {
<main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../../edlang_parser/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Trait <a href="../../index.html">edlang_parser</a>::<wbr><a href="../index.html">grammar</a>::<wbr><a href="index.html">grammar</a>::<wbr><a class="trait" href="#">__ToTriple</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../../src/edlang_parser/home/runner/work/edlang/edlang/target/debug/build/edlang_parser-e2c6b27b08503d1f/out/grammar.rs.html#312131-312134">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub trait __ToTriple {
// Required method
fn <a href="#tymethod.to_triple" class="fn">to_triple</a>(
value: Self
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.76.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(<a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>, <a class="enum" href="../../tokens/enum.Token.html" title="enum edlang_parser::tokens::Token">Token</a>, <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>), <a class="enum" href="../../../lalrpop_util/enum.ParseError.html" title="enum lalrpop_util::ParseError">ParseError</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>, <a class="enum" href="../../tokens/enum.Token.html" title="enum edlang_parser::tokens::Token">Token</a>, <a class="enum" href="../../lexer/enum.LexicalError.html" title="enum edlang_parser::lexer::LexicalError">LexicalError</a>&gt;&gt;;
}</code></pre><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><section id="tymethod.to_triple" class="method"><a class="src rightside" href="../../../src/edlang_parser/home/runner/work/edlang/edlang/target/debug/build/edlang_parser-e2c6b27b08503d1f/out/grammar.rs.html#311991">source</a><h4 class="code-header">fn <a href="#tymethod.to_triple" class="fn">to_triple</a>(
}</code></pre><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><section id="tymethod.to_triple" class="method"><a class="src rightside" href="../../../src/edlang_parser/home/runner/work/edlang/edlang/target/debug/build/edlang_parser-e2c6b27b08503d1f/out/grammar.rs.html#312133">source</a><h4 class="code-header">fn <a href="#tymethod.to_triple" class="fn">to_triple</a>(
value: Self
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.76.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(<a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>, <a class="enum" href="../../tokens/enum.Token.html" title="enum edlang_parser::tokens::Token">Token</a>, <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>), <a class="enum" href="../../../lalrpop_util/enum.ParseError.html" title="enum lalrpop_util::ParseError">ParseError</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>, <a class="enum" href="../../tokens/enum.Token.html" title="enum edlang_parser::tokens::Token">Token</a>, <a class="enum" href="../../lexer/enum.LexicalError.html" title="enum edlang_parser::lexer::LexicalError">LexicalError</a>&gt;&gt;</h4></section></div><h2 id="object-safety" class="section-header">Object Safety<a href="#object-safety" class="anchor">§</a></h2><div class="object-safety-info">This trait is <b>not</b> <a href="https://doc.rust-lang.org/1.76.0/reference/items/traits.html#object-safety">object safe</a>.</div><h2 id="foreign-impls" class="section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor">§</a></h2><details class="toggle implementors-toggle"><summary><section id="impl-__ToTriple-for-(usize,+Token,+usize)" class="impl"><a class="src rightside" href="../../../src/edlang_parser/home/runner/work/edlang/edlang/target/debug/build/edlang_parser-e2c6b27b08503d1f/out/grammar.rs.html#311994-311999">source</a><a href="#impl-__ToTriple-for-(usize,+Token,+usize)" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.__ToTriple.html" title="trait edlang_parser::grammar::grammar::__ToTriple">__ToTriple</a> for (<a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>, <a class="enum" href="../../tokens/enum.Token.html" title="enum edlang_parser::tokens::Token">Token</a>, <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>)</h3></section></summary><div class="impl-items"><section id="method.to_triple" class="method trait-impl"><a class="src rightside" href="../../../src/edlang_parser/home/runner/work/edlang/edlang/target/debug/build/edlang_parser-e2c6b27b08503d1f/out/grammar.rs.html#311996-311998">source</a><a href="#method.to_triple" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_triple" class="fn">to_triple</a>(
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.76.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(<a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>, <a class="enum" href="../../tokens/enum.Token.html" title="enum edlang_parser::tokens::Token">Token</a>, <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>), <a class="enum" href="../../../lalrpop_util/enum.ParseError.html" title="enum lalrpop_util::ParseError">ParseError</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>, <a class="enum" href="../../tokens/enum.Token.html" title="enum edlang_parser::tokens::Token">Token</a>, <a class="enum" href="../../lexer/enum.LexicalError.html" title="enum edlang_parser::lexer::LexicalError">LexicalError</a>&gt;&gt;</h4></section></div><h2 id="object-safety" class="section-header">Object Safety<a href="#object-safety" class="anchor">§</a></h2><div class="object-safety-info">This trait is <b>not</b> <a href="https://doc.rust-lang.org/1.76.0/reference/items/traits.html#object-safety">object safe</a>.</div><h2 id="foreign-impls" class="section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor">§</a></h2><details class="toggle implementors-toggle"><summary><section id="impl-__ToTriple-for-(usize,+Token,+usize)" class="impl"><a class="src rightside" href="../../../src/edlang_parser/home/runner/work/edlang/edlang/target/debug/build/edlang_parser-e2c6b27b08503d1f/out/grammar.rs.html#312136-312141">source</a><a href="#impl-__ToTriple-for-(usize,+Token,+usize)" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.__ToTriple.html" title="trait edlang_parser::grammar::grammar::__ToTriple">__ToTriple</a> for (<a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>, <a class="enum" href="../../tokens/enum.Token.html" title="enum edlang_parser::tokens::Token">Token</a>, <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>)</h3></section></summary><div class="impl-items"><section id="method.to_triple" class="method trait-impl"><a class="src rightside" href="../../../src/edlang_parser/home/runner/work/edlang/edlang/target/debug/build/edlang_parser-e2c6b27b08503d1f/out/grammar.rs.html#312138-312140">source</a><a href="#method.to_triple" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_triple" class="fn">to_triple</a>(
value: Self
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.76.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(<a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>, <a class="enum" href="../../tokens/enum.Token.html" title="enum edlang_parser::tokens::Token">Token</a>, <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>), <a class="enum" href="../../../lalrpop_util/enum.ParseError.html" title="enum lalrpop_util::ParseError">ParseError</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>, <a class="enum" href="../../tokens/enum.Token.html" title="enum edlang_parser::tokens::Token">Token</a>, <a class="enum" href="../../lexer/enum.LexicalError.html" title="enum edlang_parser::lexer::LexicalError">LexicalError</a>&gt;&gt;</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-__ToTriple-for-Result%3C(usize,+Token,+usize),+LexicalError%3E" class="impl"><a class="src rightside" href="../../../src/edlang_parser/home/runner/work/edlang/edlang/target/debug/build/edlang_parser-e2c6b27b08503d1f/out/grammar.rs.html#312000-312008">source</a><a href="#impl-__ToTriple-for-Result%3C(usize,+Token,+usize),+LexicalError%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.__ToTriple.html" title="trait edlang_parser::grammar::grammar::__ToTriple">__ToTriple</a> for <a class="enum" href="https://doc.rust-lang.org/1.76.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(<a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>, <a class="enum" href="../../tokens/enum.Token.html" title="enum edlang_parser::tokens::Token">Token</a>, <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>), <a class="enum" href="../../lexer/enum.LexicalError.html" title="enum edlang_parser::lexer::LexicalError">LexicalError</a>&gt;</h3></section></summary><div class="impl-items"><section id="method.to_triple-1" class="method trait-impl"><a class="src rightside" href="../../../src/edlang_parser/home/runner/work/edlang/edlang/target/debug/build/edlang_parser-e2c6b27b08503d1f/out/grammar.rs.html#312002-312007">source</a><a href="#method.to_triple-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_triple" class="fn">to_triple</a>(
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.76.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(<a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>, <a class="enum" href="../../tokens/enum.Token.html" title="enum edlang_parser::tokens::Token">Token</a>, <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>), <a class="enum" href="../../../lalrpop_util/enum.ParseError.html" title="enum lalrpop_util::ParseError">ParseError</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>, <a class="enum" href="../../tokens/enum.Token.html" title="enum edlang_parser::tokens::Token">Token</a>, <a class="enum" href="../../lexer/enum.LexicalError.html" title="enum edlang_parser::lexer::LexicalError">LexicalError</a>&gt;&gt;</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-__ToTriple-for-Result%3C(usize,+Token,+usize),+LexicalError%3E" class="impl"><a class="src rightside" href="../../../src/edlang_parser/home/runner/work/edlang/edlang/target/debug/build/edlang_parser-e2c6b27b08503d1f/out/grammar.rs.html#312142-312150">source</a><a href="#impl-__ToTriple-for-Result%3C(usize,+Token,+usize),+LexicalError%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.__ToTriple.html" title="trait edlang_parser::grammar::grammar::__ToTriple">__ToTriple</a> for <a class="enum" href="https://doc.rust-lang.org/1.76.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(<a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>, <a class="enum" href="../../tokens/enum.Token.html" title="enum edlang_parser::tokens::Token">Token</a>, <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>), <a class="enum" href="../../lexer/enum.LexicalError.html" title="enum edlang_parser::lexer::LexicalError">LexicalError</a>&gt;</h3></section></summary><div class="impl-items"><section id="method.to_triple-1" class="method trait-impl"><a class="src rightside" href="../../../src/edlang_parser/home/runner/work/edlang/edlang/target/debug/build/edlang_parser-e2c6b27b08503d1f/out/grammar.rs.html#312144-312149">source</a><a href="#method.to_triple-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_triple" class="fn">to_triple</a>(
value: Self
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.76.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(<a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>, <a class="enum" href="../../tokens/enum.Token.html" title="enum edlang_parser::tokens::Token">Token</a>, <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>), <a class="enum" href="../../../lalrpop_util/enum.ParseError.html" title="enum lalrpop_util::ParseError">ParseError</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>, <a class="enum" href="../../tokens/enum.Token.html" title="enum edlang_parser::tokens::Token">Token</a>, <a class="enum" href="../../lexer/enum.LexicalError.html" title="enum edlang_parser::lexer::LexicalError">LexicalError</a>&gt;&gt;</h4></section></div></details><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../../../trait.impl/edlang_parser/grammar/grammar/trait.__ToTriple.js" data-ignore-extern-crates="std,core" async></script></section></div></main></body></html>

View file

@ -431,8 +431,8 @@
StructInit(StructInitExpr),
Unary(UnaryOp, Box&lt;<span class="self">Self</span>&gt;),
Binary(Box&lt;<span class="self">Self</span>&gt;, BinaryOp, Box&lt;<span class="self">Self</span>&gt;),
Deref(Box&lt;<span class="self">Self</span>&gt;),
AsRef(Box&lt;<span class="self">Self</span>&gt;, bool),
Deref(Box&lt;<span class="self">Self</span>&gt;, Span),
AsRef(Box&lt;<span class="self">Self</span>&gt;, bool, Span),
}
<span class="attr">#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]

View file

@ -1229,37 +1229,6 @@
<a href="#1228" id="1228">1228</a>
<a href="#1229" id="1229">1229</a>
<a href="#1230" id="1230">1230</a>
<a href="#1231" id="1231">1231</a>
<a href="#1232" id="1232">1232</a>
<a href="#1233" id="1233">1233</a>
<a href="#1234" id="1234">1234</a>
<a href="#1235" id="1235">1235</a>
<a href="#1236" id="1236">1236</a>
<a href="#1237" id="1237">1237</a>
<a href="#1238" id="1238">1238</a>
<a href="#1239" id="1239">1239</a>
<a href="#1240" id="1240">1240</a>
<a href="#1241" id="1241">1241</a>
<a href="#1242" id="1242">1242</a>
<a href="#1243" id="1243">1243</a>
<a href="#1244" id="1244">1244</a>
<a href="#1245" id="1245">1245</a>
<a href="#1246" id="1246">1246</a>
<a href="#1247" id="1247">1247</a>
<a href="#1248" id="1248">1248</a>
<a href="#1249" id="1249">1249</a>
<a href="#1250" id="1250">1250</a>
<a href="#1251" id="1251">1251</a>
<a href="#1252" id="1252">1252</a>
<a href="#1253" id="1253">1253</a>
<a href="#1254" id="1254">1254</a>
<a href="#1255" id="1255">1255</a>
<a href="#1256" id="1256">1256</a>
<a href="#1257" id="1257">1257</a>
<a href="#1258" id="1258">1258</a>
<a href="#1259" id="1259">1259</a>
<a href="#1260" id="1260">1260</a>
<a href="#1261" id="1261">1261</a>
</pre></div><pre class="rust"><code><span class="kw">use </span>std::collections::HashMap;
<span class="kw">use </span>ast::{BinaryOp, ModuleStatement, Span, WhileStmt};
@ -1810,8 +1779,8 @@
find_expr_type(builder, lhs).or(find_expr_type(builder, rhs))<span class="question-mark">?
</span>}
}
ast::Expression::Deref(<span class="kw">_</span>) =&gt; <span class="macro">todo!</span>(),
ast::Expression::AsRef(<span class="kw">_</span>, <span class="kw">_</span>) =&gt; <span class="macro">todo!</span>(),
ast::Expression::Deref(<span class="kw">_</span>, <span class="kw">_</span>) =&gt; <span class="macro">todo!</span>(),
ast::Expression::AsRef(<span class="kw">_</span>, <span class="kw">_</span>, <span class="kw">_</span>) =&gt; <span class="macro">todo!</span>(),
ast::Expression::StructInit(info) =&gt; {
<span class="kw">let </span>id = <span class="kw-2">*</span>builder
.get_module_body()
@ -1833,61 +1802,19 @@
ast::Expression::Value(info) =&gt; {
<span class="kw">let </span>(value, ty, span) = lower_value(builder, info, type_hint)<span class="question-mark">?</span>;
<span class="kw">if let </span><span class="prelude-val">Some</span>(expected_ty) = type_hint {
<span class="kw">if </span>expected_ty.kind != ty {
<span class="kw">return </span><span class="prelude-val">Err</span>(LoweringError::UnexpectedType {
span,
found: ty,
expected: expected_ty.clone(),
});
}
}
(ir::RValue::Use(value, span), ty, span)
}
ast::Expression::FnCall(info) =&gt; {
<span class="kw">let </span>(value, ty, span) = lower_fn_call(builder, info)<span class="question-mark">?</span>;
<span class="kw">if let </span><span class="prelude-val">Some</span>(expected_ty) = type_hint {
<span class="kw">if </span>expected_ty.kind != ty {
<span class="kw">return </span><span class="prelude-val">Err</span>(LoweringError::UnexpectedType {
span,
found: ty,
expected: expected_ty.clone(),
});
}
}
(ir::RValue::Use(value, span), ty, span)
}
ast::Expression::Unary(<span class="kw">_</span>, <span class="kw">_</span>) =&gt; <span class="macro">todo!</span>(),
ast::Expression::Binary(lhs, op, rhs) =&gt; {
<span class="kw">let </span>result = lower_binary_expr(builder, lhs, op, rhs, type_hint)<span class="question-mark">?</span>;
<span class="kw">if let </span><span class="prelude-val">Some</span>(expected_ty) = type_hint {
<span class="kw">if </span>expected_ty.kind != result.<span class="number">1 </span>{
<span class="kw">return </span><span class="prelude-val">Err</span>(LoweringError::UnexpectedType {
span: result.<span class="number">2</span>,
found: result.<span class="number">1</span>,
expected: expected_ty.clone(),
});
}
}
result
}
ast::Expression::Deref(inner) =&gt; {
<span class="kw">let </span>(value, ty, span) = lower_expr(builder, inner, type_hint)<span class="question-mark">?</span>;
<span class="kw">if let </span><span class="prelude-val">Some</span>(expected_ty) = type_hint {
<span class="kw">if </span>expected_ty.kind != ty {
<span class="kw">return </span><span class="prelude-val">Err</span>(LoweringError::UnexpectedType {
span,
found: ty,
expected: expected_ty.clone(),
});
}
}
lower_binary_expr(builder, lhs, op, rhs, type_hint)<span class="question-mark">?
</span>}
ast::Expression::Deref(inner, deref_span) =&gt; {
<span class="kw">let </span>(value, ty, _span) = lower_expr(builder, inner, type_hint)<span class="question-mark">?</span>;
<span class="comment">// check if its a use directly, to avoid a temporary.
</span><span class="kw">let </span><span class="kw-2">mut </span>value = <span class="kw">match </span>value {
@ -1901,9 +1828,19 @@
value.projection.push(PlaceElem::Deref);
(RValue::Use(Operand::Move(value), span), ty, span)
<span class="kw">let </span>ty = <span class="kw">match </span>ty {
TypeKind::Ptr(<span class="kw">_</span>, inner) =&gt; <span class="kw-2">*</span>inner,
TypeKind::Ref(<span class="kw">_</span>, inner) =&gt; <span class="kw-2">*</span>inner,
<span class="kw">_ </span>=&gt; <span class="macro">todo!</span>(<span class="string">"proepr error here"</span>),
};
(
RValue::Use(Operand::Move(value), <span class="kw-2">*</span>deref_span),
ty.kind,
<span class="kw-2">*</span>deref_span,
)
}
ast::Expression::AsRef(inner, mutable) =&gt; {
ast::Expression::AsRef(inner, mutable, as_ref_span) =&gt; {
<span class="kw">let </span>type_hint = <span class="kw">match </span>type_hint {
<span class="prelude-val">Some</span>(inner) =&gt; <span class="kw">match </span><span class="kw-2">&amp;</span>inner.kind {
TypeKind::Ref(<span class="kw">_</span>, inner) =&gt; <span class="prelude-val">Some</span>(inner.as_ref()),
@ -1911,21 +1848,11 @@
},
<span class="prelude-val">None </span>=&gt; <span class="prelude-val">None</span>,
};
<span class="kw">let </span>(<span class="kw-2">mut </span>value, ty, span) = lower_expr(builder, inner, type_hint)<span class="question-mark">?</span>;
<span class="kw">if let </span><span class="prelude-val">Some</span>(expected_ty) = type_hint {
<span class="kw">if </span>expected_ty.kind != ty {
<span class="kw">return </span><span class="prelude-val">Err</span>(LoweringError::UnexpectedType {
span,
found: ty,
expected: expected_ty.clone(),
});
}
}
<span class="kw">let </span>(<span class="kw-2">mut </span>value, ty, _span) = lower_expr(builder, inner, type_hint)<span class="question-mark">?</span>;
<span class="comment">// check if its a use directly, to avoid a temporary.
</span>value = <span class="kw">match </span>value {
RValue::Use(op, _span) =&gt; RValue::Ref(<span class="kw-2">*</span>mutable, op, span),
RValue::Use(op, _span) =&gt; RValue::Ref(<span class="kw-2">*</span>mutable, op, <span class="kw-2">*</span>as_ref_span),
value =&gt; {
<span class="kw">let </span>inner_local = builder.add_local(Local::temp(ty.clone()));
<span class="kw">let </span>inner_place = Place {
@ -1942,19 +1869,19 @@
span: <span class="prelude-val">None</span>,
kind: StatementKind::Assign(inner_place.clone(), value),
});
RValue::Ref(<span class="kw-2">*</span>mutable, Operand::Move(inner_place), span)
RValue::Ref(<span class="kw-2">*</span>mutable, Operand::Move(inner_place), <span class="kw-2">*</span>as_ref_span)
}
};
<span class="kw">let </span>ty = TypeKind::Ref(
<span class="kw-2">*</span>mutable,
Box::new(TypeInfo {
span: <span class="prelude-val">Some</span>(span),
span: <span class="prelude-val">Some</span>(<span class="kw-2">*</span>as_ref_span),
kind: ty,
}),
);
(value, ty, span)
(value, ty, <span class="kw-2">*</span>as_ref_span)
}
ast::Expression::StructInit(info) =&gt; {
<span class="kw">let </span>id = <span class="kw-2">*</span>builder
@ -2360,7 +2287,18 @@
return_type: <span class="kw-2">&amp;</span>TypeInfo,
) -&gt; <span class="prelude-ty">Result</span>&lt;(), LoweringError&gt; {
<span class="kw">if let </span><span class="prelude-val">Some</span>(value_expr) = <span class="kw-2">&amp;</span>info.value {
<span class="kw">let </span>(value, _ty, span) = lower_expr(builder, value_expr, <span class="prelude-val">Some</span>(return_type))<span class="question-mark">?</span>;
<span class="kw">let </span>(value, ty, span) = lower_expr(builder, value_expr, <span class="prelude-val">Some</span>(return_type))<span class="question-mark">?</span>;
<span class="kw">if </span>return_type.kind != ty {
<span class="macro">dbg!</span>(<span class="string">"here"</span>);
<span class="macro">dbg!</span>(value);
<span class="kw">return </span><span class="prelude-val">Err</span>(LoweringError::UnexpectedType {
span,
found: ty,
expected: return_type.clone(),
});
}
builder.statements.push(Statement {
span: <span class="prelude-val">Some</span>(span),
kind: StatementKind::Assign(

File diff suppressed because one or more lines are too long