Skip to content

Commit

Permalink
deploy: c18b6b1
Browse files Browse the repository at this point in the history
  • Loading branch information
raviqqe committed Dec 6, 2023
1 parent ff6842a commit 3994441
Show file tree
Hide file tree
Showing 9 changed files with 307 additions and 252 deletions.
2 changes: 1 addition & 1 deletion src-files.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 15 additions & 3 deletions src/melior_macro/dialect.rs.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@
<a href="#108" id="108">108</a>
<a href="#109" id="109">109</a>
<a href="#110" id="110">110</a>
<a href="#111" id="111">111</a>
<a href="#112" id="112">112</a>
<a href="#113" id="113">113</a>
<a href="#114" id="114">114</a>
<a href="#115" id="115">115</a>
<a href="#116" id="116">116</a>
</pre></div><pre class="rust"><code><span class="kw">mod </span>error;
<span class="kw">mod </span>input;
<span class="kw">mod </span>operation;
Expand All @@ -116,6 +122,7 @@

<span class="kw">use </span><span class="self">self</span>::{
error::Error,
operation::generate_operation,
utility::{sanitize_documentation, sanitize_snake_case_name},
};
<span class="kw">pub use </span>input::DialectInput;
Expand Down Expand Up @@ -174,9 +181,14 @@
.all_derived_definitions(<span class="string">&quot;Op&quot;</span>)
.map(Operation::new)
.collect::&lt;<span class="prelude-ty">Result</span>&lt;Vec&lt;<span class="kw">_</span>&gt;, <span class="kw">_</span>&gt;&gt;()<span class="question-mark">?
</span>.into_iter()
.filter(|operation| operation.dialect_name() == dialect_name)
.map(|operation| operation.to_tokens())
</span>.iter()
.map(|operation| {
<span class="prelude-val">Ok</span>::&lt;<span class="kw">_</span>, Error&gt;(<span class="kw">if </span>operation.dialect_name()<span class="question-mark">? </span>== dialect_name {
<span class="prelude-val">Some</span>(generate_operation(operation)<span class="question-mark">?</span>)
} <span class="kw">else </span>{
<span class="prelude-val">None
</span>})
})
.collect::&lt;<span class="prelude-ty">Result</span>&lt;Vec&lt;<span class="kw">_</span>&gt;, <span class="kw">_</span>&gt;&gt;()<span class="question-mark">?</span>;

<span class="kw">let </span>doc = <span class="macro">format!</span>(
Expand Down
48 changes: 4 additions & 44 deletions src/melior_macro/dialect/error.rs.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,27 +81,10 @@
<a href="#81" id="81">81</a>
<a href="#82" id="82">82</a>
<a href="#83" id="83">83</a>
<a href="#84" id="84">84</a>
<a href="#85" id="85">85</a>
<a href="#86" id="86">86</a>
<a href="#87" id="87">87</a>
<a href="#88" id="88">88</a>
<a href="#89" id="89">89</a>
<a href="#90" id="90">90</a>
<a href="#91" id="91">91</a>
<a href="#92" id="92">92</a>
<a href="#93" id="93">93</a>
<a href="#94" id="94">94</a>
<a href="#95" id="95">95</a>
<a href="#96" id="96">96</a>
<a href="#97" id="97">97</a>
<a href="#98" id="98">98</a>
<a href="#99" id="99">99</a>
<a href="#100" id="100">100</a>
<a href="#101" id="101">101</a>
<a href="#102" id="102">102</a>
<a href="#103" id="103">103</a>
</pre></div><pre class="rust"><code><span class="kw">use </span>std::{
</pre></div><pre class="rust"><code><span class="kw">mod </span>ods;

<span class="kw">pub use </span><span class="self">self</span>::ods::OdsError;
<span class="kw">use </span>std::{
error,
fmt::{<span class="self">self</span>, Display, Formatter},
io,
Expand Down Expand Up @@ -181,27 +164,4 @@
<span class="self">Self</span>::Utf8(error)
}
}

<span class="attr">#[derive(Debug)]
</span><span class="kw">pub enum </span>OdsError {
ExpectedSuperClass(<span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>str),
InvalidTrait,
UnexpectedSuperClass(<span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>str),
}

<span class="kw">impl </span>Display <span class="kw">for </span>OdsError {
<span class="kw">fn </span>fmt(<span class="kw-2">&amp;</span><span class="self">self</span>, formatter: <span class="kw-2">&amp;mut </span>Formatter) -&gt; fmt::Result {
<span class="kw">match </span><span class="self">self </span>{
<span class="self">Self</span>::ExpectedSuperClass(class) =&gt; {
<span class="macro">write!</span>(formatter, <span class="string">&quot;record should be a sub-class of {class}&quot;</span>,)
}
<span class="self">Self</span>::InvalidTrait =&gt; <span class="macro">write!</span>(formatter, <span class="string">&quot;record is not a supported trait&quot;</span>),
<span class="self">Self</span>::UnexpectedSuperClass(class) =&gt; {
<span class="macro">write!</span>(formatter, <span class="string">&quot;record should not be a sub-class of {class}&quot;</span>,)
}
}
}
}

<span class="kw">impl </span>error::Error <span class="kw">for </span>OdsError {}
</code></pre></div></section></main></body></html>
55 changes: 55 additions & 0 deletions src/melior_macro/dialect/error/ods.rs.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<!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="Source of the Rust file `macro/src/dialect/error/ods.rs`."><title>ods.rs - source</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/SourceSerif4-Bold-a2c9cd1067f8b328.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-fa3bb1812debf86c.css"><meta name="rustdoc-vars" data-root-path="../../../../" data-static-root-path="../../../../static.files/" data-current-crate="melior_macro" data-themes="" data-resource-suffix="" data-rustdoc-version="1.74.0 (79e9716c9 2023-11-13)" data-channel="1.74.0" data-search-js="search-8be46b629f5f14a8.js" data-settings-js="settings-74424d7eec62a23e.js" ><script src="../../../../static.files/storage-fec3eaa3851e447d.js"></script><script defer src="../../../../static.files/src-script-3280b574d94e47b4.js"></script><script defer src="../../../../src-files.js"></script><script defer src="../../../../static.files/main-c5bd66d33317d69f.js"></script><noscript><link rel="stylesheet" href="../../../../static.files/noscript-5d8b3c7633ad77ba.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 src"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"></nav><main><nav class="sub"><a class="sub-logo-container" href="../../../../melior_macro/index.html"><img class="rust-logo" src="../../../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><form class="search-form"><span></span><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" title="help" tabindex="-1"><a href="../../../../help.html">?</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="example-wrap"><div data-nosnippet><pre class="src-line-numbers"><a href="#1" id="1">1</a>
<a href="#2" id="2">2</a>
<a href="#3" id="3">3</a>
<a href="#4" id="4">4</a>
<a href="#5" id="5">5</a>
<a href="#6" id="6">6</a>
<a href="#7" id="7">7</a>
<a href="#8" id="8">8</a>
<a href="#9" id="9">9</a>
<a href="#10" id="10">10</a>
<a href="#11" id="11">11</a>
<a href="#12" id="12">12</a>
<a href="#13" id="13">13</a>
<a href="#14" id="14">14</a>
<a href="#15" id="15">15</a>
<a href="#16" id="16">16</a>
<a href="#17" id="17">17</a>
<a href="#18" id="18">18</a>
<a href="#19" id="19">19</a>
<a href="#20" id="20">20</a>
<a href="#21" id="21">21</a>
<a href="#22" id="22">22</a>
<a href="#23" id="23">23</a>
<a href="#24" id="24">24</a>
<a href="#25" id="25">25</a>
<a href="#26" id="26">26</a>
<a href="#27" id="27">27</a>
</pre></div><pre class="rust"><code><span class="kw">use </span>std::{
error::Error,
fmt::{<span class="self">self</span>, Display, Formatter},
};

<span class="attr">#[derive(Debug)]
</span><span class="kw">pub enum </span>OdsError {
ExpectedSuperClass(<span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>str),
InvalidTrait,
UnexpectedSuperClass(<span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>str),
}

<span class="kw">impl </span>Display <span class="kw">for </span>OdsError {
<span class="kw">fn </span>fmt(<span class="kw-2">&amp;</span><span class="self">self</span>, formatter: <span class="kw-2">&amp;mut </span>Formatter) -&gt; fmt::Result {
<span class="kw">match </span><span class="self">self </span>{
<span class="self">Self</span>::ExpectedSuperClass(class) =&gt; {
<span class="macro">write!</span>(formatter, <span class="string">&quot;record should be a sub-class of {class}&quot;</span>,)
}
<span class="self">Self</span>::InvalidTrait =&gt; <span class="macro">write!</span>(formatter, <span class="string">&quot;record is not a supported trait&quot;</span>),
<span class="self">Self</span>::UnexpectedSuperClass(class) =&gt; {
<span class="macro">write!</span>(formatter, <span class="string">&quot;record should not be a sub-class of {class}&quot;</span>,)
}
}
}
}

<span class="kw">impl </span>Error <span class="kw">for </span>OdsError {}
</code></pre></div></section></main></body></html>
Loading

0 comments on commit 3994441

Please sign in to comment.