diff options
91 files changed, 4040 insertions, 0 deletions
diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/.nojekyll diff --git a/COPYRIGHT.txt b/COPYRIGHT.txt new file mode 100644 index 0000000..16d7903 --- /dev/null +++ b/COPYRIGHT.txt @@ -0,0 +1,46 @@ +These documentation pages include resources by third parties. This copyright +file applies only to those resources. The following third party resources are +included, and carry their own copyright notices and license terms: + +* Fira Sans (FiraSans-Regular.woff, FiraSans-Medium.woff): + + Copyright (c) 2014, Mozilla Foundation https://mozilla.org/ + with Reserved Font Name Fira Sans. + + Copyright (c) 2014, Telefonica S.A. + + Licensed under the SIL Open Font License, Version 1.1. + See FiraSans-LICENSE.txt. + +* rustdoc.css, main.js, and playpen.js: + + Copyright 2015 The Rust Developers. + Licensed under the Apache License, Version 2.0 (see LICENSE-APACHE.txt) or + the MIT license (LICENSE-MIT.txt) at your option. + +* normalize.css: + + Copyright (c) Nicolas Gallagher and Jonathan Neal. + Licensed under the MIT license (see LICENSE-MIT.txt). + +* Source Code Pro (SourceCodePro-Regular.ttf.woff, + SourceCodePro-Semibold.ttf.woff, SourceCodePro-It.ttf.woff): + + Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), + with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark + of Adobe Systems Incorporated in the United States and/or other countries. + + Licensed under the SIL Open Font License, Version 1.1. + See SourceCodePro-LICENSE.txt. + +* Source Serif 4 (SourceSerif4-Regular.ttf.woff, SourceSerif4-Bold.ttf.woff, + SourceSerif4-It.ttf.woff): + + Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name + 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United + States and/or other countries. + + Licensed under the SIL Open Font License, Version 1.1. + See SourceSerif4-LICENSE.md. + +This copyright file is intended to be distributed with rustdoc output. diff --git a/FiraSans-LICENSE.txt b/FiraSans-LICENSE.txt new file mode 100644 index 0000000..d444ea9 --- /dev/null +++ b/FiraSans-LICENSE.txt @@ -0,0 +1,94 @@ +Digitized data copyright (c) 2012-2015, The Mozilla Foundation and Telefonica S.A. +with Reserved Font Name < Fira >, + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/FiraSans-Medium.woff b/FiraSans-Medium.woff Binary files differnew file mode 100644 index 0000000..7d742c5 --- /dev/null +++ b/FiraSans-Medium.woff diff --git a/FiraSans-Medium.woff2 b/FiraSans-Medium.woff2 Binary files differnew file mode 100644 index 0000000..7a1e5fc --- /dev/null +++ b/FiraSans-Medium.woff2 diff --git a/FiraSans-Regular.woff b/FiraSans-Regular.woff Binary files differnew file mode 100644 index 0000000..d8e0363 --- /dev/null +++ b/FiraSans-Regular.woff diff --git a/FiraSans-Regular.woff2 b/FiraSans-Regular.woff2 Binary files differnew file mode 100644 index 0000000..e766e06 --- /dev/null +++ b/FiraSans-Regular.woff2 diff --git a/LICENSE-APACHE.txt b/LICENSE-APACHE.txt new file mode 100644 index 0000000..16fe87b --- /dev/null +++ b/LICENSE-APACHE.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/LICENSE-MIT.txt b/LICENSE-MIT.txt new file mode 100644 index 0000000..31aa793 --- /dev/null +++ b/LICENSE-MIT.txt @@ -0,0 +1,23 @@ +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/SourceCodePro-It.ttf.woff b/SourceCodePro-It.ttf.woff Binary files differnew file mode 100644 index 0000000..8d68f2f --- /dev/null +++ b/SourceCodePro-It.ttf.woff diff --git a/SourceCodePro-LICENSE.txt b/SourceCodePro-LICENSE.txt new file mode 100644 index 0000000..0754257 --- /dev/null +++ b/SourceCodePro-LICENSE.txt @@ -0,0 +1,93 @@ +Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. + +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/SourceCodePro-Regular.ttf.woff b/SourceCodePro-Regular.ttf.woff Binary files differnew file mode 100644 index 0000000..7be076e --- /dev/null +++ b/SourceCodePro-Regular.ttf.woff diff --git a/SourceCodePro-Semibold.ttf.woff b/SourceCodePro-Semibold.ttf.woff Binary files differnew file mode 100644 index 0000000..61bc67b --- /dev/null +++ b/SourceCodePro-Semibold.ttf.woff diff --git a/SourceSerif4-Bold.ttf.woff b/SourceSerif4-Bold.ttf.woff Binary files differnew file mode 100644 index 0000000..8ad4188 --- /dev/null +++ b/SourceSerif4-Bold.ttf.woff diff --git a/SourceSerif4-It.ttf.woff b/SourceSerif4-It.ttf.woff Binary files differnew file mode 100644 index 0000000..2a34b5c --- /dev/null +++ b/SourceSerif4-It.ttf.woff diff --git a/SourceSerif4-LICENSE.md b/SourceSerif4-LICENSE.md new file mode 100644 index 0000000..68ea189 --- /dev/null +++ b/SourceSerif4-LICENSE.md @@ -0,0 +1,93 @@ +Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. + +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/SourceSerif4-Regular.ttf.woff b/SourceSerif4-Regular.ttf.woff Binary files differnew file mode 100644 index 0000000..45a5521 --- /dev/null +++ b/SourceSerif4-Regular.ttf.woff @@ -0,0 +1 @@ + body{background-color:#0f1419;color:#c5c5c5;}h1,h2,h3,h4{color:white;}h1.fqn{border-bottom-color:#5c6773;}h1.fqn a{color:#fff;}h2,h3,h4{border-bottom-color:#5c6773;}h4{border:none;}.in-band{background-color:#0f1419;}.invisible{background:rgba(0,0,0,0);}code{color:#ffb454;}h3>code,h4>code,h5>code{color:#e6e1cf;}pre>code{color:#e6e1cf;}span code{color:#e6e1cf;}.docblock a>code{color:#39AFD7 !important;}.docblock code,.docblock-short code{background-color:#191f26;}pre,.rustdoc.source .example-wrap{color:#e6e1cf;background-color:#191f26;}.sidebar{background-color:#14191f;}.logo-container.rust-logo>img{filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);}*{scrollbar-color:#5c6773 transparent;}.sidebar{scrollbar-color:#5c6773 transparent;}::-webkit-scrollbar-track{background-color:transparent;}::-webkit-scrollbar-thumb{background-color:#5c6773;}.sidebar::-webkit-scrollbar-track{background-color:transparent;}.sidebar::-webkit-scrollbar-thumb{background-color:#5c6773;}.sidebar .current{background-color:transparent;color:#ffb44c;}.source .sidebar{background-color:#0f1419;}.sidebar .location{border-color:#000;background-color:#0f1419;color:#fff;}.sidebar-elems .location{color:#ff7733;}.sidebar-elems .location a{color:#fff;}.sidebar .version{border-bottom-color:#424c57;}.sidebar-title{border-top-color:#5c6773;border-bottom-color:#5c6773;}.block a:hover{background:transparent;color:#ffb44c;}.line-numbers span{color:#5c6773;}.line-numbers .line-highlighted{color:#708090;background-color:rgba(255,236,164,0.06);padding-right:4px;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom-color:#5c6773;}.docblock table,.docblock table td,.docblock table th{border-color:#5c6773;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#c5c5c5;}.search-results a:hover{background-color:#777;}.search-results a:focus{color:#000 !important;background-color:#c6afb3;}.search-results a{color:#0096cf;}.search-results a span.desc{color:#c5c5c5;}.content .item-info::before{color:#ccc;}.content span.foreigntype,.content a.foreigntype{color:#ef57ff;}.content span.union,.content a.union{color:#98a01c;}.content span.constant,.content a.constant,.content span.static,.content a.static{color:#6380a0;}.content span.primitive,.content a.primitive{color:#32889b;}.content span.traitalias,.content a.traitalias{color:#57d399;}.content span.keyword,.content a.keyword{color:#de5249;}.content span.externcrate,.content span.mod,.content a.mod{color:#acccf9;}.content span.struct,.content a.struct{color:#ffa0a5;}.content span.enum,.content a.enum{color:#99e0c9;}.content span.trait,.content a.trait{color:#39AFD7;}.content span.type,.content a.type{color:#cfbcf5;}.content span.fn,.content a.fn,.content span.method,.content a.method,.content span.tymethod,.content a.tymethod,.content .fnname{color:#fdd687;}.content span.attr,.content a.attr,.content span.derive,.content a.derive,.content span.macro,.content a.macro{color:#a37acc;}pre.rust .comment{color:#788797;}pre.rust .doccomment{color:#a1ac88;}nav:not(.sidebar){border-bottom-color:#424c57;}nav.main .current{border-top-color:#5c6773;border-bottom-color:#5c6773;}nav.main .separator{border:1px solid #5c6773;}a{color:#c5c5c5;}.docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),.docblock-short a:not(.srclink):not(.test-arrow),.item-info a,#help a{color:#39AFD7;}details.rustdoc-toggle>summary.hideme>span,details.rustdoc-toggle>summary::before,details.undocumented>summary::before{color:#999;}#crate-search{color:#c5c5c5;background-color:#141920;box-shadow:0 0 0 1px #424c57,0 0 0 2px transparent;border-color:#424c57;}.search-input{color:#ffffff;background-color:#141920;box-shadow:0 0 0 1px #424c57,0 0 0 2px transparent;transition:box-shadow 150ms ease-in-out;}#crate-search+.search-input:focus{box-shadow:0 0 0 1px #148099,0 0 0 2px transparent;}.search-input:disabled{background-color:#3e3e3e;}.module-item .stab,.import-item .stab{color:#000;}.stab.unstable,.stab.deprecated,.stab.portability{color:#c5c5c5;background:#314559 !important;border-style:none !important;border-radius:4px;padding:3px 6px 3px 6px;}.stab.portability>code{color:#e6e1cf;background:none;}#help>div{background:#14191f;box-shadow:0px 6px 20px 0px black;border:none;border-radius:4px;}#help>div>span{border-bottom-color:#5c6773;}.since{color:grey;}tr.result span.primitive::after,tr.result span.keyword::after{color:#788797;}.line-numbers :target{background-color:transparent;}pre.rust .number,pre.rust .string{color:#b8cc52;}pre.rust .kw,pre.rust .kw-2,pre.rust .prelude-ty,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .op,pre.rust .lifetime{color:#ff7733;}pre.rust .macro,pre.rust .macro-nonterminal{color:#a37acc;}pre.rust .question-mark{color:#ff9011;}pre.rust .self{color:#36a3d9;font-style:italic;}pre.rust .attribute{color:#e6e1cf;}pre.rust .attribute .ident,pre.rust .attribute .op{color:#e6e1cf;}.example-wrap>pre.line-number{color:#5c67736e;border:none;}a.test-arrow{font-size:100%;color:#788797;border-radius:4px;background-color:rgba(57,175,215,0.09);}a.test-arrow:hover{background-color:rgba(57,175,215,0.368);color:#c5c5c5;}.toggle-label,.code-attribute{color:#999;}:target,:target>*{background:rgba(255,236,164,0.06);border-right:3px solid rgba(255,180,76,0.85);}pre.compile_fail{border-left:2px solid rgba(255,0,0,.4);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.4);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.5);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.5);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#39AFD7;}.tooltip::after{background-color:#314559;color:#c5c5c5;border:1px solid #5c6773;}.tooltip::before{border-color:transparent #314559 transparent transparent;}.notable-traits-tooltiptext{background-color:#314559;border-color:#5c6773;}.notable-traits-tooltiptext .notable{border-bottom-color:#5c6773;}#titles>button.selected{background-color:#141920 !important;border-bottom:1px solid #ffb44c !important;border-top:none;}#titles>button:not(.selected){background-color:transparent !important;border:none;}#titles>button:hover{border-bottom:1px solid rgba(242,151,24,0.3);}#titles>button>div.count{color:#888;}.search-input:focus{}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{}.content span.struct,.content a.struct,.block a.current.struct{}#titles>button:hover,#titles>button.selected{}.content span.type,.content a.type,.block a.current.type{}.content span.union,.content a.union,.block a.current.union{}pre.rust .lifetime{}.stab.unstable{}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){}.content span.enum,.content a.enum,.block a.current.enum{}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{}.content span.keyword,.content a.keyword,.block a.current.keyword{}pre.rust .comment{}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{}pre.rust .kw{}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{}pre.rust .doccomment{}.stab.deprecated{}.content a.attr,.content a.derive,.content a.macro{}.stab.portability{}.content span.primitive,.content a.primitive,.block a.current.primitive{}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{}pre.rust .kw-2,pre.rust .prelude-ty{}.content span.trait,.content a.trait,.block a.current.trait{}.search-results a:focus span{}a.result-trait:focus{}a.result-traitalias:focus{}a.result-mod:focus,a.result-externcrate:focus{}a.result-mod:focus{}a.result-externcrate:focus{}a.result-enum:focus{}a.result-struct:focus{}a.result-union:focus{}a.result-fn:focus,a.result-method:focus,a.result-tymethod:focus{}a.result-type:focus{}a.result-foreigntype:focus{}a.result-attr:focus,a.result-derive:focus,a.result-macro:focus{}a.result-constant:focus,a.result-static:focus{}a.result-primitive:focus{}a.result-keyword:focus{}@media (max-width:700px){.sidebar-menu{background-color:#14191f;border-bottom-color:#5c6773;border-right-color:#5c6773;}.sidebar-elems{background-color:#14191f;border-right-color:#5c6773;}#sidebar-filler{background-color:#14191f;border-bottom-color:#5c6773;}}kbd{color:#c5c5c5;background-color:#314559;border-color:#5c6773;border-bottom-color:#5c6773;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu,#help-button{border-color:#5c6773;background-color:#0f1419;color:#fff;}#theme-picker>img,#settings-menu>img{filter:invert(100);}#copy-path{color:#fff;}#copy-path>img{filter:invert(70%);}#copy-path:hover>img{filter:invert(100%);}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,#help-button:hover,#help-button:focus{border-color:#e0e0e0;}#theme-choices{border-color:#5c6773;background-color:#0f1419;}#theme-choices>button:not(:first-child){border-top-color:#5c6773;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:rgba(110,110,110,0.33);}@media (max-width:700px){#theme-picker{background:#0f1419;}}#all-types{background-color:#14191f;}#all-types:hover{background-color:rgba(70,70,70,0.33);}.search-results .result-name span.alias{color:#c5c5c5;}.search-results .result-name span.grey{color:#999;}#sidebar-toggle{background-color:#14191f;}#sidebar-toggle:hover{background-color:rgba(70,70,70,0.33);}#source-sidebar{background-color:#14191f;}#source-sidebar>.title{color:#fff;border-bottom-color:#5c6773;}div.files>a:hover,div.name:hover{background-color:#14191f;color:#ffb44c;}div.files>.selected{background-color:#14191f;color:#ffb44c;}.setting-line>.title{border-bottom-color:#5c6773;}input:checked+.slider{background-color:#ffb454 !important;}
\ No newline at end of file diff --git a/brush.svg b/brush.svg new file mode 100644 index 0000000..ea266e8 --- /dev/null +++ b/brush.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="1792" height="1792" viewBox="0 0 1792 1792"><path d="M1615 0q70 0 122.5 46.5t52.5 116.5q0 63-45 151-332 629-465 752-97 91-218 91-126 0-216.5-92.5t-90.5-219.5q0-128 92-212l638-579q59-54 130-54zm-909 1034q39 76 106.5 130t150.5 76l1 71q4 213-129.5 347t-348.5 134q-123 0-218-46.5t-152.5-127.5-86.5-183-29-220q7 5 41 30t62 44.5 59 36.5 46 17q41 0 55-37 25-66 57.5-112.5t69.5-76 88-47.5 103-25.5 125-10.5z"/></svg>
\ No newline at end of file diff --git a/clipboard.svg b/clipboard.svg new file mode 100644 index 0000000..8adbd99 --- /dev/null +++ b/clipboard.svg @@ -0,0 +1 @@ +<svg width="24" height="25" viewBox="0 0 24 25" xmlns="http://www.w3.org/2000/svg" aria-label="Copy to clipboard"><path d="M18 20h2v3c0 1-1 2-2 2H2c-.998 0-2-1-2-2V5c0-.911.755-1.667 1.667-1.667h5A3.323 3.323 0 0110 0a3.323 3.323 0 013.333 3.333h5C19.245 3.333 20 4.09 20 5v8.333h-2V9H2v14h16v-3zM3 7h14c0-.911-.793-1.667-1.75-1.667H13.5c-.957 0-1.75-.755-1.75-1.666C11.75 2.755 10.957 2 10 2s-1.75.755-1.75 1.667c0 .911-.793 1.666-1.75 1.666H4.75C3.793 5.333 3 6.09 3 7z"/><path d="M4 19h6v2H4zM12 11H4v2h8zM4 17h4v-2H4zM15 15v-3l-4.5 4.5L15 21v-3l8.027-.032L23 15z"/></svg> diff --git a/crates.js b/crates.js new file mode 100644 index 0000000..f87180a --- /dev/null +++ b/crates.js @@ -0,0 +1 @@ +window.ALL_CRATES = ["llvm_kaleidoscope_rs"];
\ No newline at end of file diff --git a/dark.css b/dark.css new file mode 100644 index 0000000..227deb9 --- /dev/null +++ b/dark.css @@ -0,0 +1 @@ +body{background-color:#353535;color:#ddd;}h1,h2,h3,h4{color:#ddd;}h1.fqn{border-bottom-color:#d2d2d2;}h2,h3,h4{border-bottom-color:#d2d2d2;}.in-band{background-color:#353535;}.invisible{background:rgba(0,0,0,0);}.docblock code,.docblock-short code{background-color:#2A2A2A;}pre,.rustdoc.source .example-wrap{background-color:#2A2A2A;}.sidebar{background-color:#505050;}.logo-container.rust-logo>img{filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff)}*{scrollbar-color:rgb(64,65,67) #717171;}.sidebar{scrollbar-color:rgba(32,34,37,.6) transparent;}::-webkit-scrollbar-track{background-color:#717171;}::-webkit-scrollbar-thumb{background-color:rgba(32,34,37,.6);}.sidebar::-webkit-scrollbar-track{background-color:#717171;}.sidebar::-webkit-scrollbar-thumb{background-color:rgba(32,34,37,.6);}.sidebar .current{background-color:#333;}.source .sidebar{background-color:#353535;}.sidebar .location{border-color:#fff;background:#575757;color:#DDD;}.sidebar .version{border-bottom-color:#DDD;}.sidebar-title{border-top-color:#777;border-bottom-color:#777;}.block a:hover{background:#444;}.line-numbers span{color:#3B91E2;}.line-numbers .line-highlighted{background-color:#0a042f !important;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom-color:#DDD;}.docblock table,.docblock table td,.docblock table th{border-color:#ddd;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#ddd;}.search-results a:hover{background-color:#777;}.search-results a:focus{color:#eee !important;background-color:#616161;}.search-results a:focus span{color:#eee !important;}a.result-trait:focus{background-color:#013191;}a.result-traitalias:focus{background-color:#013191;}a.result-mod:focus,a.result-externcrate:focus{background-color:#afc6e4;}a.result-mod:focus{background-color:#803a1b;}a.result-externcrate:focus{background-color:#396bac;}a.result-enum:focus{background-color:#5b4e68;}a.result-struct:focus{background-color:#194e9f;}a.result-union:focus{background-color:#b7bd49;}a.result-fn:focus,a.result-method:focus,a.result-tymethod:focus{background-color:#4950ed;}a.result-type:focus{background-color:#38902c;}a.result-foreigntype:focus{background-color:#b200d6;}a.result-attr:focus,a.result-derive:focus,a.result-macro:focus{background-color:#217d1c;}a.result-constant:focus,a.result-static:focus{background-color:#0063cc;}a.result-primitive:focus{background-color:#00708a;}a.result-keyword:focus{background-color:#884719;}.content .item-info::before{color:#ccc;}.content span.enum,.content a.enum,.block a.current.enum{color:#82b089;}.content span.struct,.content a.struct,.block a.current.struct{color:#2dbfb8;}.content span.type,.content a.type,.block a.current.type{color:#ff7f00;}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{color:#dd7de8;}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{color:#09bd00;}.content span.union,.content a.union,.block a.current.union{color:#a6ae37;}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{color:#82a5c9;}.content span.primitive,.content a.primitive,.block a.current.primitive{color:#43aec7;}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{color:#bda000;}.content span.trait,.content a.trait,.block a.current.trait{color:#b78cf2;}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{color:#b397da;}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{color:#2BAB63;}.content span.keyword,.content a.keyword,.block a.current.keyword{color:#de5249;}pre.rust .comment{color:#8d8d8b;}pre.rust .doccomment{color:#8ca375;}nav:not(.sidebar){border-bottom-color:#4e4e4e;}nav.main .current{border-top-color:#eee;border-bottom-color:#eee;}nav.main .separator{border-color:#eee;}a{color:#ddd;}.docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),.docblock-short a:not(.srclink):not(.test-arrow),.item-info a,#help a{color:#D2991D;}a.test-arrow{color:#dedede;}details.rustdoc-toggle>summary.hideme>span,details.rustdoc-toggle>summary::before,details.undocumented>summary::before{color:#999;}#crate-search{color:#111;background-color:#f0f0f0;border-color:#000;box-shadow:0 0 0 1px #000,0 0 0 2px transparent;}.search-input{color:#111;background-color:#f0f0f0;box-shadow:0 0 0 1px #000,0 0 0 2px transparent;}.search-input:focus{border-color:#008dfd;}.search-input:disabled{background-color:#c5c4c4;}#crate-search+.search-input:focus{box-shadow:0 0 8px 4px #078dd8;}.module-item .stab,.import-item .stab{color:#ddd;}.stab.unstable{background:#FFF5D6;border-color:#FFC600;color:#2f2f2f;}.stab.deprecated{background:#ffc4c4;border-color:#db7b7b;color:#2f2f2f;}.stab.portability{background:#F3DFFF;border-color:#b07bdb;color:#2f2f2f;}.stab.portability>code{background:none;}#help>div{background:#4d4d4d;border-color:#bfbfbf;}#help>div>span{border-bottom-color:#bfbfbf;}#help dt{border-color:#bfbfbf;background:rgba(0,0,0,0);}.since{color:grey;}tr.result span.primitive::after,tr.result span.keyword::after{color:#ddd;}.line-numbers :target{background-color:transparent;}pre.rust .kw{color:#ab8ac1;}pre.rust .kw-2,pre.rust .prelude-ty{color:#769acb;}pre.rust .number,pre.rust .string{color:#83a300;}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{color:#ee6868;}pre.rust .macro,pre.rust .macro-nonterminal{color:#3E999F;}pre.rust .lifetime{color:#d97f26;}pre.rust .question-mark{color:#ff9011;}.example-wrap>pre.line-number{border-color:#4a4949;}a.test-arrow{background-color:rgba(78,139,202,0.2);}a.test-arrow:hover{background-color:#4e8bca;}.toggle-label,.code-attribute{color:#999;}:target,:target>*{background-color:#494a3d;}pre.compile_fail{border-left:2px solid rgba(255,0,0,.8);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.8);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.8);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.8);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#0089ff;}.tooltip::after{background-color:#000;color:#fff;border-color:#000;}.tooltip::before{border-color:transparent black transparent transparent;}.notable-traits-tooltiptext{background-color:#111;border-color:#777;}.notable-traits-tooltiptext .notable{border-bottom-color:#d2d2d2;}#titles>button:not(.selected){background-color:#252525;border-top-color:#252525;}#titles>button:hover,#titles>button.selected{border-top-color:#0089ff;background-color:#353535;}#titles>button>div.count{color:#888;}@media (max-width:700px){.sidebar-menu{background-color:#505050;border-bottom-color:#e0e0e0;border-right-color:#e0e0e0;}.sidebar-elems{background-color:#505050;border-right-color:#000;}#sidebar-filler{background-color:#505050;border-bottom-color:#e0e0e0;}}kbd{color:#000;background-color:#fafbfc;border-color:#d1d5da;border-bottom-color:#c6cbd1;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu,#help-button{border-color:#e0e0e0;background:#f0f0f0;color:#000;}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,#help-button:hover,#help-button:focus{border-color:#ffb900;}#copy-path{color:#999;}#copy-path>img{filter:invert(50%);}#copy-path:hover>img{filter:invert(65%);}#theme-choices{border-color:#e0e0e0;background-color:#353535;}#theme-choices>button:not(:first-child){border-top-color:#e0e0e0;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:#4e4e4e;}@media (max-width:700px){#theme-picker{background:#f0f0f0;}}#all-types{background-color:#505050;}#all-types:hover{background-color:#606060;}.search-results .result-name span.alias{color:#fff;}.search-results .result-name span.grey{color:#ccc;}#sidebar-toggle{background-color:#565656;}#sidebar-toggle:hover{background-color:#676767;}#source-sidebar{background-color:#565656;}#source-sidebar>.title{border-bottom-color:#ccc;}div.files>a:hover,div.name:hover{background-color:#444;}div.files>.selected{background-color:#333;}.setting-line>.title{border-bottom-color:#ddd;}
\ No newline at end of file diff --git a/down-arrow.svg b/down-arrow.svg new file mode 100644 index 0000000..35437e7 --- /dev/null +++ b/down-arrow.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="Layer_1" width="128" height="128" enable-background="new 0 0 128 128" version="1.1" viewBox="-30 -20 176 176" xml:space="preserve"><g><line x1="111" x2="64" y1="40.5" y2="87.499" fill="none" stroke="#2F3435" stroke-linecap="square" stroke-miterlimit="10" stroke-width="12"/><line x1="64" x2="17" y1="87.499" y2="40.5" fill="none" stroke="#2F3435" stroke-linecap="square" stroke-miterlimit="10" stroke-width="12"/></g></svg>
\ No newline at end of file diff --git a/favicon-16x16.png b/favicon-16x16.png Binary files differnew file mode 100644 index 0000000..7cfe6c1 --- /dev/null +++ b/favicon-16x16.png diff --git a/favicon-32x32.png b/favicon-32x32.png Binary files differnew file mode 100644 index 0000000..5109c1d --- /dev/null +++ b/favicon-32x32.png diff --git a/favicon.svg b/favicon.svg new file mode 100644 index 0000000..8b34b51 --- /dev/null +++ b/favicon.svg @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;"> +<defs> + <style type="text/css"><![CDATA[ + #logo { + fill-rule: nonzero; + } + #logo-teeth { + stroke: #000000; + stroke-width: 0.92px; + } + @media (prefers-color-scheme: dark) { + #logo { + fill: #FFFFFF; + fill-rule: nonzero; + } + #logo-teeth { + fill: #FFFFFF; + stroke: #FFFFFF; + stroke-width: 0.92px; + } + } + ]]></style> +</defs> +<path id="logo" d="M15.993,1.54c-7.972,0 -14.461,6.492 -14.461,14.462c0,7.969 6.492,14.461 14.461,14.461c7.97,0 14.462,-6.492 14.462,-14.461c0,-7.97 -6.492,-14.462 -14.462,-14.462Zm-0.021,1.285c0.511,0.013 0.924,0.439 0.924,0.951c0,0.522 -0.43,0.952 -0.952,0.952c-0.522,0 -0.951,-0.43 -0.951,-0.952c0,0 0,0 0,0c0,-0.522 0.429,-0.952 0.951,-0.952c0.01,0 0.019,0.001 0.028,0.001Zm2.178,1.566c3.379,0.633 6.313,2.723 8.016,5.709l-1.123,2.533c-0.193,0.438 0.006,0.952 0.44,1.147l2.16,0.958c0.067,0.675 0.076,1.355 0.025,2.031l-1.202,0c-0.12,0 -0.169,0.08 -0.169,0.196l0,0.551c0,1.297 -0.731,1.582 -1.373,1.652c-0.612,0.07 -1.288,-0.257 -1.374,-0.63c-0.361,-2.029 -0.961,-2.46 -1.909,-3.21c1.178,-0.746 2.401,-1.85 2.401,-3.325c0,-1.594 -1.092,-2.597 -1.835,-3.09c-1.046,-0.688 -2.203,-0.826 -2.515,-0.826l-12.421,0c1.717,-1.918 4.02,-3.218 6.55,-3.696l1.466,1.536c0.33,0.346 0.878,0.361 1.223,0.028l1.64,-1.564Zm-13.522,7.043c0.511,0.015 0.924,0.44 0.924,0.951c0,0.522 -0.43,0.952 -0.952,0.952c-0.522,0 -0.951,-0.43 -0.951,-0.952c0,0 0,0 0,0c0,-0.522 0.429,-0.951 0.951,-0.951c0.009,0 0.019,0 0.028,0Zm22.685,0.043c0.511,0.015 0.924,0.44 0.924,0.951c0,0.522 -0.43,0.952 -0.952,0.952c-0.522,0 -0.951,-0.43 -0.951,-0.952c0,0 0,0 0,0c0,-0.522 0.429,-0.952 0.951,-0.952c0.01,0 0.019,0 0.028,0.001Zm-20.892,0.153l1.658,0l0,7.477l-3.347,0c-0.414,-1.452 -0.542,-2.97 -0.38,-4.47l2.05,-0.912c0.438,-0.195 0.637,-0.706 0.441,-1.144l-0.422,-0.951Zm6.92,0.079l3.949,0c0.205,0 1.441,0.236 1.441,1.163c0,0.768 -0.948,1.043 -1.728,1.043l-3.665,0l0.003,-2.206Zm0,5.373l3.026,0c0.275,0 1.477,0.079 1.86,1.615c0.119,0.471 0.385,2.007 0.566,2.499c0.18,0.551 0.911,1.652 1.691,1.652l4.938,0c-0.331,0.444 -0.693,0.863 -1.083,1.255l-2.01,-0.432c-0.468,-0.101 -0.93,0.199 -1.031,0.667l-0.477,2.228c-3.104,1.406 -6.672,1.389 -9.762,-0.046l-0.478,-2.228c-0.101,-0.468 -0.56,-0.767 -1.028,-0.667l-1.967,0.423c-0.365,-0.377 -0.704,-0.778 -1.016,-1.2l9.567,0c0.107,0 0.181,-0.018 0.181,-0.119l0,-3.384c0,-0.097 -0.074,-0.119 -0.181,-0.119l-2.799,0l0.003,-2.144Zm-4.415,7.749c0.512,0.015 0.924,0.44 0.924,0.951c0,0.522 -0.429,0.952 -0.951,0.952c-0.522,0 -0.952,-0.43 -0.952,-0.952c0,0 0,0 0,0c0,-0.522 0.43,-0.952 0.952,-0.952c0.009,0 0.018,0.001 0.027,0.001Zm14.089,0.043c0.511,0.015 0.924,0.439 0.923,0.951c0,0.522 -0.429,0.952 -0.951,0.952c-0.522,0 -0.951,-0.43 -0.951,-0.952c0,0 0,0 0,0c0,-0.522 0.429,-0.952 0.951,-0.952c0.009,0 0.018,0 0.028,0.001Z"/><path id="logo-teeth" d="M29.647,16.002c0,7.49 -6.163,13.653 -13.654,13.653c-7.49,0 -13.654,-6.163 -13.654,-13.653c0,-7.491 6.164,-13.654 13.654,-13.654c7.491,0 13.654,6.163 13.654,13.654Zm-0.257,-1.319l2.13,1.319l-2.13,1.318l1.83,1.71l-2.344,0.878l1.463,2.035l-2.475,0.404l1.04,2.282l-2.506,-0.089l0.575,2.442l-2.441,-0.576l0.089,2.506l-2.283,-1.04l-0.403,2.475l-2.035,-1.462l-0.878,2.343l-1.71,-1.829l-1.319,2.129l-1.318,-2.129l-1.71,1.829l-0.878,-2.343l-2.035,1.462l-0.404,-2.475l-2.282,1.04l0.089,-2.506l-2.442,0.576l0.575,-2.442l-2.505,0.089l1.04,-2.282l-2.475,-0.404l1.462,-2.035l-2.343,-0.878l1.829,-1.71l-2.129,-1.318l2.129,-1.319l-1.829,-1.71l2.343,-0.878l-1.462,-2.035l2.475,-0.404l-1.04,-2.282l2.505,0.089l-0.575,-2.441l2.442,0.575l-0.089,-2.506l2.282,1.04l0.404,-2.475l2.035,1.463l0.878,-2.344l1.71,1.83l1.318,-2.13l1.319,2.13l1.71,-1.83l0.878,2.344l2.035,-1.463l0.403,2.475l2.283,-1.04l-0.089,2.506l2.441,-0.575l-0.575,2.441l2.506,-0.089l-1.04,2.282l2.475,0.404l-1.463,2.035l2.344,0.878l-1.83,1.71Z"/></svg> diff --git a/implementors/core/clone/trait.Clone.js b/implementors/core/clone/trait.Clone.js new file mode 100644 index 0000000..39839e9 --- /dev/null +++ b/implementors/core/clone/trait.Clone.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["llvm_kaleidoscope_rs"] = [{"text":"impl<'llvm> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/llvm/struct.BasicBlock.html\" title=\"struct llvm_kaleidoscope_rs::llvm::BasicBlock\">BasicBlock</a><'llvm>","synthetic":false,"types":["llvm_kaleidoscope_rs::llvm::BasicBlock"]},{"text":"impl<'llvm> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/llvm/struct.Type.html\" title=\"struct llvm_kaleidoscope_rs::llvm::Type\">Type</a><'llvm>","synthetic":false,"types":["llvm_kaleidoscope_rs::llvm::Type"]},{"text":"impl<'llvm> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/llvm/struct.Value.html\" title=\"struct llvm_kaleidoscope_rs::llvm::Value\">Value</a><'llvm>","synthetic":false,"types":["llvm_kaleidoscope_rs::llvm::Value"]},{"text":"impl<'llvm> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/llvm/struct.FnValue.html\" title=\"struct llvm_kaleidoscope_rs::llvm::FnValue\">FnValue</a><'llvm>","synthetic":false,"types":["llvm_kaleidoscope_rs::llvm::FnValue"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
\ No newline at end of file diff --git a/implementors/core/cmp/trait.PartialEq.js b/implementors/core/cmp/trait.PartialEq.js new file mode 100644 index 0000000..6700c3f --- /dev/null +++ b/implementors/core/cmp/trait.PartialEq.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["llvm_kaleidoscope_rs"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a><<a class=\"enum\" href=\"llvm_kaleidoscope_rs/lexer/enum.Token.html\" title=\"enum llvm_kaleidoscope_rs::lexer::Token\">Token</a>> for <a class=\"enum\" href=\"llvm_kaleidoscope_rs/lexer/enum.Token.html\" title=\"enum llvm_kaleidoscope_rs::lexer::Token\">Token</a>","synthetic":false,"types":["llvm_kaleidoscope_rs::lexer::Token"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a><<a class=\"enum\" href=\"llvm_kaleidoscope_rs/parser/enum.ExprAST.html\" title=\"enum llvm_kaleidoscope_rs::parser::ExprAST\">ExprAST</a>> for <a class=\"enum\" href=\"llvm_kaleidoscope_rs/parser/enum.ExprAST.html\" title=\"enum llvm_kaleidoscope_rs::parser::ExprAST\">ExprAST</a>","synthetic":false,"types":["llvm_kaleidoscope_rs::parser::ExprAST"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a><<a class=\"struct\" href=\"llvm_kaleidoscope_rs/parser/struct.PrototypeAST.html\" title=\"struct llvm_kaleidoscope_rs::parser::PrototypeAST\">PrototypeAST</a>> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/parser/struct.PrototypeAST.html\" title=\"struct llvm_kaleidoscope_rs::parser::PrototypeAST\">PrototypeAST</a>","synthetic":false,"types":["llvm_kaleidoscope_rs::parser::PrototypeAST"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a><<a class=\"struct\" href=\"llvm_kaleidoscope_rs/parser/struct.FunctionAST.html\" title=\"struct llvm_kaleidoscope_rs::parser::FunctionAST\">FunctionAST</a>> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/parser/struct.FunctionAST.html\" title=\"struct llvm_kaleidoscope_rs::parser::FunctionAST\">FunctionAST</a>","synthetic":false,"types":["llvm_kaleidoscope_rs::parser::FunctionAST"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a><<a class=\"struct\" href=\"llvm_kaleidoscope_rs/struct.SmallCStr.html\" title=\"struct llvm_kaleidoscope_rs::SmallCStr\">SmallCStr</a>> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/struct.SmallCStr.html\" title=\"struct llvm_kaleidoscope_rs::SmallCStr\">SmallCStr</a>","synthetic":false,"types":["llvm_kaleidoscope_rs::SmallCStr"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
\ No newline at end of file diff --git a/implementors/core/convert/trait.TryFrom.js b/implementors/core/convert/trait.TryFrom.js new file mode 100644 index 0000000..e44e34a --- /dev/null +++ b/implementors/core/convert/trait.TryFrom.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["llvm_kaleidoscope_rs"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a><&'_ <a class=\"primitive\" href=\"https://doc.rust-lang.org/1.54.0/std/primitive.str.html\">str</a>> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/struct.SmallCStr.html\" title=\"struct llvm_kaleidoscope_rs::SmallCStr\">SmallCStr</a>","synthetic":false,"types":["llvm_kaleidoscope_rs::SmallCStr"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
\ No newline at end of file diff --git a/implementors/core/fmt/trait.Debug.js b/implementors/core/fmt/trait.Debug.js new file mode 100644 index 0000000..fecfabc --- /dev/null +++ b/implementors/core/fmt/trait.Debug.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["llvm_kaleidoscope_rs"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"enum\" href=\"llvm_kaleidoscope_rs/lexer/enum.Token.html\" title=\"enum llvm_kaleidoscope_rs::lexer::Token\">Token</a>","synthetic":false,"types":["llvm_kaleidoscope_rs::lexer::Token"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"enum\" href=\"llvm_kaleidoscope_rs/parser/enum.ExprAST.html\" title=\"enum llvm_kaleidoscope_rs::parser::ExprAST\">ExprAST</a>","synthetic":false,"types":["llvm_kaleidoscope_rs::parser::ExprAST"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/parser/struct.PrototypeAST.html\" title=\"struct llvm_kaleidoscope_rs::parser::PrototypeAST\">PrototypeAST</a>","synthetic":false,"types":["llvm_kaleidoscope_rs::parser::PrototypeAST"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/parser/struct.FunctionAST.html\" title=\"struct llvm_kaleidoscope_rs::parser::FunctionAST\">FunctionAST</a>","synthetic":false,"types":["llvm_kaleidoscope_rs::parser::FunctionAST"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/struct.SmallCStr.html\" title=\"struct llvm_kaleidoscope_rs::SmallCStr\">SmallCStr</a>","synthetic":false,"types":["llvm_kaleidoscope_rs::SmallCStr"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
\ No newline at end of file diff --git a/implementors/core/marker/trait.Copy.js b/implementors/core/marker/trait.Copy.js new file mode 100644 index 0000000..a41981a --- /dev/null +++ b/implementors/core/marker/trait.Copy.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["llvm_kaleidoscope_rs"] = [{"text":"impl<'llvm> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/llvm/struct.BasicBlock.html\" title=\"struct llvm_kaleidoscope_rs::llvm::BasicBlock\">BasicBlock</a><'llvm>","synthetic":false,"types":["llvm_kaleidoscope_rs::llvm::BasicBlock"]},{"text":"impl<'llvm> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/llvm/struct.Type.html\" title=\"struct llvm_kaleidoscope_rs::llvm::Type\">Type</a><'llvm>","synthetic":false,"types":["llvm_kaleidoscope_rs::llvm::Type"]},{"text":"impl<'llvm> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/llvm/struct.Value.html\" title=\"struct llvm_kaleidoscope_rs::llvm::Value\">Value</a><'llvm>","synthetic":false,"types":["llvm_kaleidoscope_rs::llvm::Value"]},{"text":"impl<'llvm> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/llvm/struct.FnValue.html\" title=\"struct llvm_kaleidoscope_rs::llvm::FnValue\">FnValue</a><'llvm>","synthetic":false,"types":["llvm_kaleidoscope_rs::llvm::FnValue"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
\ No newline at end of file diff --git a/implementors/core/marker/trait.Freeze.js b/implementors/core/marker/trait.Freeze.js new file mode 100644 index 0000000..3716d3c --- /dev/null +++ b/implementors/core/marker/trait.Freeze.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["llvm_kaleidoscope_rs"] = [{"text":"impl<'llvm, 'a> Freeze for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/codegen/struct.Codegen.html\" title=\"struct llvm_kaleidoscope_rs::codegen::Codegen\">Codegen</a><'llvm, 'a>","synthetic":true,"types":["llvm_kaleidoscope_rs::codegen::Codegen"]},{"text":"impl Freeze for <a class=\"enum\" href=\"llvm_kaleidoscope_rs/lexer/enum.Token.html\" title=\"enum llvm_kaleidoscope_rs::lexer::Token\">Token</a>","synthetic":true,"types":["llvm_kaleidoscope_rs::lexer::Token"]},{"text":"impl<I> Freeze for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/lexer/struct.Lexer.html\" title=\"struct llvm_kaleidoscope_rs::lexer::Lexer\">Lexer</a><I> <span class=\"where fmt-newline\">where<br> I: Freeze, </span>","synthetic":true,"types":["llvm_kaleidoscope_rs::lexer::Lexer"]},{"text":"impl Freeze for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/llvm/struct.Module.html\" title=\"struct llvm_kaleidoscope_rs::llvm::Module\">Module</a>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::Module"]},{"text":"impl<'llvm> Freeze for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/llvm/struct.Builder.html\" title=\"struct llvm_kaleidoscope_rs::llvm::Builder\">Builder</a><'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::Builder"]},{"text":"impl<'llvm> Freeze for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/llvm/struct.BasicBlock.html\" title=\"struct llvm_kaleidoscope_rs::llvm::BasicBlock\">BasicBlock</a><'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::BasicBlock"]},{"text":"impl<'llvm> Freeze for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/llvm/struct.Type.html\" title=\"struct llvm_kaleidoscope_rs::llvm::Type\">Type</a><'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::Type"]},{"text":"impl<'llvm> Freeze for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/llvm/struct.Value.html\" title=\"struct llvm_kaleidoscope_rs::llvm::Value\">Value</a><'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::Value"]},{"text":"impl<'llvm> Freeze for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/llvm/struct.FnValue.html\" title=\"struct llvm_kaleidoscope_rs::llvm::FnValue\">FnValue</a><'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::FnValue"]},{"text":"impl Freeze for <a class=\"enum\" href=\"llvm_kaleidoscope_rs/parser/enum.ExprAST.html\" title=\"enum llvm_kaleidoscope_rs::parser::ExprAST\">ExprAST</a>","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::ExprAST"]},{"text":"impl Freeze for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/parser/struct.PrototypeAST.html\" title=\"struct llvm_kaleidoscope_rs::parser::PrototypeAST\">PrototypeAST</a>","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::PrototypeAST"]},{"text":"impl Freeze for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/parser/struct.FunctionAST.html\" title=\"struct llvm_kaleidoscope_rs::parser::FunctionAST\">FunctionAST</a>","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::FunctionAST"]},{"text":"impl<I> Freeze for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/parser/struct.Parser.html\" title=\"struct llvm_kaleidoscope_rs::parser::Parser\">Parser</a><I> <span class=\"where fmt-newline\">where<br> I: Freeze, </span>","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::Parser"]},{"text":"impl Freeze for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/struct.SmallCStr.html\" title=\"struct llvm_kaleidoscope_rs::SmallCStr\">SmallCStr</a>","synthetic":true,"types":["llvm_kaleidoscope_rs::SmallCStr"]},{"text":"impl<A, B> Freeze for <a class=\"enum\" href=\"llvm_kaleidoscope_rs/enum.Either.html\" title=\"enum llvm_kaleidoscope_rs::Either\">Either</a><A, B> <span class=\"where fmt-newline\">where<br> A: Freeze,<br> B: Freeze, </span>","synthetic":true,"types":["llvm_kaleidoscope_rs::Either"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
\ No newline at end of file diff --git a/implementors/core/marker/trait.Send.js b/implementors/core/marker/trait.Send.js new file mode 100644 index 0000000..6d1e315 --- /dev/null +++ b/implementors/core/marker/trait.Send.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["llvm_kaleidoscope_rs"] = [{"text":"impl<'llvm, 'a> !<a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/codegen/struct.Codegen.html\" title=\"struct llvm_kaleidoscope_rs::codegen::Codegen\">Codegen</a><'llvm, 'a>","synthetic":true,"types":["llvm_kaleidoscope_rs::codegen::Codegen"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"enum\" href=\"llvm_kaleidoscope_rs/lexer/enum.Token.html\" title=\"enum llvm_kaleidoscope_rs::lexer::Token\">Token</a>","synthetic":true,"types":["llvm_kaleidoscope_rs::lexer::Token"]},{"text":"impl<I> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/lexer/struct.Lexer.html\" title=\"struct llvm_kaleidoscope_rs::lexer::Lexer\">Lexer</a><I> <span class=\"where fmt-newline\">where<br> I: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a>, </span>","synthetic":true,"types":["llvm_kaleidoscope_rs::lexer::Lexer"]},{"text":"impl !<a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/llvm/struct.Module.html\" title=\"struct llvm_kaleidoscope_rs::llvm::Module\">Module</a>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::Module"]},{"text":"impl<'llvm> !<a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/llvm/struct.Builder.html\" title=\"struct llvm_kaleidoscope_rs::llvm::Builder\">Builder</a><'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::Builder"]},{"text":"impl<'llvm> !<a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/llvm/struct.BasicBlock.html\" title=\"struct llvm_kaleidoscope_rs::llvm::BasicBlock\">BasicBlock</a><'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::BasicBlock"]},{"text":"impl<'llvm> !<a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/llvm/struct.Type.html\" title=\"struct llvm_kaleidoscope_rs::llvm::Type\">Type</a><'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::Type"]},{"text":"impl<'llvm> !<a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/llvm/struct.Value.html\" title=\"struct llvm_kaleidoscope_rs::llvm::Value\">Value</a><'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::Value"]},{"text":"impl<'llvm> !<a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/llvm/struct.FnValue.html\" title=\"struct llvm_kaleidoscope_rs::llvm::FnValue\">FnValue</a><'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::FnValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"enum\" href=\"llvm_kaleidoscope_rs/parser/enum.ExprAST.html\" title=\"enum llvm_kaleidoscope_rs::parser::ExprAST\">ExprAST</a>","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::ExprAST"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/parser/struct.PrototypeAST.html\" title=\"struct llvm_kaleidoscope_rs::parser::PrototypeAST\">PrototypeAST</a>","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::PrototypeAST"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/parser/struct.FunctionAST.html\" title=\"struct llvm_kaleidoscope_rs::parser::FunctionAST\">FunctionAST</a>","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::FunctionAST"]},{"text":"impl<I> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/parser/struct.Parser.html\" title=\"struct llvm_kaleidoscope_rs::parser::Parser\">Parser</a><I> <span class=\"where fmt-newline\">where<br> I: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a>, </span>","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::Parser"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/struct.SmallCStr.html\" title=\"struct llvm_kaleidoscope_rs::SmallCStr\">SmallCStr</a>","synthetic":true,"types":["llvm_kaleidoscope_rs::SmallCStr"]},{"text":"impl<A, B> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"enum\" href=\"llvm_kaleidoscope_rs/enum.Either.html\" title=\"enum llvm_kaleidoscope_rs::Either\">Either</a><A, B> <span class=\"where fmt-newline\">where<br> A: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a>,<br> B: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a>, </span>","synthetic":true,"types":["llvm_kaleidoscope_rs::Either"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
\ No newline at end of file diff --git a/implementors/core/marker/trait.StructuralPartialEq.js b/implementors/core/marker/trait.StructuralPartialEq.js new file mode 100644 index 0000000..f1fc453 --- /dev/null +++ b/implementors/core/marker/trait.StructuralPartialEq.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["llvm_kaleidoscope_rs"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.StructuralPartialEq.html\" title=\"trait core::marker::StructuralPartialEq\">StructuralPartialEq</a> for <a class=\"enum\" href=\"llvm_kaleidoscope_rs/lexer/enum.Token.html\" title=\"enum llvm_kaleidoscope_rs::lexer::Token\">Token</a>","synthetic":false,"types":["llvm_kaleidoscope_rs::lexer::Token"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.StructuralPartialEq.html\" title=\"trait core::marker::StructuralPartialEq\">StructuralPartialEq</a> for <a class=\"enum\" href=\"llvm_kaleidoscope_rs/parser/enum.ExprAST.html\" title=\"enum llvm_kaleidoscope_rs::parser::ExprAST\">ExprAST</a>","synthetic":false,"types":["llvm_kaleidoscope_rs::parser::ExprAST"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.StructuralPartialEq.html\" title=\"trait core::marker::StructuralPartialEq\">StructuralPartialEq</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/parser/struct.PrototypeAST.html\" title=\"struct llvm_kaleidoscope_rs::parser::PrototypeAST\">PrototypeAST</a>","synthetic":false,"types":["llvm_kaleidoscope_rs::parser::PrototypeAST"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.StructuralPartialEq.html\" title=\"trait core::marker::StructuralPartialEq\">StructuralPartialEq</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/parser/struct.FunctionAST.html\" title=\"struct llvm_kaleidoscope_rs::parser::FunctionAST\">FunctionAST</a>","synthetic":false,"types":["llvm_kaleidoscope_rs::parser::FunctionAST"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.StructuralPartialEq.html\" title=\"trait core::marker::StructuralPartialEq\">StructuralPartialEq</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/struct.SmallCStr.html\" title=\"struct llvm_kaleidoscope_rs::SmallCStr\">SmallCStr</a>","synthetic":false,"types":["llvm_kaleidoscope_rs::SmallCStr"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
\ No newline at end of file diff --git a/implementors/core/marker/trait.Sync.js b/implementors/core/marker/trait.Sync.js new file mode 100644 index 0000000..35fdad5 --- /dev/null +++ b/implementors/core/marker/trait.Sync.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["llvm_kaleidoscope_rs"] = [{"text":"impl<'llvm, 'a> !<a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/codegen/struct.Codegen.html\" title=\"struct llvm_kaleidoscope_rs::codegen::Codegen\">Codegen</a><'llvm, 'a>","synthetic":true,"types":["llvm_kaleidoscope_rs::codegen::Codegen"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"enum\" href=\"llvm_kaleidoscope_rs/lexer/enum.Token.html\" title=\"enum llvm_kaleidoscope_rs::lexer::Token\">Token</a>","synthetic":true,"types":["llvm_kaleidoscope_rs::lexer::Token"]},{"text":"impl<I> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/lexer/struct.Lexer.html\" title=\"struct llvm_kaleidoscope_rs::lexer::Lexer\">Lexer</a><I> <span class=\"where fmt-newline\">where<br> I: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a>, </span>","synthetic":true,"types":["llvm_kaleidoscope_rs::lexer::Lexer"]},{"text":"impl !<a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/llvm/struct.Module.html\" title=\"struct llvm_kaleidoscope_rs::llvm::Module\">Module</a>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::Module"]},{"text":"impl<'llvm> !<a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/llvm/struct.Builder.html\" title=\"struct llvm_kaleidoscope_rs::llvm::Builder\">Builder</a><'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::Builder"]},{"text":"impl<'llvm> !<a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/llvm/struct.BasicBlock.html\" title=\"struct llvm_kaleidoscope_rs::llvm::BasicBlock\">BasicBlock</a><'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::BasicBlock"]},{"text":"impl<'llvm> !<a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/llvm/struct.Type.html\" title=\"struct llvm_kaleidoscope_rs::llvm::Type\">Type</a><'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::Type"]},{"text":"impl<'llvm> !<a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/llvm/struct.Value.html\" title=\"struct llvm_kaleidoscope_rs::llvm::Value\">Value</a><'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::Value"]},{"text":"impl<'llvm> !<a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/llvm/struct.FnValue.html\" title=\"struct llvm_kaleidoscope_rs::llvm::FnValue\">FnValue</a><'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::FnValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"enum\" href=\"llvm_kaleidoscope_rs/parser/enum.ExprAST.html\" title=\"enum llvm_kaleidoscope_rs::parser::ExprAST\">ExprAST</a>","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::ExprAST"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/parser/struct.PrototypeAST.html\" title=\"struct llvm_kaleidoscope_rs::parser::PrototypeAST\">PrototypeAST</a>","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::PrototypeAST"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/parser/struct.FunctionAST.html\" title=\"struct llvm_kaleidoscope_rs::parser::FunctionAST\">FunctionAST</a>","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::FunctionAST"]},{"text":"impl<I> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/parser/struct.Parser.html\" title=\"struct llvm_kaleidoscope_rs::parser::Parser\">Parser</a><I> <span class=\"where fmt-newline\">where<br> I: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a>, </span>","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::Parser"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/struct.SmallCStr.html\" title=\"struct llvm_kaleidoscope_rs::SmallCStr\">SmallCStr</a>","synthetic":true,"types":["llvm_kaleidoscope_rs::SmallCStr"]},{"text":"impl<A, B> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"enum\" href=\"llvm_kaleidoscope_rs/enum.Either.html\" title=\"enum llvm_kaleidoscope_rs::Either\">Either</a><A, B> <span class=\"where fmt-newline\">where<br> A: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a>,<br> B: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a>, </span>","synthetic":true,"types":["llvm_kaleidoscope_rs::Either"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
\ No newline at end of file diff --git a/implementors/core/marker/trait.Unpin.js b/implementors/core/marker/trait.Unpin.js new file mode 100644 index 0000000..216ddc5 --- /dev/null +++ b/implementors/core/marker/trait.Unpin.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["llvm_kaleidoscope_rs"] = [{"text":"impl<'llvm, 'a> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/codegen/struct.Codegen.html\" title=\"struct llvm_kaleidoscope_rs::codegen::Codegen\">Codegen</a><'llvm, 'a> <span class=\"where fmt-newline\">where<br> 'llvm: 'a, </span>","synthetic":true,"types":["llvm_kaleidoscope_rs::codegen::Codegen"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"enum\" href=\"llvm_kaleidoscope_rs/lexer/enum.Token.html\" title=\"enum llvm_kaleidoscope_rs::lexer::Token\">Token</a>","synthetic":true,"types":["llvm_kaleidoscope_rs::lexer::Token"]},{"text":"impl<I> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/lexer/struct.Lexer.html\" title=\"struct llvm_kaleidoscope_rs::lexer::Lexer\">Lexer</a><I> <span class=\"where fmt-newline\">where<br> I: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a>, </span>","synthetic":true,"types":["llvm_kaleidoscope_rs::lexer::Lexer"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/llvm/struct.Module.html\" title=\"struct llvm_kaleidoscope_rs::llvm::Module\">Module</a>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::Module"]},{"text":"impl<'llvm> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/llvm/struct.Builder.html\" title=\"struct llvm_kaleidoscope_rs::llvm::Builder\">Builder</a><'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::Builder"]},{"text":"impl<'llvm> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/llvm/struct.BasicBlock.html\" title=\"struct llvm_kaleidoscope_rs::llvm::BasicBlock\">BasicBlock</a><'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::BasicBlock"]},{"text":"impl<'llvm> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/llvm/struct.Type.html\" title=\"struct llvm_kaleidoscope_rs::llvm::Type\">Type</a><'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::Type"]},{"text":"impl<'llvm> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/llvm/struct.Value.html\" title=\"struct llvm_kaleidoscope_rs::llvm::Value\">Value</a><'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::Value"]},{"text":"impl<'llvm> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/llvm/struct.FnValue.html\" title=\"struct llvm_kaleidoscope_rs::llvm::FnValue\">FnValue</a><'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::FnValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"enum\" href=\"llvm_kaleidoscope_rs/parser/enum.ExprAST.html\" title=\"enum llvm_kaleidoscope_rs::parser::ExprAST\">ExprAST</a>","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::ExprAST"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/parser/struct.PrototypeAST.html\" title=\"struct llvm_kaleidoscope_rs::parser::PrototypeAST\">PrototypeAST</a>","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::PrototypeAST"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/parser/struct.FunctionAST.html\" title=\"struct llvm_kaleidoscope_rs::parser::FunctionAST\">FunctionAST</a>","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::FunctionAST"]},{"text":"impl<I> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/parser/struct.Parser.html\" title=\"struct llvm_kaleidoscope_rs::parser::Parser\">Parser</a><I> <span class=\"where fmt-newline\">where<br> I: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a>, </span>","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::Parser"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/struct.SmallCStr.html\" title=\"struct llvm_kaleidoscope_rs::SmallCStr\">SmallCStr</a>","synthetic":true,"types":["llvm_kaleidoscope_rs::SmallCStr"]},{"text":"impl<A, B> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"enum\" href=\"llvm_kaleidoscope_rs/enum.Either.html\" title=\"enum llvm_kaleidoscope_rs::Either\">Either</a><A, B> <span class=\"where fmt-newline\">where<br> A: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a>,<br> B: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a>, </span>","synthetic":true,"types":["llvm_kaleidoscope_rs::Either"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
\ No newline at end of file diff --git a/implementors/core/ops/deref/trait.Deref.js b/implementors/core/ops/deref/trait.Deref.js new file mode 100644 index 0000000..c17e51f --- /dev/null +++ b/implementors/core/ops/deref/trait.Deref.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["llvm_kaleidoscope_rs"] = [{"text":"impl<'llvm> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/ops/deref/trait.Deref.html\" title=\"trait core::ops::deref::Deref\">Deref</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/llvm/struct.FnValue.html\" title=\"struct llvm_kaleidoscope_rs::llvm::FnValue\">FnValue</a><'llvm>","synthetic":false,"types":["llvm_kaleidoscope_rs::llvm::FnValue"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
\ No newline at end of file diff --git a/implementors/core/ops/drop/trait.Drop.js b/implementors/core/ops/drop/trait.Drop.js new file mode 100644 index 0000000..f2e3e5a --- /dev/null +++ b/implementors/core/ops/drop/trait.Drop.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["llvm_kaleidoscope_rs"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/ops/drop/trait.Drop.html\" title=\"trait core::ops::drop::Drop\">Drop</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/llvm/struct.Module.html\" title=\"struct llvm_kaleidoscope_rs::llvm::Module\">Module</a>","synthetic":false,"types":["llvm_kaleidoscope_rs::llvm::Module"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/ops/drop/trait.Drop.html\" title=\"trait core::ops::drop::Drop\">Drop</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/llvm/struct.Builder.html\" title=\"struct llvm_kaleidoscope_rs::llvm::Builder\">Builder</a><'_>","synthetic":false,"types":["llvm_kaleidoscope_rs::llvm::Builder"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
\ No newline at end of file diff --git a/implementors/std/panic/trait.RefUnwindSafe.js b/implementors/std/panic/trait.RefUnwindSafe.js new file mode 100644 index 0000000..efd22f6 --- /dev/null +++ b/implementors/std/panic/trait.RefUnwindSafe.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["llvm_kaleidoscope_rs"] = [{"text":"impl<'llvm, 'a> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html\" title=\"trait std::panic::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/codegen/struct.Codegen.html\" title=\"struct llvm_kaleidoscope_rs::codegen::Codegen\">Codegen</a><'llvm, 'a>","synthetic":true,"types":["llvm_kaleidoscope_rs::codegen::Codegen"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html\" title=\"trait std::panic::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"enum\" href=\"llvm_kaleidoscope_rs/lexer/enum.Token.html\" title=\"enum llvm_kaleidoscope_rs::lexer::Token\">Token</a>","synthetic":true,"types":["llvm_kaleidoscope_rs::lexer::Token"]},{"text":"impl<I> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html\" title=\"trait std::panic::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/lexer/struct.Lexer.html\" title=\"struct llvm_kaleidoscope_rs::lexer::Lexer\">Lexer</a><I> <span class=\"where fmt-newline\">where<br> I: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html\" title=\"trait std::panic::RefUnwindSafe\">RefUnwindSafe</a>, </span>","synthetic":true,"types":["llvm_kaleidoscope_rs::lexer::Lexer"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html\" title=\"trait std::panic::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/llvm/struct.Module.html\" title=\"struct llvm_kaleidoscope_rs::llvm::Module\">Module</a>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::Module"]},{"text":"impl<'llvm> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html\" title=\"trait std::panic::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/llvm/struct.Builder.html\" title=\"struct llvm_kaleidoscope_rs::llvm::Builder\">Builder</a><'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::Builder"]},{"text":"impl<'llvm> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html\" title=\"trait std::panic::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/llvm/struct.BasicBlock.html\" title=\"struct llvm_kaleidoscope_rs::llvm::BasicBlock\">BasicBlock</a><'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::BasicBlock"]},{"text":"impl<'llvm> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html\" title=\"trait std::panic::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/llvm/struct.Type.html\" title=\"struct llvm_kaleidoscope_rs::llvm::Type\">Type</a><'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::Type"]},{"text":"impl<'llvm> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html\" title=\"trait std::panic::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/llvm/struct.Value.html\" title=\"struct llvm_kaleidoscope_rs::llvm::Value\">Value</a><'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::Value"]},{"text":"impl<'llvm> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html\" title=\"trait std::panic::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/llvm/struct.FnValue.html\" title=\"struct llvm_kaleidoscope_rs::llvm::FnValue\">FnValue</a><'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::FnValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html\" title=\"trait std::panic::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"enum\" href=\"llvm_kaleidoscope_rs/parser/enum.ExprAST.html\" title=\"enum llvm_kaleidoscope_rs::parser::ExprAST\">ExprAST</a>","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::ExprAST"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html\" title=\"trait std::panic::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/parser/struct.PrototypeAST.html\" title=\"struct llvm_kaleidoscope_rs::parser::PrototypeAST\">PrototypeAST</a>","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::PrototypeAST"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html\" title=\"trait std::panic::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/parser/struct.FunctionAST.html\" title=\"struct llvm_kaleidoscope_rs::parser::FunctionAST\">FunctionAST</a>","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::FunctionAST"]},{"text":"impl<I> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html\" title=\"trait std::panic::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/parser/struct.Parser.html\" title=\"struct llvm_kaleidoscope_rs::parser::Parser\">Parser</a><I> <span class=\"where fmt-newline\">where<br> I: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html\" title=\"trait std::panic::RefUnwindSafe\">RefUnwindSafe</a>, </span>","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::Parser"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html\" title=\"trait std::panic::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/struct.SmallCStr.html\" title=\"struct llvm_kaleidoscope_rs::SmallCStr\">SmallCStr</a>","synthetic":true,"types":["llvm_kaleidoscope_rs::SmallCStr"]},{"text":"impl<A, B> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html\" title=\"trait std::panic::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"enum\" href=\"llvm_kaleidoscope_rs/enum.Either.html\" title=\"enum llvm_kaleidoscope_rs::Either\">Either</a><A, B> <span class=\"where fmt-newline\">where<br> A: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html\" title=\"trait std::panic::RefUnwindSafe\">RefUnwindSafe</a>,<br> B: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html\" title=\"trait std::panic::RefUnwindSafe\">RefUnwindSafe</a>, </span>","synthetic":true,"types":["llvm_kaleidoscope_rs::Either"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
\ No newline at end of file diff --git a/implementors/std/panic/trait.UnwindSafe.js b/implementors/std/panic/trait.UnwindSafe.js new file mode 100644 index 0000000..2faa942 --- /dev/null +++ b/implementors/std/panic/trait.UnwindSafe.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["llvm_kaleidoscope_rs"] = [{"text":"impl<'llvm, 'a> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html\" title=\"trait std::panic::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/codegen/struct.Codegen.html\" title=\"struct llvm_kaleidoscope_rs::codegen::Codegen\">Codegen</a><'llvm, 'a>","synthetic":true,"types":["llvm_kaleidoscope_rs::codegen::Codegen"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html\" title=\"trait std::panic::UnwindSafe\">UnwindSafe</a> for <a class=\"enum\" href=\"llvm_kaleidoscope_rs/lexer/enum.Token.html\" title=\"enum llvm_kaleidoscope_rs::lexer::Token\">Token</a>","synthetic":true,"types":["llvm_kaleidoscope_rs::lexer::Token"]},{"text":"impl<I> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html\" title=\"trait std::panic::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/lexer/struct.Lexer.html\" title=\"struct llvm_kaleidoscope_rs::lexer::Lexer\">Lexer</a><I> <span class=\"where fmt-newline\">where<br> I: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html\" title=\"trait std::panic::UnwindSafe\">UnwindSafe</a>, </span>","synthetic":true,"types":["llvm_kaleidoscope_rs::lexer::Lexer"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html\" title=\"trait std::panic::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/llvm/struct.Module.html\" title=\"struct llvm_kaleidoscope_rs::llvm::Module\">Module</a>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::Module"]},{"text":"impl<'llvm> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html\" title=\"trait std::panic::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/llvm/struct.Builder.html\" title=\"struct llvm_kaleidoscope_rs::llvm::Builder\">Builder</a><'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::Builder"]},{"text":"impl<'llvm> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html\" title=\"trait std::panic::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/llvm/struct.BasicBlock.html\" title=\"struct llvm_kaleidoscope_rs::llvm::BasicBlock\">BasicBlock</a><'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::BasicBlock"]},{"text":"impl<'llvm> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html\" title=\"trait std::panic::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/llvm/struct.Type.html\" title=\"struct llvm_kaleidoscope_rs::llvm::Type\">Type</a><'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::Type"]},{"text":"impl<'llvm> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html\" title=\"trait std::panic::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/llvm/struct.Value.html\" title=\"struct llvm_kaleidoscope_rs::llvm::Value\">Value</a><'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::Value"]},{"text":"impl<'llvm> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html\" title=\"trait std::panic::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/llvm/struct.FnValue.html\" title=\"struct llvm_kaleidoscope_rs::llvm::FnValue\">FnValue</a><'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::FnValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html\" title=\"trait std::panic::UnwindSafe\">UnwindSafe</a> for <a class=\"enum\" href=\"llvm_kaleidoscope_rs/parser/enum.ExprAST.html\" title=\"enum llvm_kaleidoscope_rs::parser::ExprAST\">ExprAST</a>","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::ExprAST"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html\" title=\"trait std::panic::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/parser/struct.PrototypeAST.html\" title=\"struct llvm_kaleidoscope_rs::parser::PrototypeAST\">PrototypeAST</a>","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::PrototypeAST"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html\" title=\"trait std::panic::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/parser/struct.FunctionAST.html\" title=\"struct llvm_kaleidoscope_rs::parser::FunctionAST\">FunctionAST</a>","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::FunctionAST"]},{"text":"impl<I> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html\" title=\"trait std::panic::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/parser/struct.Parser.html\" title=\"struct llvm_kaleidoscope_rs::parser::Parser\">Parser</a><I> <span class=\"where fmt-newline\">where<br> I: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html\" title=\"trait std::panic::UnwindSafe\">UnwindSafe</a>, </span>","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::Parser"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html\" title=\"trait std::panic::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"llvm_kaleidoscope_rs/struct.SmallCStr.html\" title=\"struct llvm_kaleidoscope_rs::SmallCStr\">SmallCStr</a>","synthetic":true,"types":["llvm_kaleidoscope_rs::SmallCStr"]},{"text":"impl<A, B> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html\" title=\"trait std::panic::UnwindSafe\">UnwindSafe</a> for <a class=\"enum\" href=\"llvm_kaleidoscope_rs/enum.Either.html\" title=\"enum llvm_kaleidoscope_rs::Either\">Either</a><A, B> <span class=\"where fmt-newline\">where<br> A: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html\" title=\"trait std::panic::UnwindSafe\">UnwindSafe</a>,<br> B: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html\" title=\"trait std::panic::UnwindSafe\">UnwindSafe</a>, </span>","synthetic":true,"types":["llvm_kaleidoscope_rs::Either"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
\ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..d8be2cc --- /dev/null +++ b/index.html @@ -0,0 +1 @@ +<meta http-equiv="Refresh" content="0; url='llvm_kaleidoscope_rs/index.html'"/> diff --git a/light.css b/light.css new file mode 100644 index 0000000..a5aa6d0 --- /dev/null +++ b/light.css @@ -0,0 +1 @@ + body{background-color:white;color:black;}h1,h2,h3,h4{color:black;}h1.fqn{border-bottom-color:#D5D5D5;}h2,h3,h4{border-bottom-color:#DDDDDD;}.in-band{background-color:white;}.invisible{background:rgba(0,0,0,0);}.docblock code,.docblock-short code{background-color:#F5F5F5;}pre,.rustdoc.source .example-wrap{background-color:#F5F5F5;}.sidebar{background-color:#F1F1F1;}*{scrollbar-color:rgba(36,37,39,0.6) #e6e6e6;}.sidebar{scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;}.logo-container.rust-logo>img{}::-webkit-scrollbar-track{background-color:#ecebeb;}::-webkit-scrollbar-thumb{background-color:rgba(36,37,39,0.6);}.sidebar::-webkit-scrollbar-track{background-color:#dcdcdc;}.sidebar::-webkit-scrollbar-thumb{background-color:rgba(36,37,39,0.6);}.sidebar .current{background-color:#fff;}.source .sidebar{background-color:#fff;}.sidebar .location{border-color:#000;background-color:#fff;color:#333;}.sidebar .version{border-bottom-color:#DDD;}.sidebar-title{border-top-color:#777;border-bottom-color:#777;}.block a:hover{background:#F5F5F5;}.line-numbers span{color:#c67e2d;}.line-numbers .line-highlighted{background-color:#f6fdb0 !important;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom-color:#ddd;}.docblock table,.docblock table td,.docblock table th{border-color:#ddd;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#4E4C4C;}.search-results a:hover{background-color:#ddd;}.search-results a:focus{color:#000 !important;background-color:#ccc;}.search-results a:focus span{color:#000 !important;}a.result-trait:focus{background-color:#c7b6ff;}a.result-traitalias:focus{background-color:#c7b6ff;}a.result-mod:focus,a.result-externcrate:focus{background-color:#afc6e4;}a.result-enum:focus{background-color:#b4d1b9;}a.result-struct:focus{background-color:#e7b1a0;}a.result-union:focus{background-color:#b7bd49;}a.result-fn:focus,a.result-method:focus,a.result-tymethod:focus{background-color:#c6afb3;}a.result-type:focus{background-color:#ffc891;}a.result-foreigntype:focus{background-color:#f5c4ff;}a.result-attr:focus,a.result-derive:focus,a.result-macro:focus{background-color:#8ce488;}a.result-constant:focus,a.result-static:focus{background-color:#c3e0ff;}a.result-primitive:focus{background-color:#9aecff;}a.result-keyword:focus{background-color:#f99650;}.content .item-info::before{color:#ccc;}.content span.enum,.content a.enum,.block a.current.enum{color:#508157;}.content span.struct,.content a.struct,.block a.current.struct{color:#ad448e;}.content span.type,.content a.type,.block a.current.type{color:#ba5d00;}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{color:#cd00e2;}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{color:#068000;}.content span.union,.content a.union,.block a.current.union{color:#767b27;}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{color:#546e8a;}.content span.primitive,.content a.primitive,.block a.current.primitive{color:#2c8093;}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{color:#4d76ae;}.content span.trait,.content a.trait,.block a.current.trait{color:#7c5af3;}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{color:#6841f1;}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{color:#9a6e31;}.content span.keyword,.content a.keyword,.block a.current.keyword{color:#de5249;}pre.rust .comment{color:#8E908C;}pre.rust .doccomment{color:#4D4D4C;}nav:not(.sidebar){border-bottom-color:#e0e0e0;}nav.main .current{border-top-color:#000;border-bottom-color:#000;}nav.main .separator{border:1px solid #000;}a{color:#000;}.docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),.docblock-short a:not(.srclink):not(.test-arrow),.item-info a,#help a{color:#3873AD;}a.test-arrow{color:#f5f5f5;}details.rustdoc-toggle>summary.hideme>span,details.rustdoc-toggle>summary::before,details.undocumented>summary::before{color:#999;}#crate-search{color:#555;background-color:white;border-color:#e0e0e0;box-shadow:0 0 0 1px #e0e0e0,0 0 0 2px transparent;}.search-input{color:#555;background-color:white;box-shadow:0 0 0 1px #e0e0e0,0 0 0 2px transparent;}.search-input:focus{border-color:#66afe9;}.search-input:disabled{background-color:#e6e6e6;}#crate-search+.search-input:focus{box-shadow:0 0 8px #078dd8;}.module-item .stab,.import-item .stab{color:#000;}.stab.unstable{background:#FFF5D6;border-color:#FFC600;}.stab.deprecated{background:#ffc4c4;border-color:#db7b7b;}.stab.portability{background:#F3DFFF;border-color:#b07bdb;}.stab.portability>code{background:none;}#help>div{background:#e9e9e9;border-color:#bfbfbf;}#help>div>span{border-bottom-color:#bfbfbf;}.since{color:grey;}tr.result span.primitive::after,tr.result span.keyword::after{color:black;}.line-numbers :target{background-color:transparent;}pre.rust .kw{color:#8959A8;}pre.rust .kw-2,pre.rust .prelude-ty{color:#4271AE;}pre.rust .number,pre.rust .string{color:#718C00;}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{color:#C82829;}pre.rust .macro,pre.rust .macro-nonterminal{color:#3E999F;}pre.rust .lifetime{color:#B76514;}pre.rust .question-mark{color:#ff9011;}.example-wrap>pre.line-number{border-color:#c7c7c7;}a.test-arrow{background-color:rgba(78,139,202,0.2);}a.test-arrow:hover{background-color:#4e8bca;}.toggle-label,.code-attribute{color:#999;}:target,:target>*{background:#FDFFD3;}pre.compile_fail{border-left:2px solid rgba(255,0,0,.5);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.5);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.5);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.5);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#0089ff;}.tooltip::after{background-color:#000;color:#fff;}.tooltip::before{border-color:transparent black transparent transparent;}.notable-traits-tooltiptext{background-color:#eee;border-color:#999;}.notable-traits-tooltiptext .notable{border-bottom-color:#DDDDDD;}#titles>button:not(.selected){background-color:#e6e6e6;border-top-color:#e6e6e6;}#titles>button:hover,#titles>button.selected{background-color:#ffffff;border-top-color:#0089ff;}#titles>button>div.count{color:#888;}@media (max-width:700px){.sidebar-menu{background-color:#F1F1F1;border-bottom-color:#e0e0e0;border-right-color:#e0e0e0;}.sidebar-elems{background-color:#F1F1F1;border-right-color:#000;}#sidebar-filler{background-color:#F1F1F1;border-bottom-color:#e0e0e0;}}kbd{color:#000;background-color:#fafbfc;border-color:#d1d5da;border-bottom-color:#c6cbd1;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu,#help-button{border-color:#e0e0e0;background-color:#fff;}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,#help-button:hover,#help-button:focus{border-color:#717171;}#copy-path{color:#999;}#copy-path>img{filter:invert(50%);}#copy-path:hover>img{filter:invert(35%);}#theme-choices{border-color:#ccc;background-color:#fff;}#theme-choices>button:not(:first-child){border-top-color:#e0e0e0;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:#eee;}@media (max-width:700px){#theme-picker{background:#fff;}}#all-types{background-color:#fff;}#all-types:hover{background-color:#f9f9f9;}.search-results .result-name span.alias{color:#000;}.search-results .result-name span.grey{color:#999;}#sidebar-toggle{background-color:#F1F1F1;}#sidebar-toggle:hover{background-color:#E0E0E0;}#source-sidebar{background-color:#F1F1F1;}#source-sidebar>.title{border-bottom-color:#ccc;}div.files>a:hover,div.name:hover{background-color:#E0E0E0;}div.files>.selected{background-color:#fff;}.setting-line>.title{border-bottom-color:#D5D5D5;}
\ No newline at end of file diff --git a/llvm_kaleidoscope_rs/all.html b/llvm_kaleidoscope_rs/all.html new file mode 100644 index 0000000..722e4e9 --- /dev/null +++ b/llvm_kaleidoscope_rs/all.html @@ -0,0 +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="List of all items in this crate"><meta name="keywords" content="rust, rustlang, rust-lang"><title>List of all items in this crate</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><script src="../crates.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg"> +<link rel="alternate icon" type="image/png" href="../favicon-16x16.png"> +<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../llvm_kaleidoscope_rs/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><h2 class="location">Crate llvm_kaleidoscope_rs</h2><div class="block version"><p>Version 0.1.0</p></div><a id="all-types" href="index.html"><p>Back to index</p></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../settings.html" title="settings"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">List of all items</span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span> + </span> + </h1><h3 id="Structs">Structs</h3><ul class="structs docblock"><li><a href="struct.SmallCStr.html">SmallCStr</a></li><li><a href="codegen/struct.Codegen.html">codegen::Codegen</a></li><li><a href="lexer/struct.Lexer.html">lexer::Lexer</a></li><li><a href="llvm/struct.BasicBlock.html">llvm::BasicBlock</a></li><li><a href="llvm/struct.Builder.html">llvm::Builder</a></li><li><a href="llvm/struct.FnValue.html">llvm::FnValue</a></li><li><a href="llvm/struct.Module.html">llvm::Module</a></li><li><a href="llvm/struct.Type.html">llvm::Type</a></li><li><a href="llvm/struct.Value.html">llvm::Value</a></li><li><a href="parser/struct.FunctionAST.html">parser::FunctionAST</a></li><li><a href="parser/struct.Parser.html">parser::Parser</a></li><li><a href="parser/struct.PrototypeAST.html">parser::PrototypeAST</a></li></ul><h3 id="Enums">Enums</h3><ul class="enums docblock"><li><a href="enum.Either.html">Either</a></li><li><a href="lexer/enum.Token.html">lexer::Token</a></li><li><a href="parser/enum.ExprAST.html">parser::ExprAST</a></li></ul><h3 id="Constants">Constants</h3><ul class="constants docblock"><li><a href="constant.SMALL_STR_SIZE.html">SMALL_STR_SIZE</a></li></ul></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="llvm_kaleidoscope_rs" data-search-index-js="../search-index.js" data-search-js="../search.js"></div><script src="../main.js"></script></body></html>
\ No newline at end of file diff --git a/llvm_kaleidoscope_rs/codegen/index.html b/llvm_kaleidoscope_rs/codegen/index.html new file mode 100644 index 0000000..3646e69 --- /dev/null +++ b/llvm_kaleidoscope_rs/codegen/index.html @@ -0,0 +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 `codegen` mod in crate `llvm_kaleidoscope_rs`."><meta name="keywords" content="rust, rustlang, rust-lang, codegen"><title>llvm_kaleidoscope_rs::codegen - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg"> +<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"> +<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../llvm_kaleidoscope_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module codegen</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><div id="sidebar-vars" data-name="codegen" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">llvm_kaleidoscope_rs</a>::<wbr><a class="mod" href="#">codegen</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/llvm_kaleidoscope_rs/codegen.rs.html#1-135" title="goto source code">[src]</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2> +<table><tr class="module-item"><td><a class="struct" href="struct.Codegen.html" title="llvm_kaleidoscope_rs::codegen::Codegen struct">Codegen</a></td><td class="docblock-short"><p>Code generator from kaleidoscope AST to LLVM IR.</p> +</td></tr></table></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="llvm_kaleidoscope_rs" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script></body></html>
\ No newline at end of file diff --git a/llvm_kaleidoscope_rs/codegen/sidebar-items.js b/llvm_kaleidoscope_rs/codegen/sidebar-items.js new file mode 100644 index 0000000..c4119ea --- /dev/null +++ b/llvm_kaleidoscope_rs/codegen/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["Codegen","Code generator from kaleidoscope AST to LLVM IR."]]});
\ No newline at end of file diff --git a/llvm_kaleidoscope_rs/codegen/struct.Codegen.html b/llvm_kaleidoscope_rs/codegen/struct.Codegen.html new file mode 100644 index 0000000..d31396a --- /dev/null +++ b/llvm_kaleidoscope_rs/codegen/struct.Codegen.html @@ -0,0 +1,14 @@ +<!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="Code generator from kaleidoscope AST to LLVM IR."><meta name="keywords" content="rust, rustlang, rust-lang, Codegen"><title>Codegen in llvm_kaleidoscope_rs::codegen - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg"> +<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"> +<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../llvm_kaleidoscope_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct Codegen</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.compile">compile</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">!Send</a><a href="#impl-Sync">!Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a></div></div><h2 class="location">Other items in<br><a href="../index.html">llvm_kaleidoscope_rs</a>::<wbr><a href="index.html">codegen</a></h2><div id="sidebar-vars" data-name="Codegen" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">llvm_kaleidoscope_rs</a>::<wbr><a href="index.html">codegen</a>::<wbr><a class="struct" href="#">Codegen</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/llvm_kaleidoscope_rs/codegen.rs.html#10-13" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust struct">pub struct Codegen<'llvm, 'a> { /* fields omitted */ }</pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Code generator from kaleidoscope AST to LLVM IR.</p> +</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><h3 class="code-header in-band">impl<'llvm, 'a> <a class="struct" href="struct.Codegen.html" title="struct llvm_kaleidoscope_rs::codegen::Codegen">Codegen</a><'llvm, 'a></h3><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/codegen.rs.html#15-135" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.compile" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.compile" class="fnname">compile</a>(<br> module: &'llvm <a class="struct" href="../llvm/struct.Module.html" title="struct llvm_kaleidoscope_rs::llvm::Module">Module</a>, <br> compilee: <a class="enum" href="../enum.Either.html" title="enum llvm_kaleidoscope_rs::Either">Either</a><&<a class="struct" href="../parser/struct.PrototypeAST.html" title="struct llvm_kaleidoscope_rs::parser::PrototypeAST">PrototypeAST</a>, &<a class="struct" href="../parser/struct.FunctionAST.html" title="struct llvm_kaleidoscope_rs::parser::FunctionAST">FunctionAST</a>><br>) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="../llvm/struct.FnValue.html" title="struct llvm_kaleidoscope_rs::llvm::FnValue">FnValue</a><'llvm>, <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>></h4><a href="#method.compile" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/codegen.rs.html#17-31" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Compile either a <a href="../parser/struct.PrototypeAST.html" title="PrototypeAST"><code>PrototypeAST</code></a> or a <a href="../parser/struct.FunctionAST.html" title="FunctionAST"><code>FunctionAST</code></a> into the LLVM <code>module</code>.</p> +</div></details></div></details><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><div id="impl-RefUnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl<'llvm, 'a> <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Codegen.html" title="struct llvm_kaleidoscope_rs::codegen::Codegen">Codegen</a><'llvm, 'a></h3><a href="#impl-RefUnwindSafe" class="anchor"></a></div><div id="impl-Send" class="impl has-srclink"><h3 class="code-header in-band">impl<'llvm, 'a> !<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Codegen.html" title="struct llvm_kaleidoscope_rs::codegen::Codegen">Codegen</a><'llvm, 'a></h3><a href="#impl-Send" class="anchor"></a></div><div id="impl-Sync" class="impl has-srclink"><h3 class="code-header in-band">impl<'llvm, 'a> !<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Codegen.html" title="struct llvm_kaleidoscope_rs::codegen::Codegen">Codegen</a><'llvm, 'a></h3><a href="#impl-Sync" class="anchor"></a></div><div id="impl-Unpin" class="impl has-srclink"><h3 class="code-header in-band">impl<'llvm, 'a> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Codegen.html" title="struct llvm_kaleidoscope_rs::codegen::Codegen">Codegen</a><'llvm, 'a> <span class="where fmt-newline">where<br> 'llvm: 'a, </span></h3><a href="#impl-Unpin" class="anchor"></a></div><div id="impl-UnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl<'llvm, 'a> <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Codegen.html" title="struct llvm_kaleidoscope_rs::codegen::Codegen">Codegen</a><'llvm, 'a></h3><a href="#impl-UnwindSafe" class="anchor"></a></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Any" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/any.rs.html#131-135" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_id" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.54.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4><a href="#method.type_id" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/any.rs.html#132" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Borrow%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#208-213" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&</a>T</h4><a href="#method.borrow" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#210" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-BorrowMut%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#216-220" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow_mut" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&mut </a>T</h4><a href="#method.borrow_mut" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#217" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-From%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#544-548" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.from" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</h4><a href="#method.from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#545" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Into%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></h3><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#533-540" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.into" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</h4><a href="#method.into" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#537" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-TryFrom%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></h3><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#581-590" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Error" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4><a href="#associatedtype.Error" class="anchor"></a></div></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_from" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4><a href="#method.try_from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#587" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-TryInto%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></h3><a href="#impl-TryInto%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#567-576" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Error-1" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html#associatedtype.Error" class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4><a href="#associatedtype.Error-1" class="anchor"></a></div></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_into" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4><a href="#method.try_into" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#573" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="llvm_kaleidoscope_rs" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script></body></html>
\ No newline at end of file diff --git a/llvm_kaleidoscope_rs/constant.SMALL_STR_SIZE.html b/llvm_kaleidoscope_rs/constant.SMALL_STR_SIZE.html new file mode 100644 index 0000000..d1b75ce --- /dev/null +++ b/llvm_kaleidoscope_rs/constant.SMALL_STR_SIZE.html @@ -0,0 +1,4 @@ +<!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="Fixed size of [`SmallCStr`] including the trailing `\0` byte."><meta name="keywords" content="rust, rustlang, rust-lang, SMALL_STR_SIZE"><title>SMALL_STR_SIZE in llvm_kaleidoscope_rs - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><script src="../crates.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg"> +<link rel="alternate icon" type="image/png" href="../favicon-16x16.png"> +<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../llvm_kaleidoscope_rs/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="index.html">llvm_kaleidoscope_rs</a></h2><div id="sidebar-vars" data-name="SMALL_STR_SIZE" data-ty="constant" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../settings.html" title="settings"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Constant <a href="index.html">llvm_kaleidoscope_rs</a>::<wbr><a class="constant" href="#">SMALL_STR_SIZE</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/llvm_kaleidoscope_rs/lib.rs.html#9" title="goto source code">[src]</a></span></h1><pre class="rust const">pub const SMALL_STR_SIZE: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.usize.html">usize</a> = 16;</pre><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Fixed size of <a href="struct.SmallCStr.html" title="SmallCStr"><code>SmallCStr</code></a> including the trailing <code>\0</code> byte.</p> +</div></details></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="llvm_kaleidoscope_rs" data-search-index-js="../search-index.js" data-search-js="../search.js"></div><script src="../main.js"></script></body></html>
\ No newline at end of file diff --git a/llvm_kaleidoscope_rs/enum.Either.html b/llvm_kaleidoscope_rs/enum.Either.html new file mode 100644 index 0000000..bfb9c76 --- /dev/null +++ b/llvm_kaleidoscope_rs/enum.Either.html @@ -0,0 +1,18 @@ +<!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="Either type, for APIs accepting two types."><meta name="keywords" content="rust, rustlang, rust-lang, Either"><title>Either in llvm_kaleidoscope_rs - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><script src="../crates.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg"> +<link rel="alternate icon" type="image/png" href="../favicon-16x16.png"> +<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc enum"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../llvm_kaleidoscope_rs/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><h2 class="location">Enum Either</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#variants">Variants</a></h3><div class="sidebar-links"><a href="#variant.A">A</a><a href="#variant.B">B</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a></div></div><h2 class="location">Other items in<br><a href="index.html">llvm_kaleidoscope_rs</a></h2><div id="sidebar-vars" data-name="Either" data-ty="enum" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../settings.html" title="settings"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Enum <a href="index.html">llvm_kaleidoscope_rs</a>::<wbr><a class="enum" href="#">Either</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/llvm_kaleidoscope_rs/lib.rs.html#49-52" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust enum">pub enum Either<A, B> { + A(A), + B(B), +}</pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Either type, for APIs accepting two types.</p> +</div></details><h2 id="variants" class="variants small-section-header"> + Variants<a href="#variants" class="anchor"></a></h2> +<div id="variant.A" class="variant small-section-header"><a href="#variant.A" class="anchor field"></a><code>A(A)</code></div><div id="variant.B" class="variant small-section-header"><a href="#variant.B" class="anchor field"></a><code>B(B)</code></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><div id="impl-RefUnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl<A, B> <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="enum.Either.html" title="enum llvm_kaleidoscope_rs::Either">Either</a><A, B> <span class="where fmt-newline">where<br> A: <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a>,<br> B: <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a>, </span></h3><a href="#impl-RefUnwindSafe" class="anchor"></a></div><div id="impl-Send" class="impl has-srclink"><h3 class="code-header in-band">impl<A, B> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="enum.Either.html" title="enum llvm_kaleidoscope_rs::Either">Either</a><A, B> <span class="where fmt-newline">where<br> A: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,<br> B: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>, </span></h3><a href="#impl-Send" class="anchor"></a></div><div id="impl-Sync" class="impl has-srclink"><h3 class="code-header in-band">impl<A, B> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="enum.Either.html" title="enum llvm_kaleidoscope_rs::Either">Either</a><A, B> <span class="where fmt-newline">where<br> A: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,<br> B: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>, </span></h3><a href="#impl-Sync" class="anchor"></a></div><div id="impl-Unpin" class="impl has-srclink"><h3 class="code-header in-band">impl<A, B> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="enum.Either.html" title="enum llvm_kaleidoscope_rs::Either">Either</a><A, B> <span class="where fmt-newline">where<br> A: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,<br> B: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>, </span></h3><a href="#impl-Unpin" class="anchor"></a></div><div id="impl-UnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl<A, B> <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="enum" href="enum.Either.html" title="enum llvm_kaleidoscope_rs::Either">Either</a><A, B> <span class="where fmt-newline">where<br> A: <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a>,<br> B: <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a>, </span></h3><a href="#impl-UnwindSafe" class="anchor"></a></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Any" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/any.rs.html#131-135" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_id" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.54.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4><a href="#method.type_id" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/any.rs.html#132" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Borrow%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#208-213" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&</a>T</h4><a href="#method.borrow" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#210" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-BorrowMut%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#216-220" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow_mut" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&mut </a>T</h4><a href="#method.borrow_mut" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#217" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-From%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#544-548" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.from" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</h4><a href="#method.from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#545" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Into%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></h3><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#533-540" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.into" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</h4><a href="#method.into" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#537" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-TryFrom%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></h3><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#581-590" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Error" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4><a href="#associatedtype.Error" class="anchor"></a></div></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_from" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4><a href="#method.try_from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#587" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-TryInto%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></h3><a href="#impl-TryInto%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#567-576" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Error-1" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html#associatedtype.Error" class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4><a href="#associatedtype.Error-1" class="anchor"></a></div></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_into" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4><a href="#method.try_into" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#573" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="llvm_kaleidoscope_rs" data-search-index-js="../search-index.js" data-search-js="../search.js"></div><script src="../main.js"></script></body></html>
\ No newline at end of file diff --git a/llvm_kaleidoscope_rs/index.html b/llvm_kaleidoscope_rs/index.html new file mode 100644 index 0000000..968b8bf --- /dev/null +++ b/llvm_kaleidoscope_rs/index.html @@ -0,0 +1,11 @@ +<!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 `llvm_kaleidoscope_rs` crate."><meta name="keywords" content="rust, rustlang, rust-lang, llvm_kaleidoscope_rs"><title>llvm_kaleidoscope_rs - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><script src="../crates.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg"> +<link rel="alternate icon" type="image/png" href="../favicon-16x16.png"> +<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></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="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../llvm_kaleidoscope_rs/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><h2 class="location">Crate llvm_kaleidoscope_rs</h2><div class="block version"><p>Version 0.1.0</p></div><div class="sidebar-elems"><a id="all-types" href="all.html"><p>See all llvm_kaleidoscope_rs's items</p></a><div class="block items"><ul><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#constants">Constants</a></li></ul></div><div id="sidebar-vars" data-name="llvm_kaleidoscope_rs" data-ty="mod" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../settings.html" title="settings"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Crate <a class="mod" href="#">llvm_kaleidoscope_rs</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/llvm_kaleidoscope_rs/lib.rs.html#1-109" title="goto source code">[src]</a></span></h1><h2 id="modules" class="section-header"><a href="#modules">Modules</a></h2> +<table><tr class="module-item"><td><a class="mod" href="codegen/index.html" title="llvm_kaleidoscope_rs::codegen mod">codegen</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="lexer/index.html" title="llvm_kaleidoscope_rs::lexer mod">lexer</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="llvm/index.html" title="llvm_kaleidoscope_rs::llvm mod">llvm</a></td><td class="docblock-short"><p>Safe wrapper around the LLVM C API.</p> +</td></tr><tr class="module-item"><td><a class="mod" href="parser/index.html" title="llvm_kaleidoscope_rs::parser mod">parser</a></td><td class="docblock-short"></td></tr></table><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2> +<table><tr class="module-item"><td><a class="struct" href="struct.SmallCStr.html" title="llvm_kaleidoscope_rs::SmallCStr struct">SmallCStr</a></td><td class="docblock-short"><p>Small C string on the stack with fixed size <a href="constant.SMALL_STR_SIZE.html" title="SMALL_STR_SIZE"><code>SMALL_STR_SIZE</code></a>.</p> +</td></tr></table><h2 id="enums" class="section-header"><a href="#enums">Enums</a></h2> +<table><tr class="module-item"><td><a class="enum" href="enum.Either.html" title="llvm_kaleidoscope_rs::Either enum">Either</a></td><td class="docblock-short"><p>Either type, for APIs accepting two types.</p> +</td></tr></table><h2 id="constants" class="section-header"><a href="#constants">Constants</a></h2> +<table><tr class="module-item"><td><a class="constant" href="constant.SMALL_STR_SIZE.html" title="llvm_kaleidoscope_rs::SMALL_STR_SIZE constant">SMALL_STR_SIZE</a></td><td class="docblock-short"><p>Fixed size of <a href="struct.SmallCStr.html" title="SmallCStr"><code>SmallCStr</code></a> including the trailing <code>\0</code> byte.</p> +</td></tr></table></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="llvm_kaleidoscope_rs" data-search-index-js="../search-index.js" data-search-js="../search.js"></div><script src="../main.js"></script></body></html>
\ No newline at end of file diff --git a/llvm_kaleidoscope_rs/lexer/enum.Token.html b/llvm_kaleidoscope_rs/lexer/enum.Token.html new file mode 100644 index 0000000..e93e300 --- /dev/null +++ b/llvm_kaleidoscope_rs/lexer/enum.Token.html @@ -0,0 +1,25 @@ +<!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 `Token` enum in crate `llvm_kaleidoscope_rs`."><meta name="keywords" content="rust, rustlang, rust-lang, Token"><title>Token in llvm_kaleidoscope_rs::lexer - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg"> +<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"> +<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc enum"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../llvm_kaleidoscope_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Enum Token</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#variants">Variants</a></h3><div class="sidebar-links"><a href="#variant.Char">Char</a><a href="#variant.Def">Def</a><a href="#variant.Eof">Eof</a><a href="#variant.Extern">Extern</a><a href="#variant.Identifier">Identifier</a><a href="#variant.Number">Number</a></div><h3 class="sidebar-title"><a href="#trait-implementations">Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-Debug">Debug</a><a href="#impl-PartialEq%3CToken%3E">PartialEq<Token></a><a href="#impl-StructuralPartialEq">StructuralPartialEq</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a></div></div><h2 class="location">Other items in<br><a href="../index.html">llvm_kaleidoscope_rs</a>::<wbr><a href="index.html">lexer</a></h2><div id="sidebar-vars" data-name="Token" data-ty="enum" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Enum <a href="../index.html">llvm_kaleidoscope_rs</a>::<wbr><a href="index.html">lexer</a>::<wbr><a class="enum" href="#">Token</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/llvm_kaleidoscope_rs/lexer.rs.html#2-9" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust enum">pub enum Token { + Eof, + Def, + Extern, + Identifier(<a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>), + Number(<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>), + Char(<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.char.html">char</a>), +}</pre></div><h2 id="variants" class="variants small-section-header"> + Variants<a href="#variants" class="anchor"></a></h2> +<div id="variant.Eof" class="variant small-section-header"><a href="#variant.Eof" class="anchor field"></a><code>Eof</code></div><div id="variant.Def" class="variant small-section-header"><a href="#variant.Def" class="anchor field"></a><code>Def</code></div><div id="variant.Extern" class="variant small-section-header"><a href="#variant.Extern" class="anchor field"></a><code>Extern</code></div><div id="variant.Identifier" class="variant small-section-header"><a href="#variant.Identifier" class="anchor field"></a><code>Identifier(<a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>)</code></div><div id="variant.Number" class="variant small-section-header"><a href="#variant.Number" class="anchor field"></a><code>Number(<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>)</code></div><div id="variant.Char" class="variant small-section-header"><a href="#variant.Char" class="anchor field"></a><code>Char(<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.char.html">char</a>)</code></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Debug" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="enum.Token.html" title="enum llvm_kaleidoscope_rs::lexer::Token">Token</a></h3><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/lexer.rs.html#1" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.fmt" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.54.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.54.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4><a href="#method.fmt" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/lexer.rs.html#1" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.54.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-PartialEq%3CToken%3E" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="enum" href="enum.Token.html" title="enum llvm_kaleidoscope_rs::lexer::Token">Token</a>> for <a class="enum" href="enum.Token.html" title="enum llvm_kaleidoscope_rs::lexer::Token">Token</a></h3><a href="#impl-PartialEq%3CToken%3E" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/lexer.rs.html#1" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.eq" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, other: &<a class="enum" href="enum.Token.html" title="enum llvm_kaleidoscope_rs::lexer::Token">Token</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a href="#method.eq" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/lexer.rs.html#1" title="goto source code">[src]</a></div></summary><div class='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>. <a href="https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.ne" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&self, other: &<a class="enum" href="enum.Token.html" title="enum llvm_kaleidoscope_rs::lexer::Token">Token</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a href="#method.ne" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/lexer.rs.html#1" title="goto source code">[src]</a></div></summary><div class='docblock'><p>This method tests for <code>!=</code>.</p> +</div></details></div></details><div id="impl-StructuralPartialEq" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="enum" href="enum.Token.html" title="enum llvm_kaleidoscope_rs::lexer::Token">Token</a></h3><a href="#impl-StructuralPartialEq" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/lexer.rs.html#1" title="goto source code">[src]</a></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><div id="impl-RefUnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="enum.Token.html" title="enum llvm_kaleidoscope_rs::lexer::Token">Token</a></h3><a href="#impl-RefUnwindSafe" class="anchor"></a></div><div id="impl-Send" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="enum.Token.html" title="enum llvm_kaleidoscope_rs::lexer::Token">Token</a></h3><a href="#impl-Send" class="anchor"></a></div><div id="impl-Sync" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="enum.Token.html" title="enum llvm_kaleidoscope_rs::lexer::Token">Token</a></h3><a href="#impl-Sync" class="anchor"></a></div><div id="impl-Unpin" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="enum.Token.html" title="enum llvm_kaleidoscope_rs::lexer::Token">Token</a></h3><a href="#impl-Unpin" class="anchor"></a></div><div id="impl-UnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="enum" href="enum.Token.html" title="enum llvm_kaleidoscope_rs::lexer::Token">Token</a></h3><a href="#impl-UnwindSafe" class="anchor"></a></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Any" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/any.rs.html#131-135" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_id" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.54.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4><a href="#method.type_id" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/any.rs.html#132" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Borrow%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#208-213" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&</a>T</h4><a href="#method.borrow" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#210" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-BorrowMut%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#216-220" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow_mut" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&mut </a>T</h4><a href="#method.borrow_mut" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#217" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-From%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#544-548" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.from" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</h4><a href="#method.from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#545" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Into%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></h3><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#533-540" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.into" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</h4><a href="#method.into" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#537" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-TryFrom%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></h3><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#581-590" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Error" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4><a href="#associatedtype.Error" class="anchor"></a></div></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_from" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4><a href="#method.try_from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#587" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-TryInto%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></h3><a href="#impl-TryInto%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#567-576" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Error-1" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html#associatedtype.Error" class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4><a href="#associatedtype.Error-1" class="anchor"></a></div></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_into" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4><a href="#method.try_into" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#573" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="llvm_kaleidoscope_rs" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script></body></html>
\ No newline at end of file diff --git a/llvm_kaleidoscope_rs/lexer/index.html b/llvm_kaleidoscope_rs/lexer/index.html new file mode 100644 index 0000000..ad9e36f --- /dev/null +++ b/llvm_kaleidoscope_rs/lexer/index.html @@ -0,0 +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 `lexer` mod in crate `llvm_kaleidoscope_rs`."><meta name="keywords" content="rust, rustlang, rust-lang, lexer"><title>llvm_kaleidoscope_rs::lexer - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg"> +<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"> +<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../llvm_kaleidoscope_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module lexer</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li></ul></div><div id="sidebar-vars" data-name="lexer" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">llvm_kaleidoscope_rs</a>::<wbr><a class="mod" href="#">lexer</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/llvm_kaleidoscope_rs/lexer.rs.html#1-181" title="goto source code">[src]</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2> +<table><tr class="module-item"><td><a class="struct" href="struct.Lexer.html" title="llvm_kaleidoscope_rs::lexer::Lexer struct">Lexer</a></td><td class="docblock-short"></td></tr></table><h2 id="enums" class="section-header"><a href="#enums">Enums</a></h2> +<table><tr class="module-item"><td><a class="enum" href="enum.Token.html" title="llvm_kaleidoscope_rs::lexer::Token enum">Token</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="llvm_kaleidoscope_rs" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script></body></html>
\ No newline at end of file diff --git a/llvm_kaleidoscope_rs/lexer/sidebar-items.js b/llvm_kaleidoscope_rs/lexer/sidebar-items.js new file mode 100644 index 0000000..343e858 --- /dev/null +++ b/llvm_kaleidoscope_rs/lexer/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"enum":[["Token",""]],"struct":[["Lexer",""]]});
\ No newline at end of file diff --git a/llvm_kaleidoscope_rs/lexer/struct.Lexer.html b/llvm_kaleidoscope_rs/lexer/struct.Lexer.html new file mode 100644 index 0000000..b85a138 --- /dev/null +++ b/llvm_kaleidoscope_rs/lexer/struct.Lexer.html @@ -0,0 +1,14 @@ +<!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 `Lexer` struct in crate `llvm_kaleidoscope_rs`."><meta name="keywords" content="rust, rustlang, rust-lang, Lexer"><title>Lexer in llvm_kaleidoscope_rs::lexer - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg"> +<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"> +<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../llvm_kaleidoscope_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct Lexer</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.gettok">gettok</a><a href="#method.new">new</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a></div></div><h2 class="location">Other items in<br><a href="../index.html">llvm_kaleidoscope_rs</a>::<wbr><a href="index.html">lexer</a></h2><div id="sidebar-vars" data-name="Lexer" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">llvm_kaleidoscope_rs</a>::<wbr><a href="index.html">lexer</a>::<wbr><a class="struct" href="#">Lexer</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/llvm_kaleidoscope_rs/lexer.rs.html#11-17" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust struct">pub struct Lexer<I> <span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.char.html">char</a>>, </span> { /* fields omitted */ }</pre></div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><h3 class="code-header in-band">impl<I> <a class="struct" href="struct.Lexer.html" title="struct llvm_kaleidoscope_rs::lexer::Lexer">Lexer</a><I> <span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.char.html">char</a>>, </span></h3><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/lexer.rs.html#19-103" title="goto source code">[src]</a></div></summary><div class="impl-items"><div id="method.new" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.new" class="fnname">new</a>(input: I) -> <a class="struct" href="struct.Lexer.html" title="struct llvm_kaleidoscope_rs::lexer::Lexer">Lexer</a><I></h4><a href="#method.new" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/lexer.rs.html#23-26" title="goto source code">[src]</a></div><details class="rustdoc-toggle method-toggle" open><summary><div id="method.gettok" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.gettok" class="fnname">gettok</a>(&mut self) -> <a class="enum" href="enum.Token.html" title="enum llvm_kaleidoscope_rs::lexer::Token">Token</a></h4><a href="#method.gettok" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/lexer.rs.html#36-102" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Lex and return the next token.</p> +<p>Implement <code>int gettok();</code> from the tutorial.</p> +</div></details></div></details><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><div id="impl-RefUnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl<I> <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Lexer.html" title="struct llvm_kaleidoscope_rs::lexer::Lexer">Lexer</a><I> <span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a>, </span></h3><a href="#impl-RefUnwindSafe" class="anchor"></a></div><div id="impl-Send" class="impl has-srclink"><h3 class="code-header in-band">impl<I> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Lexer.html" title="struct llvm_kaleidoscope_rs::lexer::Lexer">Lexer</a><I> <span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>, </span></h3><a href="#impl-Send" class="anchor"></a></div><div id="impl-Sync" class="impl has-srclink"><h3 class="code-header in-band">impl<I> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Lexer.html" title="struct llvm_kaleidoscope_rs::lexer::Lexer">Lexer</a><I> <span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>, </span></h3><a href="#impl-Sync" class="anchor"></a></div><div id="impl-Unpin" class="impl has-srclink"><h3 class="code-header in-band">impl<I> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Lexer.html" title="struct llvm_kaleidoscope_rs::lexer::Lexer">Lexer</a><I> <span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>, </span></h3><a href="#impl-Unpin" class="anchor"></a></div><div id="impl-UnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl<I> <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Lexer.html" title="struct llvm_kaleidoscope_rs::lexer::Lexer">Lexer</a><I> <span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a>, </span></h3><a href="#impl-UnwindSafe" class="anchor"></a></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Any" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/any.rs.html#131-135" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_id" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.54.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4><a href="#method.type_id" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/any.rs.html#132" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Borrow%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#208-213" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&</a>T</h4><a href="#method.borrow" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#210" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-BorrowMut%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#216-220" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow_mut" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&mut </a>T</h4><a href="#method.borrow_mut" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#217" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-From%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#544-548" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.from" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</h4><a href="#method.from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#545" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Into%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></h3><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#533-540" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.into" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</h4><a href="#method.into" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#537" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-TryFrom%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></h3><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#581-590" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Error" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4><a href="#associatedtype.Error" class="anchor"></a></div></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_from" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4><a href="#method.try_from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#587" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-TryInto%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></h3><a href="#impl-TryInto%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#567-576" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Error-1" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html#associatedtype.Error" class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4><a href="#associatedtype.Error-1" class="anchor"></a></div></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_into" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4><a href="#method.try_into" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#573" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="llvm_kaleidoscope_rs" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script></body></html>
\ No newline at end of file diff --git a/llvm_kaleidoscope_rs/llvm/index.html b/llvm_kaleidoscope_rs/llvm/index.html new file mode 100644 index 0000000..acd0ba4 --- /dev/null +++ b/llvm_kaleidoscope_rs/llvm/index.html @@ -0,0 +1,15 @@ +<!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="Safe wrapper around the LLVM C API."><meta name="keywords" content="rust, rustlang, rust-lang, llvm"><title>llvm_kaleidoscope_rs::llvm - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg"> +<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"> +<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../llvm_kaleidoscope_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module llvm</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><div id="sidebar-vars" data-name="llvm" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">llvm_kaleidoscope_rs</a>::<wbr><a class="mod" href="#">llvm</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#1-534" title="goto source code">[src]</a></span></h1><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Safe wrapper around the LLVM C API.</p> +<p>References returned from the LLVM API are tied to the <code>'llvm</code> lifetime which is bound to the +context where the objects are created in. +We do not offer wrappers to remove or delete any objects in the context and therefore all the +references will be valid for the liftime of the context.</p> +</div></details><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2> +<table><tr class="module-item"><td><a class="struct" href="struct.BasicBlock.html" title="llvm_kaleidoscope_rs::llvm::BasicBlock struct">BasicBlock</a></td><td class="docblock-short"><p>Wrapper for a LLVM Basic Block.</p> +</td></tr><tr class="module-item"><td><a class="struct" href="struct.Builder.html" title="llvm_kaleidoscope_rs::llvm::Builder struct">Builder</a></td><td class="docblock-short"><p>Wrapper for a LLVM IR Builder.</p> +</td></tr><tr class="module-item"><td><a class="struct" href="struct.FnValue.html" title="llvm_kaleidoscope_rs::llvm::FnValue struct">FnValue</a></td><td class="docblock-short"><p>Wrapper for a LLVM Value Reference specialized for contexts where function values are needed.</p> +</td></tr><tr class="module-item"><td><a class="struct" href="struct.Module.html" title="llvm_kaleidoscope_rs::llvm::Module struct">Module</a></td><td class="docblock-short"><p>Wrapper for a LLVM Module with its own LLVM Context.</p> +</td></tr><tr class="module-item"><td><a class="struct" href="struct.Type.html" title="llvm_kaleidoscope_rs::llvm::Type struct">Type</a></td><td class="docblock-short"><p>Wrapper for a LLVM Type Reference.</p> +</td></tr><tr class="module-item"><td><a class="struct" href="struct.Value.html" title="llvm_kaleidoscope_rs::llvm::Value struct">Value</a></td><td class="docblock-short"><p>Wrapper for a LLVM Value Reference.</p> +</td></tr></table></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="llvm_kaleidoscope_rs" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script></body></html>
\ No newline at end of file diff --git a/llvm_kaleidoscope_rs/llvm/sidebar-items.js b/llvm_kaleidoscope_rs/llvm/sidebar-items.js new file mode 100644 index 0000000..71ace87 --- /dev/null +++ b/llvm_kaleidoscope_rs/llvm/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["BasicBlock","Wrapper for a LLVM Basic Block."],["Builder","Wrapper for a LLVM IR Builder."],["FnValue","Wrapper for a LLVM Value Reference specialized for contexts where function values are needed."],["Module","Wrapper for a LLVM Module with its own LLVM Context."],["Type","Wrapper for a LLVM Type Reference."],["Value","Wrapper for a LLVM Value Reference."]]});
\ No newline at end of file diff --git a/llvm_kaleidoscope_rs/llvm/struct.BasicBlock.html b/llvm_kaleidoscope_rs/llvm/struct.BasicBlock.html new file mode 100644 index 0000000..2b943b1 --- /dev/null +++ b/llvm_kaleidoscope_rs/llvm/struct.BasicBlock.html @@ -0,0 +1,19 @@ +<!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="Wrapper for a LLVM Basic Block."><meta name="keywords" content="rust, rustlang, rust-lang, BasicBlock"><title>BasicBlock in llvm_kaleidoscope_rs::llvm - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg"> +<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"> +<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../llvm_kaleidoscope_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct BasicBlock</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#trait-implementations">Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Copy">Copy</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">!Send</a><a href="#impl-Sync">!Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a></div></div><h2 class="location">Other items in<br><a href="../index.html">llvm_kaleidoscope_rs</a>::<wbr><a href="index.html">llvm</a></h2><div id="sidebar-vars" data-name="BasicBlock" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">llvm_kaleidoscope_rs</a>::<wbr><a href="index.html">llvm</a>::<wbr><a class="struct" href="#">BasicBlock</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#348" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust struct">pub struct BasicBlock<'llvm>(_, _);</pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Wrapper for a LLVM Basic Block.</p> +</div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Clone" class="impl has-srclink"><h3 class="code-header in-band">impl<'llvm> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.BasicBlock.html" title="struct llvm_kaleidoscope_rs::llvm::BasicBlock">BasicBlock</a><'llvm></h3><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#347" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="struct.BasicBlock.html" title="struct llvm_kaleidoscope_rs::llvm::BasicBlock">BasicBlock</a><'llvm></h4><a href="#method.clone" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#347" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone_from" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&</a>Self)</h4><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a href="#method.clone_from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/clone.rs.html#130" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></p> +</div></details></div></details><div id="impl-Copy" class="impl has-srclink"><h3 class="code-header in-band">impl<'llvm> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="struct.BasicBlock.html" title="struct llvm_kaleidoscope_rs::llvm::BasicBlock">BasicBlock</a><'llvm></h3><a href="#impl-Copy" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#347" title="goto source code">[src]</a></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><div id="impl-RefUnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl<'llvm> <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.BasicBlock.html" title="struct llvm_kaleidoscope_rs::llvm::BasicBlock">BasicBlock</a><'llvm></h3><a href="#impl-RefUnwindSafe" class="anchor"></a></div><div id="impl-Send" class="impl has-srclink"><h3 class="code-header in-band">impl<'llvm> !<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.BasicBlock.html" title="struct llvm_kaleidoscope_rs::llvm::BasicBlock">BasicBlock</a><'llvm></h3><a href="#impl-Send" class="anchor"></a></div><div id="impl-Sync" class="impl has-srclink"><h3 class="code-header in-band">impl<'llvm> !<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.BasicBlock.html" title="struct llvm_kaleidoscope_rs::llvm::BasicBlock">BasicBlock</a><'llvm></h3><a href="#impl-Sync" class="anchor"></a></div><div id="impl-Unpin" class="impl has-srclink"><h3 class="code-header in-band">impl<'llvm> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.BasicBlock.html" title="struct llvm_kaleidoscope_rs::llvm::BasicBlock">BasicBlock</a><'llvm></h3><a href="#impl-Unpin" class="anchor"></a></div><div id="impl-UnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl<'llvm> <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.BasicBlock.html" title="struct llvm_kaleidoscope_rs::llvm::BasicBlock">BasicBlock</a><'llvm></h3><a href="#impl-UnwindSafe" class="anchor"></a></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Any" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/any.rs.html#131-135" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_id" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.54.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4><a href="#method.type_id" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/any.rs.html#132" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Borrow%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#208-213" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&</a>T</h4><a href="#method.borrow" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#210" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-BorrowMut%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#216-220" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow_mut" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&mut </a>T</h4><a href="#method.borrow_mut" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#217" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-From%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#544-548" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.from" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</h4><a href="#method.from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#545" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Into%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></h3><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#533-540" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.into" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</h4><a href="#method.into" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#537" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-ToOwned" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, </span></h3><a href="#impl-ToOwned" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/alloc/borrow.rs.html#84-96" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Owned" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.54.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="type">Owned</a> = T</h4><a href="#associatedtype.Owned" class="anchor"></a></div></summary><div class='docblock'><p>The resulting type after obtaining ownership.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.to_owned" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fnname">to_owned</a>(&self) -> T</h4><a href="#method.to_owned" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/alloc/borrow.rs.html#89" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.54.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone_into" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fnname">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&mut </a>T)</h4><a href="#method.clone_into" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/alloc/borrow.rs.html#93" title="goto source code">[src]</a></div></summary><div class="item-info"><div class="stab unstable"><details><summary><span class="emoji">🔬</span> This is a nightly-only experimental API. (<code>toowned_clone_into</code>)</summary><p>recently added</p> +</details></div></div><div class='docblock'><p>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.54.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-TryFrom%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></h3><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#581-590" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Error" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4><a href="#associatedtype.Error" class="anchor"></a></div></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_from" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4><a href="#method.try_from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#587" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-TryInto%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></h3><a href="#impl-TryInto%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#567-576" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Error-1" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html#associatedtype.Error" class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4><a href="#associatedtype.Error-1" class="anchor"></a></div></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_into" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4><a href="#method.try_into" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#573" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="llvm_kaleidoscope_rs" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script></body></html>
\ No newline at end of file diff --git a/llvm_kaleidoscope_rs/llvm/struct.Builder.html b/llvm_kaleidoscope_rs/llvm/struct.Builder.html new file mode 100644 index 0000000..dd33e3e --- /dev/null +++ b/llvm_kaleidoscope_rs/llvm/struct.Builder.html @@ -0,0 +1,39 @@ +<!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="Wrapper for a LLVM IR Builder."><meta name="keywords" content="rust, rustlang, rust-lang, Builder"><title>Builder in llvm_kaleidoscope_rs::llvm - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg"> +<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"> +<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../llvm_kaleidoscope_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct Builder</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.call">call</a><a href="#method.fadd">fadd</a><a href="#method.fcmpult">fcmpult</a><a href="#method.fmul">fmul</a><a href="#method.fsub">fsub</a><a href="#method.pos_at_end">pos_at_end</a><a href="#method.ret">ret</a><a href="#method.uitofp">uitofp</a><a href="#method.with_ctx">with_ctx</a></div><h3 class="sidebar-title"><a href="#trait-implementations">Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-Drop">Drop</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">!Send</a><a href="#impl-Sync">!Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a></div></div><h2 class="location">Other items in<br><a href="../index.html">llvm_kaleidoscope_rs</a>::<wbr><a href="index.html">llvm</a></h2><div id="sidebar-vars" data-name="Builder" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">llvm_kaleidoscope_rs</a>::<wbr><a href="index.html">llvm</a>::<wbr><a class="struct" href="#">Builder</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#178-181" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust struct">pub struct Builder<'llvm> { /* fields omitted */ }</pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Wrapper for a LLVM IR Builder.</p> +</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><h3 class="code-header in-band">impl<'llvm> <a class="struct" href="struct.Builder.html" title="struct llvm_kaleidoscope_rs::llvm::Builder">Builder</a><'llvm></h3><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#183-334" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.with_ctx" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.with_ctx" class="fnname">with_ctx</a>(module: &'llvm <a class="struct" href="struct.Module.html" title="struct llvm_kaleidoscope_rs::llvm::Module">Module</a>) -> <a class="struct" href="struct.Builder.html" title="struct llvm_kaleidoscope_rs::llvm::Builder">Builder</a><'llvm></h4><a href="#method.with_ctx" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#189-197" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Create a new LLVM IR Builder with the <code>module</code>s context.</p> +<h1 id="panics" class="section-header"><a href="#panics">Panics</a></h1> +<p>Panics if creating the IR Builder fails.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.pos_at_end" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.pos_at_end" class="fnname">pos_at_end</a>(&self, bb: <a class="struct" href="struct.BasicBlock.html" title="struct llvm_kaleidoscope_rs::llvm::BasicBlock">BasicBlock</a><'llvm>)</h4><a href="#method.pos_at_end" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#200-204" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Position the IR Builder at the end of the given Basic Block.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.fadd" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.fadd" class="fnname">fadd</a>(&self, lhs: <a class="struct" href="struct.Value.html" title="struct llvm_kaleidoscope_rs::llvm::Value">Value</a><'llvm>, rhs: <a class="struct" href="struct.Value.html" title="struct llvm_kaleidoscope_rs::llvm::Value">Value</a><'llvm>) -> <a class="struct" href="struct.Value.html" title="struct llvm_kaleidoscope_rs::llvm::Value">Value</a><'llvm></h4><a href="#method.fadd" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#211-224" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Emit a <a href="https://llvm.org/docs/LangRef.html#fadd-instruction">fadd</a> instruction.</p> +<h1 id="panics-1" class="section-header"><a href="#panics-1">Panics</a></h1> +<p>Panics if LLVM API returns a <code>null</code> pointer.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.fsub" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.fsub" class="fnname">fsub</a>(&self, lhs: <a class="struct" href="struct.Value.html" title="struct llvm_kaleidoscope_rs::llvm::Value">Value</a><'llvm>, rhs: <a class="struct" href="struct.Value.html" title="struct llvm_kaleidoscope_rs::llvm::Value">Value</a><'llvm>) -> <a class="struct" href="struct.Value.html" title="struct llvm_kaleidoscope_rs::llvm::Value">Value</a><'llvm></h4><a href="#method.fsub" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#231-244" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Emit a <a href="https://llvm.org/docs/LangRef.html#fsub-instruction">fsub</a> instruction.</p> +<h1 id="panics-2" class="section-header"><a href="#panics-2">Panics</a></h1> +<p>Panics if LLVM API returns a <code>null</code> pointer.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.fmul" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.fmul" class="fnname">fmul</a>(&self, lhs: <a class="struct" href="struct.Value.html" title="struct llvm_kaleidoscope_rs::llvm::Value">Value</a><'llvm>, rhs: <a class="struct" href="struct.Value.html" title="struct llvm_kaleidoscope_rs::llvm::Value">Value</a><'llvm>) -> <a class="struct" href="struct.Value.html" title="struct llvm_kaleidoscope_rs::llvm::Value">Value</a><'llvm></h4><a href="#method.fmul" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#251-264" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Emit a <a href="https://llvm.org/docs/LangRef.html#fmul-instruction">fmul</a> instruction.</p> +<h1 id="panics-3" class="section-header"><a href="#panics-3">Panics</a></h1> +<p>Panics if LLVM API returns a <code>null</code> pointer.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.fcmpult" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.fcmpult" class="fnname">fcmpult</a>(&self, lhs: <a class="struct" href="struct.Value.html" title="struct llvm_kaleidoscope_rs::llvm::Value">Value</a><'llvm>, rhs: <a class="struct" href="struct.Value.html" title="struct llvm_kaleidoscope_rs::llvm::Value">Value</a><'llvm>) -> <a class="struct" href="struct.Value.html" title="struct llvm_kaleidoscope_rs::llvm::Value">Value</a><'llvm></h4><a href="#method.fcmpult" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#271-285" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Emit a <a href="https://llvm.org/docs/LangRef.html#fcmp-instruction">fcmult</a> instruction.</p> +<h1 id="panics-4" class="section-header"><a href="#panics-4">Panics</a></h1> +<p>Panics if LLVM API returns a <code>null</code> pointer.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.uitofp" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.uitofp" class="fnname">uitofp</a>(&self, val: <a class="struct" href="struct.Value.html" title="struct llvm_kaleidoscope_rs::llvm::Value">Value</a><'llvm>, dest_type: <a class="struct" href="struct.Type.html" title="struct llvm_kaleidoscope_rs::llvm::Type">Type</a><'llvm>) -> <a class="struct" href="struct.Value.html" title="struct llvm_kaleidoscope_rs::llvm::Value">Value</a><'llvm></h4><a href="#method.uitofp" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#292-304" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Emit a <a href="https://llvm.org/docs/LangRef.html#uitofp-to-instruction">uitofp</a> instruction.</p> +<h1 id="panics-5" class="section-header"><a href="#panics-5">Panics</a></h1> +<p>Panics if LLVM API returns a <code>null</code> pointer.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.call" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.call" class="fnname">call</a>(<br> &self, <br> fn_value: <a class="struct" href="struct.FnValue.html" title="struct llvm_kaleidoscope_rs::llvm::FnValue">FnValue</a><'llvm>, <br> args: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">&mut [</a><a class="struct" href="struct.Value.html" title="struct llvm_kaleidoscope_rs::llvm::Value">Value</a><'llvm><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">]</a><br>) -> <a class="struct" href="struct.Value.html" title="struct llvm_kaleidoscope_rs::llvm::Value">Value</a><'llvm></h4><a href="#method.call" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#311-323" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Emit a <a href="https://llvm.org/docs/LangRef.html#call-instruction">call</a> instruction.</p> +<h1 id="panics-6" class="section-header"><a href="#panics-6">Panics</a></h1> +<p>Panics if LLVM API returns a <code>null</code> pointer.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.ret" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.ret" class="fnname">ret</a>(&self, ret: <a class="struct" href="struct.Value.html" title="struct llvm_kaleidoscope_rs::llvm::Value">Value</a><'llvm>)</h4><a href="#method.ret" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#330-333" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Emit a <a href="https://llvm.org/docs/LangRef.html#ret-instruction">ret</a> instruction.</p> +<h1 id="panics-7" class="section-header"><a href="#panics-7">Panics</a></h1> +<p>Panics if LLVM API returns a <code>null</code> pointer.</p> +</div></details></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Drop" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/ops/drop/trait.Drop.html" title="trait core::ops::drop::Drop">Drop</a> for <a class="struct" href="struct.Builder.html" title="struct llvm_kaleidoscope_rs::llvm::Builder">Builder</a><'_></h3><a href="#impl-Drop" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#336-340" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.drop" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/ops/drop/trait.Drop.html#tymethod.drop" class="fnname">drop</a>(&mut self)</h4><a href="#method.drop" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#337-339" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Executes the destructor for this type. <a href="https://doc.rust-lang.org/1.54.0/core/ops/drop/trait.Drop.html#tymethod.drop">Read more</a></p> +</div></details></div></details></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><div id="impl-RefUnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl<'llvm> <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Builder.html" title="struct llvm_kaleidoscope_rs::llvm::Builder">Builder</a><'llvm></h3><a href="#impl-RefUnwindSafe" class="anchor"></a></div><div id="impl-Send" class="impl has-srclink"><h3 class="code-header in-band">impl<'llvm> !<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Builder.html" title="struct llvm_kaleidoscope_rs::llvm::Builder">Builder</a><'llvm></h3><a href="#impl-Send" class="anchor"></a></div><div id="impl-Sync" class="impl has-srclink"><h3 class="code-header in-band">impl<'llvm> !<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Builder.html" title="struct llvm_kaleidoscope_rs::llvm::Builder">Builder</a><'llvm></h3><a href="#impl-Sync" class="anchor"></a></div><div id="impl-Unpin" class="impl has-srclink"><h3 class="code-header in-band">impl<'llvm> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Builder.html" title="struct llvm_kaleidoscope_rs::llvm::Builder">Builder</a><'llvm></h3><a href="#impl-Unpin" class="anchor"></a></div><div id="impl-UnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl<'llvm> <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Builder.html" title="struct llvm_kaleidoscope_rs::llvm::Builder">Builder</a><'llvm></h3><a href="#impl-UnwindSafe" class="anchor"></a></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Any" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/any.rs.html#131-135" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_id" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.54.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4><a href="#method.type_id" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/any.rs.html#132" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Borrow%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#208-213" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&</a>T</h4><a href="#method.borrow" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#210" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-BorrowMut%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#216-220" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow_mut" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&mut </a>T</h4><a href="#method.borrow_mut" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#217" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-From%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#544-548" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.from" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</h4><a href="#method.from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#545" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Into%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></h3><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#533-540" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.into" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</h4><a href="#method.into" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#537" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-TryFrom%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></h3><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#581-590" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Error" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4><a href="#associatedtype.Error" class="anchor"></a></div></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_from" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4><a href="#method.try_from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#587" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-TryInto%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></h3><a href="#impl-TryInto%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#567-576" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Error-1" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html#associatedtype.Error" class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4><a href="#associatedtype.Error-1" class="anchor"></a></div></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_into" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4><a href="#method.try_into" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#573" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="llvm_kaleidoscope_rs" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script></body></html>
\ No newline at end of file diff --git a/llvm_kaleidoscope_rs/llvm/struct.FnValue.html b/llvm_kaleidoscope_rs/llvm/struct.FnValue.html new file mode 100644 index 0000000..64ff22c --- /dev/null +++ b/llvm_kaleidoscope_rs/llvm/struct.FnValue.html @@ -0,0 +1,42 @@ +<!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="Wrapper for a LLVM Value Reference specialized for contexts where function values are needed."><meta name="keywords" content="rust, rustlang, rust-lang, FnValue"><title>FnValue in llvm_kaleidoscope_rs::llvm - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg"> +<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"> +<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../llvm_kaleidoscope_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct FnValue</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.arg">arg</a><a href="#method.args">args</a><a href="#method.basic_blocks">basic_blocks</a><a href="#method.ret_type">ret_type</a><a href="#method.verify">verify</a></div><h3 class="sidebar-title"><a href="#deref-methods">Methods from Deref<Target=Value<'llvm>></a></h3><div class="sidebar-links"><a href="#method.dump">dump</a><a href="#method.get_name">get_name</a><a href="#method.is_f64">is_f64</a><a href="#method.is_int">is_int</a><a href="#method.set_name">set_name</a><a href="#method.type_of">type_of</a></div><h3 class="sidebar-title"><a href="#trait-implementations">Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Copy">Copy</a><a href="#impl-Deref">Deref</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">!Send</a><a href="#impl-Sync">!Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a></div></div><h2 class="location">Other items in<br><a href="../index.html">llvm_kaleidoscope_rs</a>::<wbr><a href="index.html">llvm</a></h2><div id="sidebar-vars" data-name="FnValue" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">llvm_kaleidoscope_rs</a>::<wbr><a href="index.html">llvm</a>::<wbr><a class="struct" href="#">FnValue</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#472" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust struct"><div class="code-attribute">#[repr(transparent)]</div>pub struct FnValue<'llvm>(_);</pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Wrapper for a LLVM Value Reference specialized for contexts where function values are needed.</p> +</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><h3 class="code-header in-band">impl<'llvm> <a class="struct" href="struct.FnValue.html" title="struct llvm_kaleidoscope_rs::llvm::FnValue">FnValue</a><'llvm></h3><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#481-534" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.ret_type" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.ret_type" class="fnname">ret_type</a>(&self) -> <a class="struct" href="struct.Type.html" title="struct llvm_kaleidoscope_rs::llvm::Type">Type</a><'llvm></h4><a href="#method.ret_type" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#498-501" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Get a type reference representing the return value of the given function value.</p> +<h1 id="panics" class="section-header"><a href="#panics">Panics</a></h1> +<p>Panics if LLVM API returns a <code>null</code> pointer.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.args" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.args" class="fnname">args</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.usize.html">usize</a></h4><a href="#method.args" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#504-506" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Get the number of function arguments for the given function value.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.arg" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.arg" class="fnname">arg</a>(&self, idx: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.usize.html">usize</a>) -> <a class="struct" href="struct.Value.html" title="struct llvm_kaleidoscope_rs::llvm::Value">Value</a><'llvm></h4><a href="#method.arg" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#513-518" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Get a value reference for the function argument at index <code>idx</code>.</p> +<h1 id="panics-1" class="section-header"><a href="#panics-1">Panics</a></h1> +<p>Panics if LLVM API returns a <code>null</code> pointer or indexed out of bounds.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.basic_blocks" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.basic_blocks" class="fnname">basic_blocks</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.usize.html">usize</a></h4><a href="#method.basic_blocks" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#521-523" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Get the number of Basic Blocks for the given function value.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.verify" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.verify" class="fnname">verify</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a href="#method.verify" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#526-533" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Verify that the given function is valid.</p> +</div></details></div></details><h2 id="deref-methods" class="small-section-header">Methods from <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a><Target = <a class="struct" href="struct.Value.html" title="struct llvm_kaleidoscope_rs::llvm::Value">Value</a><'llvm>><a href="#deref-methods" class="anchor"></a></h2><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.dump" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.dump" class="fnname">dump</a>(&self)</h4><a href="#method.dump" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#416-418" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Dump the LLVM Value to stdout.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_of" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.type_of" class="fnname">type_of</a>(&self) -> <a class="struct" href="struct.Type.html" title="struct llvm_kaleidoscope_rs::llvm::Type">Type</a><'llvm></h4><a href="#method.type_of" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#425-428" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Get a type reference representing for the given value reference.</p> +<h1 id="panics-2" class="section-header"><a href="#panics-2">Panics</a></h1> +<p>Panics if LLVM API returns a <code>null</code> pointer.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.set_name" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.set_name" class="fnname">set_name</a>(&self, name: &<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.str.html">str</a>)</h4><a href="#method.set_name" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#435-437" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Set the name for the given value reference.</p> +<h1 id="panics-3" class="section-header"><a href="#panics-3">Panics</a></h1> +<p>Panics if LLVM API returns a <code>null</code> pointer.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.get_name" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.get_name" class="fnname">get_name</a>(&self) -> &'llvm <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.str.html">str</a></h4><a href="#method.get_name" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#444-456" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Get the name for the given value reference.</p> +<h1 id="panics-4" class="section-header"><a href="#panics-4">Panics</a></h1> +<p>Panics if LLVM API returns a <code>null</code> pointer.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.is_f64" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.is_f64" class="fnname">is_f64</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a href="#method.is_f64" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#459-461" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Check if value is of <code>f64</code> type.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.is_int" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.is_int" class="fnname">is_int</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a href="#method.is_int" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#464-466" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Check if value is of integer type.</p> +</div></details></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Clone" class="impl has-srclink"><h3 class="code-header in-band">impl<'llvm> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.FnValue.html" title="struct llvm_kaleidoscope_rs::llvm::FnValue">FnValue</a><'llvm></h3><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#470" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="struct.FnValue.html" title="struct llvm_kaleidoscope_rs::llvm::FnValue">FnValue</a><'llvm></h4><a href="#method.clone" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#470" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone_from" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&</a>Self)</h4><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a href="#method.clone_from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/clone.rs.html#130" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Deref" class="impl has-srclink"><h3 class="code-header in-band">impl<'llvm> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a> for <a class="struct" href="struct.FnValue.html" title="struct llvm_kaleidoscope_rs::llvm::FnValue">FnValue</a><'llvm></h3><a href="#impl-Deref" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#474-479" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Target" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.54.0/core/ops/deref/trait.Deref.html#associatedtype.Target" class="type">Target</a> = <a class="struct" href="struct.Value.html" title="struct llvm_kaleidoscope_rs::llvm::Value">Value</a><'llvm></h4><a href="#associatedtype.Target" class="anchor"></a></div></summary><div class='docblock'><p>The resulting type after dereferencing.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.deref" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/ops/deref/trait.Deref.html#tymethod.deref" class="fnname">deref</a>(&self) -> &Self::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/ops/deref/trait.Deref.html#associatedtype.Target" title="type core::ops::deref::Deref::Target">Target</a></h4><a href="#method.deref" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#476-478" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Dereferences the value.</p> +</div></details></div></details><div id="impl-Copy" class="impl has-srclink"><h3 class="code-header in-band">impl<'llvm> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="struct.FnValue.html" title="struct llvm_kaleidoscope_rs::llvm::FnValue">FnValue</a><'llvm></h3><a href="#impl-Copy" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#470" title="goto source code">[src]</a></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><div id="impl-RefUnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl<'llvm> <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.FnValue.html" title="struct llvm_kaleidoscope_rs::llvm::FnValue">FnValue</a><'llvm></h3><a href="#impl-RefUnwindSafe" class="anchor"></a></div><div id="impl-Send" class="impl has-srclink"><h3 class="code-header in-band">impl<'llvm> !<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.FnValue.html" title="struct llvm_kaleidoscope_rs::llvm::FnValue">FnValue</a><'llvm></h3><a href="#impl-Send" class="anchor"></a></div><div id="impl-Sync" class="impl has-srclink"><h3 class="code-header in-band">impl<'llvm> !<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.FnValue.html" title="struct llvm_kaleidoscope_rs::llvm::FnValue">FnValue</a><'llvm></h3><a href="#impl-Sync" class="anchor"></a></div><div id="impl-Unpin" class="impl has-srclink"><h3 class="code-header in-band">impl<'llvm> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.FnValue.html" title="struct llvm_kaleidoscope_rs::llvm::FnValue">FnValue</a><'llvm></h3><a href="#impl-Unpin" class="anchor"></a></div><div id="impl-UnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl<'llvm> <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.FnValue.html" title="struct llvm_kaleidoscope_rs::llvm::FnValue">FnValue</a><'llvm></h3><a href="#impl-UnwindSafe" class="anchor"></a></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Any" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/any.rs.html#131-135" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_id" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.54.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4><a href="#method.type_id" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/any.rs.html#132" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Borrow%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#208-213" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&</a>T</h4><a href="#method.borrow" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#210" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-BorrowMut%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#216-220" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow_mut" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&mut </a>T</h4><a href="#method.borrow_mut" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#217" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-From%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#544-548" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.from" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</h4><a href="#method.from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#545" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Into%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></h3><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#533-540" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.into" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</h4><a href="#method.into" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#537" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-ToOwned" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, </span></h3><a href="#impl-ToOwned" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/alloc/borrow.rs.html#84-96" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Owned" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.54.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="type">Owned</a> = T</h4><a href="#associatedtype.Owned" class="anchor"></a></div></summary><div class='docblock'><p>The resulting type after obtaining ownership.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.to_owned" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fnname">to_owned</a>(&self) -> T</h4><a href="#method.to_owned" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/alloc/borrow.rs.html#89" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.54.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone_into" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fnname">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&mut </a>T)</h4><a href="#method.clone_into" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/alloc/borrow.rs.html#93" title="goto source code">[src]</a></div></summary><div class="item-info"><div class="stab unstable"><details><summary><span class="emoji">🔬</span> This is a nightly-only experimental API. (<code>toowned_clone_into</code>)</summary><p>recently added</p> +</details></div></div><div class='docblock'><p>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.54.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-TryFrom%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></h3><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#581-590" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Error" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4><a href="#associatedtype.Error" class="anchor"></a></div></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_from" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4><a href="#method.try_from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#587" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-TryInto%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></h3><a href="#impl-TryInto%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#567-576" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Error-1" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html#associatedtype.Error" class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4><a href="#associatedtype.Error-1" class="anchor"></a></div></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_into" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4><a href="#method.try_into" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#573" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="llvm_kaleidoscope_rs" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script></body></html>
\ No newline at end of file diff --git a/llvm_kaleidoscope_rs/llvm/struct.Module.html b/llvm_kaleidoscope_rs/llvm/struct.Module.html new file mode 100644 index 0000000..6d9cb60 --- /dev/null +++ b/llvm_kaleidoscope_rs/llvm/struct.Module.html @@ -0,0 +1,37 @@ +<!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="Wrapper for a LLVM Module with its own LLVM Context."><meta name="keywords" content="rust, rustlang, rust-lang, Module"><title>Module in llvm_kaleidoscope_rs::llvm - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg"> +<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"> +<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../llvm_kaleidoscope_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct Module</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.add_fn">add_fn</a><a href="#method.append_basic_block">append_basic_block</a><a href="#method.dump">dump</a><a href="#method.get_fn">get_fn</a><a href="#method.new">new</a><a href="#method.type_f64">type_f64</a><a href="#method.type_fn">type_fn</a></div><h3 class="sidebar-title"><a href="#trait-implementations">Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-Drop">Drop</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">!Send</a><a href="#impl-Sync">!Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a></div></div><h2 class="location">Other items in<br><a href="../index.html">llvm_kaleidoscope_rs</a>::<wbr><a href="index.html">llvm</a></h2><div id="sidebar-vars" data-name="Module" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">llvm_kaleidoscope_rs</a>::<wbr><a href="index.html">llvm</a>::<wbr><a class="struct" href="#">Module</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#54-57" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust struct">pub struct Module { /* fields omitted */ }</pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Wrapper for a LLVM Module with its own LLVM Context.</p> +</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><h3 class="code-header in-band">impl<'llvm> <a class="struct" href="struct.Module.html" title="struct llvm_kaleidoscope_rs::llvm::Module">Module</a></h3><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#59-162" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.new" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.new" class="fnname">new</a>() -> Self</h4><a href="#method.new" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#65-74" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Create a new Module instance.</p> +<h1 id="panics" class="section-header"><a href="#panics">Panics</a></h1> +<p>Panics if creating the context or the module fails.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.dump" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.dump" class="fnname">dump</a>(&self)</h4><a href="#method.dump" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#77-79" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Dump LLVM IR emitted into the Module to stdout.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_f64" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.type_f64" class="fnname">type_f64</a>(&self) -> <a class="struct" href="struct.Type.html" title="struct llvm_kaleidoscope_rs::llvm::Type">Type</a><'llvm></h4><a href="#method.type_f64" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#86-89" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Get a type reference representing a <code>f64</code> float.</p> +<h1 id="panics-1" class="section-header"><a href="#panics-1">Panics</a></h1> +<p>Panics if LLVM API returns a <code>null</code> pointer.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_fn" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.type_fn" class="fnname">type_fn</a>(<br> &'llvm self, <br> args: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">&mut [</a><a class="struct" href="struct.Type.html" title="struct llvm_kaleidoscope_rs::llvm::Type">Type</a><'llvm><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">]</a>, <br> ret: <a class="struct" href="struct.Type.html" title="struct llvm_kaleidoscope_rs::llvm::Type">Type</a><'llvm><br>) -> <a class="struct" href="struct.Type.html" title="struct llvm_kaleidoscope_rs::llvm::Type">Type</a><'llvm></h4><a href="#method.type_fn" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#96-106" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Get a type reference representing a <code>fn(args) -> ret</code> function.</p> +<h1 id="panics-2" class="section-header"><a href="#panics-2">Panics</a></h1> +<p>Panics if LLVM API returns a <code>null</code> pointer.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.add_fn" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.add_fn" class="fnname">add_fn</a>(&'llvm self, name: &<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.str.html">str</a>, fn_type: <a class="struct" href="struct.Type.html" title="struct llvm_kaleidoscope_rs::llvm::Type">Type</a><'llvm>) -> <a class="struct" href="struct.FnValue.html" title="struct llvm_kaleidoscope_rs::llvm::FnValue">FnValue</a><'llvm></h4><a href="#method.add_fn" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#115-127" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Add a function with the given <code>name</code> and <code>fn_type</code> to the module and return a value +reference representing the function.</p> +<h1 id="panics-3" class="section-header"><a href="#panics-3">Panics</a></h1> +<p>Panics if LLVM API returns a <code>null</code> pointer or <code>name</code> could not be converted to a +<a href="../struct.SmallCStr.html" title="SmallCStr"><code>SmallCStr</code></a>.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.get_fn" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.get_fn" class="fnname">get_fn</a>(&'llvm self, name: &<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.FnValue.html" title="struct llvm_kaleidoscope_rs::llvm::FnValue">FnValue</a><'llvm>></h4><a href="#method.get_fn" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#135-142" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Get a function value reference to the function with the given <code>name</code> if it was previously +added to the module with <a href="struct.Module.html#method.add_fn" title="Module::add_fn"><code>add_fn</code></a>.</p> +<h1 id="panics-4" class="section-header"><a href="#panics-4">Panics</a></h1> +<p>Panics if <code>name</code> could not be converted to a <a href="../struct.SmallCStr.html" title="SmallCStr"><code>SmallCStr</code></a>.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.append_basic_block" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.append_basic_block" class="fnname">append_basic_block</a>(<br> &'llvm self, <br> fn_value: <a class="struct" href="struct.FnValue.html" title="struct llvm_kaleidoscope_rs::llvm::FnValue">FnValue</a><'llvm><br>) -> <a class="struct" href="struct.BasicBlock.html" title="struct llvm_kaleidoscope_rs::llvm::BasicBlock">BasicBlock</a><'llvm></h4><a href="#method.append_basic_block" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#150-161" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Append a Basic Block to the end of the function referenced by the value reference +<code>fn_value</code>.</p> +<h1 id="panics-5" class="section-header"><a href="#panics-5">Panics</a></h1> +<p>Panics if LLVM API returns a <code>null</code> pointer.</p> +</div></details></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Drop" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/ops/drop/trait.Drop.html" title="trait core::ops::drop::Drop">Drop</a> for <a class="struct" href="struct.Module.html" title="struct llvm_kaleidoscope_rs::llvm::Module">Module</a></h3><a href="#impl-Drop" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#164-171" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.drop" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/ops/drop/trait.Drop.html#tymethod.drop" class="fnname">drop</a>(&mut self)</h4><a href="#method.drop" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#165-170" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Executes the destructor for this type. <a href="https://doc.rust-lang.org/1.54.0/core/ops/drop/trait.Drop.html#tymethod.drop">Read more</a></p> +</div></details></div></details></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><div id="impl-RefUnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Module.html" title="struct llvm_kaleidoscope_rs::llvm::Module">Module</a></h3><a href="#impl-RefUnwindSafe" class="anchor"></a></div><div id="impl-Send" class="impl has-srclink"><h3 class="code-header in-band">impl !<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Module.html" title="struct llvm_kaleidoscope_rs::llvm::Module">Module</a></h3><a href="#impl-Send" class="anchor"></a></div><div id="impl-Sync" class="impl has-srclink"><h3 class="code-header in-band">impl !<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Module.html" title="struct llvm_kaleidoscope_rs::llvm::Module">Module</a></h3><a href="#impl-Sync" class="anchor"></a></div><div id="impl-Unpin" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Module.html" title="struct llvm_kaleidoscope_rs::llvm::Module">Module</a></h3><a href="#impl-Unpin" class="anchor"></a></div><div id="impl-UnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Module.html" title="struct llvm_kaleidoscope_rs::llvm::Module">Module</a></h3><a href="#impl-UnwindSafe" class="anchor"></a></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Any" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/any.rs.html#131-135" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_id" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.54.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4><a href="#method.type_id" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/any.rs.html#132" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Borrow%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#208-213" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&</a>T</h4><a href="#method.borrow" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#210" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-BorrowMut%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#216-220" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow_mut" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&mut </a>T</h4><a href="#method.borrow_mut" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#217" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-From%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#544-548" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.from" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</h4><a href="#method.from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#545" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Into%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></h3><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#533-540" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.into" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</h4><a href="#method.into" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#537" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-TryFrom%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></h3><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#581-590" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Error" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4><a href="#associatedtype.Error" class="anchor"></a></div></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_from" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4><a href="#method.try_from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#587" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-TryInto%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></h3><a href="#impl-TryInto%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#567-576" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Error-1" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html#associatedtype.Error" class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4><a href="#associatedtype.Error-1" class="anchor"></a></div></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_into" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4><a href="#method.try_into" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#573" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="llvm_kaleidoscope_rs" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script></body></html>
\ No newline at end of file diff --git a/llvm_kaleidoscope_rs/llvm/struct.Type.html b/llvm_kaleidoscope_rs/llvm/struct.Type.html new file mode 100644 index 0000000..51fcaf8 --- /dev/null +++ b/llvm_kaleidoscope_rs/llvm/struct.Type.html @@ -0,0 +1,23 @@ +<!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="Wrapper for a LLVM Type Reference."><meta name="keywords" content="rust, rustlang, rust-lang, Type"><title>Type in llvm_kaleidoscope_rs::llvm - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg"> +<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"> +<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../llvm_kaleidoscope_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct Type</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.const_f64">const_f64</a><a href="#method.dump">dump</a></div><h3 class="sidebar-title"><a href="#trait-implementations">Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Copy">Copy</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">!Send</a><a href="#impl-Sync">!Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a></div></div><h2 class="location">Other items in<br><a href="../index.html">llvm_kaleidoscope_rs</a>::<wbr><a href="index.html">llvm</a></h2><div id="sidebar-vars" data-name="Type" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">llvm_kaleidoscope_rs</a>::<wbr><a href="index.html">llvm</a>::<wbr><a class="struct" href="#">Type</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#357" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust struct"><div class="code-attribute">#[repr(transparent)]</div>pub struct Type<'llvm>(_, _);</pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Wrapper for a LLVM Type Reference.</p> +</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><h3 class="code-header in-band">impl<'llvm> <a class="struct" href="struct.Type.html" title="struct llvm_kaleidoscope_rs::llvm::Type">Type</a><'llvm></h3><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#359-389" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.dump" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.dump" class="fnname">dump</a>(&self)</h4><a href="#method.dump" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#370-372" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Dump the LLVM Type to stdout.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.const_f64" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.const_f64" class="fnname">const_f64</a>(self, n: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>) -> <a class="struct" href="struct.Value.html" title="struct llvm_kaleidoscope_rs::llvm::Value">Value</a><'llvm></h4><a href="#method.const_f64" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#379-388" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Get a value reference representing the const <code>f64</code> value.</p> +<h1 id="panics" class="section-header"><a href="#panics">Panics</a></h1> +<p>Panics if LLVM API returns a <code>null</code> pointer.</p> +</div></details></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Clone" class="impl has-srclink"><h3 class="code-header in-band">impl<'llvm> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.Type.html" title="struct llvm_kaleidoscope_rs::llvm::Type">Type</a><'llvm></h3><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#355" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="struct.Type.html" title="struct llvm_kaleidoscope_rs::llvm::Type">Type</a><'llvm></h4><a href="#method.clone" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#355" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone_from" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&</a>Self)</h4><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a href="#method.clone_from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/clone.rs.html#130" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></p> +</div></details></div></details><div id="impl-Copy" class="impl has-srclink"><h3 class="code-header in-band">impl<'llvm> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="struct.Type.html" title="struct llvm_kaleidoscope_rs::llvm::Type">Type</a><'llvm></h3><a href="#impl-Copy" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#355" title="goto source code">[src]</a></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><div id="impl-RefUnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl<'llvm> <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Type.html" title="struct llvm_kaleidoscope_rs::llvm::Type">Type</a><'llvm></h3><a href="#impl-RefUnwindSafe" class="anchor"></a></div><div id="impl-Send" class="impl has-srclink"><h3 class="code-header in-band">impl<'llvm> !<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Type.html" title="struct llvm_kaleidoscope_rs::llvm::Type">Type</a><'llvm></h3><a href="#impl-Send" class="anchor"></a></div><div id="impl-Sync" class="impl has-srclink"><h3 class="code-header in-band">impl<'llvm> !<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Type.html" title="struct llvm_kaleidoscope_rs::llvm::Type">Type</a><'llvm></h3><a href="#impl-Sync" class="anchor"></a></div><div id="impl-Unpin" class="impl has-srclink"><h3 class="code-header in-band">impl<'llvm> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Type.html" title="struct llvm_kaleidoscope_rs::llvm::Type">Type</a><'llvm></h3><a href="#impl-Unpin" class="anchor"></a></div><div id="impl-UnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl<'llvm> <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Type.html" title="struct llvm_kaleidoscope_rs::llvm::Type">Type</a><'llvm></h3><a href="#impl-UnwindSafe" class="anchor"></a></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Any" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/any.rs.html#131-135" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_id" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.54.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4><a href="#method.type_id" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/any.rs.html#132" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Borrow%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#208-213" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&</a>T</h4><a href="#method.borrow" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#210" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-BorrowMut%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#216-220" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow_mut" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&mut </a>T</h4><a href="#method.borrow_mut" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#217" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-From%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#544-548" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.from" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</h4><a href="#method.from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#545" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Into%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></h3><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#533-540" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.into" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</h4><a href="#method.into" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#537" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-ToOwned" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, </span></h3><a href="#impl-ToOwned" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/alloc/borrow.rs.html#84-96" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Owned" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.54.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="type">Owned</a> = T</h4><a href="#associatedtype.Owned" class="anchor"></a></div></summary><div class='docblock'><p>The resulting type after obtaining ownership.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.to_owned" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fnname">to_owned</a>(&self) -> T</h4><a href="#method.to_owned" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/alloc/borrow.rs.html#89" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.54.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone_into" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fnname">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&mut </a>T)</h4><a href="#method.clone_into" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/alloc/borrow.rs.html#93" title="goto source code">[src]</a></div></summary><div class="item-info"><div class="stab unstable"><details><summary><span class="emoji">🔬</span> This is a nightly-only experimental API. (<code>toowned_clone_into</code>)</summary><p>recently added</p> +</details></div></div><div class='docblock'><p>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.54.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-TryFrom%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></h3><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#581-590" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Error" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4><a href="#associatedtype.Error" class="anchor"></a></div></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_from" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4><a href="#method.try_from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#587" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-TryInto%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></h3><a href="#impl-TryInto%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#567-576" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Error-1" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html#associatedtype.Error" class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4><a href="#associatedtype.Error-1" class="anchor"></a></div></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_into" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4><a href="#method.try_into" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#573" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="llvm_kaleidoscope_rs" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script></body></html>
\ No newline at end of file diff --git a/llvm_kaleidoscope_rs/llvm/struct.Value.html b/llvm_kaleidoscope_rs/llvm/struct.Value.html new file mode 100644 index 0000000..7f6e117 --- /dev/null +++ b/llvm_kaleidoscope_rs/llvm/struct.Value.html @@ -0,0 +1,31 @@ +<!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="Wrapper for a LLVM Value Reference."><meta name="keywords" content="rust, rustlang, rust-lang, Value"><title>Value in llvm_kaleidoscope_rs::llvm - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg"> +<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"> +<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../llvm_kaleidoscope_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct Value</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.dump">dump</a><a href="#method.get_name">get_name</a><a href="#method.is_f64">is_f64</a><a href="#method.is_int">is_int</a><a href="#method.set_name">set_name</a><a href="#method.type_of">type_of</a></div><h3 class="sidebar-title"><a href="#trait-implementations">Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Copy">Copy</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">!Send</a><a href="#impl-Sync">!Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a></div></div><h2 class="location">Other items in<br><a href="../index.html">llvm_kaleidoscope_rs</a>::<wbr><a href="index.html">llvm</a></h2><div id="sidebar-vars" data-name="Value" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">llvm_kaleidoscope_rs</a>::<wbr><a href="index.html">llvm</a>::<wbr><a class="struct" href="#">Value</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#398" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust struct"><div class="code-attribute">#[repr(transparent)]</div>pub struct Value<'llvm>(_, _);</pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Wrapper for a LLVM Value Reference.</p> +</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><h3 class="code-header in-band">impl<'llvm> <a class="struct" href="struct.Value.html" title="struct llvm_kaleidoscope_rs::llvm::Value">Value</a><'llvm></h3><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#400-467" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.dump" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.dump" class="fnname">dump</a>(&self)</h4><a href="#method.dump" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#416-418" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Dump the LLVM Value to stdout.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_of" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.type_of" class="fnname">type_of</a>(&self) -> <a class="struct" href="struct.Type.html" title="struct llvm_kaleidoscope_rs::llvm::Type">Type</a><'llvm></h4><a href="#method.type_of" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#425-428" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Get a type reference representing for the given value reference.</p> +<h1 id="panics" class="section-header"><a href="#panics">Panics</a></h1> +<p>Panics if LLVM API returns a <code>null</code> pointer.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.set_name" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.set_name" class="fnname">set_name</a>(&self, name: &<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.str.html">str</a>)</h4><a href="#method.set_name" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#435-437" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Set the name for the given value reference.</p> +<h1 id="panics-1" class="section-header"><a href="#panics-1">Panics</a></h1> +<p>Panics if LLVM API returns a <code>null</code> pointer.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.get_name" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.get_name" class="fnname">get_name</a>(&self) -> &'llvm <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.str.html">str</a></h4><a href="#method.get_name" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#444-456" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Get the name for the given value reference.</p> +<h1 id="panics-2" class="section-header"><a href="#panics-2">Panics</a></h1> +<p>Panics if LLVM API returns a <code>null</code> pointer.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.is_f64" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.is_f64" class="fnname">is_f64</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a href="#method.is_f64" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#459-461" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Check if value is of <code>f64</code> type.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.is_int" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.is_int" class="fnname">is_int</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a href="#method.is_int" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#464-466" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Check if value is of integer type.</p> +</div></details></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Clone" class="impl has-srclink"><h3 class="code-header in-band">impl<'llvm> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.Value.html" title="struct llvm_kaleidoscope_rs::llvm::Value">Value</a><'llvm></h3><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#396" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="struct.Value.html" title="struct llvm_kaleidoscope_rs::llvm::Value">Value</a><'llvm></h4><a href="#method.clone" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#396" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone_from" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&</a>Self)</h4><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a href="#method.clone_from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/clone.rs.html#130" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></p> +</div></details></div></details><div id="impl-Copy" class="impl has-srclink"><h3 class="code-header in-band">impl<'llvm> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="struct.Value.html" title="struct llvm_kaleidoscope_rs::llvm::Value">Value</a><'llvm></h3><a href="#impl-Copy" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/llvm.rs.html#396" title="goto source code">[src]</a></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><div id="impl-RefUnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl<'llvm> <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Value.html" title="struct llvm_kaleidoscope_rs::llvm::Value">Value</a><'llvm></h3><a href="#impl-RefUnwindSafe" class="anchor"></a></div><div id="impl-Send" class="impl has-srclink"><h3 class="code-header in-band">impl<'llvm> !<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Value.html" title="struct llvm_kaleidoscope_rs::llvm::Value">Value</a><'llvm></h3><a href="#impl-Send" class="anchor"></a></div><div id="impl-Sync" class="impl has-srclink"><h3 class="code-header in-band">impl<'llvm> !<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Value.html" title="struct llvm_kaleidoscope_rs::llvm::Value">Value</a><'llvm></h3><a href="#impl-Sync" class="anchor"></a></div><div id="impl-Unpin" class="impl has-srclink"><h3 class="code-header in-band">impl<'llvm> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Value.html" title="struct llvm_kaleidoscope_rs::llvm::Value">Value</a><'llvm></h3><a href="#impl-Unpin" class="anchor"></a></div><div id="impl-UnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl<'llvm> <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Value.html" title="struct llvm_kaleidoscope_rs::llvm::Value">Value</a><'llvm></h3><a href="#impl-UnwindSafe" class="anchor"></a></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Any" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/any.rs.html#131-135" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_id" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.54.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4><a href="#method.type_id" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/any.rs.html#132" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Borrow%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#208-213" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&</a>T</h4><a href="#method.borrow" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#210" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-BorrowMut%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#216-220" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow_mut" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&mut </a>T</h4><a href="#method.borrow_mut" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#217" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-From%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#544-548" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.from" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</h4><a href="#method.from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#545" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Into%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></h3><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#533-540" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.into" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</h4><a href="#method.into" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#537" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-ToOwned" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, </span></h3><a href="#impl-ToOwned" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/alloc/borrow.rs.html#84-96" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Owned" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.54.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="type">Owned</a> = T</h4><a href="#associatedtype.Owned" class="anchor"></a></div></summary><div class='docblock'><p>The resulting type after obtaining ownership.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.to_owned" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fnname">to_owned</a>(&self) -> T</h4><a href="#method.to_owned" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/alloc/borrow.rs.html#89" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.54.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone_into" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fnname">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&mut </a>T)</h4><a href="#method.clone_into" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/alloc/borrow.rs.html#93" title="goto source code">[src]</a></div></summary><div class="item-info"><div class="stab unstable"><details><summary><span class="emoji">🔬</span> This is a nightly-only experimental API. (<code>toowned_clone_into</code>)</summary><p>recently added</p> +</details></div></div><div class='docblock'><p>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.54.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-TryFrom%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></h3><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#581-590" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Error" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4><a href="#associatedtype.Error" class="anchor"></a></div></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_from" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4><a href="#method.try_from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#587" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-TryInto%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></h3><a href="#impl-TryInto%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#567-576" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Error-1" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html#associatedtype.Error" class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4><a href="#associatedtype.Error-1" class="anchor"></a></div></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_into" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4><a href="#method.try_into" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#573" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="llvm_kaleidoscope_rs" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script></body></html>
\ No newline at end of file diff --git a/llvm_kaleidoscope_rs/parser/enum.ExprAST.html b/llvm_kaleidoscope_rs/parser/enum.ExprAST.html new file mode 100644 index 0000000..d718684 --- /dev/null +++ b/llvm_kaleidoscope_rs/parser/enum.ExprAST.html @@ -0,0 +1,27 @@ +<!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 `ExprAST` enum in crate `llvm_kaleidoscope_rs`."><meta name="keywords" content="rust, rustlang, rust-lang, ExprAST"><title>ExprAST in llvm_kaleidoscope_rs::parser - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg"> +<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"> +<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc enum"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../llvm_kaleidoscope_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Enum ExprAST</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#variants">Variants</a></h3><div class="sidebar-links"><a href="#variant.Binary">Binary</a><a href="#variant.Call">Call</a><a href="#variant.Number">Number</a><a href="#variant.Variable">Variable</a></div><h3 class="sidebar-title"><a href="#trait-implementations">Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-Debug">Debug</a><a href="#impl-PartialEq%3CExprAST%3E">PartialEq<ExprAST></a><a href="#impl-StructuralPartialEq">StructuralPartialEq</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a></div></div><h2 class="location">Other items in<br><a href="../index.html">llvm_kaleidoscope_rs</a>::<wbr><a href="index.html">parser</a></h2><div id="sidebar-vars" data-name="ExprAST" data-ty="enum" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Enum <a href="../index.html">llvm_kaleidoscope_rs</a>::<wbr><a href="index.html">parser</a>::<wbr><a class="enum" href="#">ExprAST</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/llvm_kaleidoscope_rs/parser.rs.html#4-16" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust enum">pub enum ExprAST { + Number(<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>), + Variable(<a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>), + Binary(<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.char.html">char</a>, <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><<a class="enum" href="enum.ExprAST.html" title="enum llvm_kaleidoscope_rs::parser::ExprAST">ExprAST</a>>, <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><<a class="enum" href="enum.ExprAST.html" title="enum llvm_kaleidoscope_rs::parser::ExprAST">ExprAST</a>>), + Call(<a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="enum" href="enum.ExprAST.html" title="enum llvm_kaleidoscope_rs::parser::ExprAST">ExprAST</a>>), +}</pre></div><h2 id="variants" class="variants small-section-header"> + Variants<a href="#variants" class="anchor"></a></h2> +<div id="variant.Number" class="variant small-section-header"><a href="#variant.Number" class="anchor field"></a><code>Number(<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.f64.html">f64</a>)</code></div><div class="docblock"><p>Number - Expression class for numeric literals like “1.0”.</p> +</div><div id="variant.Variable" class="variant small-section-header"><a href="#variant.Variable" class="anchor field"></a><code>Variable(<a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>)</code></div><div class="docblock"><p>Variable - Expression class for referencing a variable, like “a”.</p> +</div><div id="variant.Binary" class="variant small-section-header"><a href="#variant.Binary" class="anchor field"></a><code>Binary(<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.char.html">char</a>, <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><<a class="enum" href="enum.ExprAST.html" title="enum llvm_kaleidoscope_rs::parser::ExprAST">ExprAST</a>>, <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><<a class="enum" href="enum.ExprAST.html" title="enum llvm_kaleidoscope_rs::parser::ExprAST">ExprAST</a>>)</code></div><div class="docblock"><p>Binary - Expression class for a binary operator.</p> +</div><div id="variant.Call" class="variant small-section-header"><a href="#variant.Call" class="anchor field"></a><code>Call(<a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="enum" href="enum.ExprAST.html" title="enum llvm_kaleidoscope_rs::parser::ExprAST">ExprAST</a>>)</code></div><div class="docblock"><p>Call - Expression class for function calls.</p> +</div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Debug" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="enum.ExprAST.html" title="enum llvm_kaleidoscope_rs::parser::ExprAST">ExprAST</a></h3><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/parser.rs.html#3" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.fmt" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.54.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.54.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4><a href="#method.fmt" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/parser.rs.html#3" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.54.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-PartialEq%3CExprAST%3E" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="enum" href="enum.ExprAST.html" title="enum llvm_kaleidoscope_rs::parser::ExprAST">ExprAST</a>> for <a class="enum" href="enum.ExprAST.html" title="enum llvm_kaleidoscope_rs::parser::ExprAST">ExprAST</a></h3><a href="#impl-PartialEq%3CExprAST%3E" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/parser.rs.html#3" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.eq" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, other: &<a class="enum" href="enum.ExprAST.html" title="enum llvm_kaleidoscope_rs::parser::ExprAST">ExprAST</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a href="#method.eq" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/parser.rs.html#3" title="goto source code">[src]</a></div></summary><div class='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>. <a href="https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.ne" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&self, other: &<a class="enum" href="enum.ExprAST.html" title="enum llvm_kaleidoscope_rs::parser::ExprAST">ExprAST</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a href="#method.ne" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/parser.rs.html#3" title="goto source code">[src]</a></div></summary><div class='docblock'><p>This method tests for <code>!=</code>.</p> +</div></details></div></details><div id="impl-StructuralPartialEq" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="enum" href="enum.ExprAST.html" title="enum llvm_kaleidoscope_rs::parser::ExprAST">ExprAST</a></h3><a href="#impl-StructuralPartialEq" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/parser.rs.html#3" title="goto source code">[src]</a></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><div id="impl-RefUnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="enum.ExprAST.html" title="enum llvm_kaleidoscope_rs::parser::ExprAST">ExprAST</a></h3><a href="#impl-RefUnwindSafe" class="anchor"></a></div><div id="impl-Send" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="enum.ExprAST.html" title="enum llvm_kaleidoscope_rs::parser::ExprAST">ExprAST</a></h3><a href="#impl-Send" class="anchor"></a></div><div id="impl-Sync" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="enum.ExprAST.html" title="enum llvm_kaleidoscope_rs::parser::ExprAST">ExprAST</a></h3><a href="#impl-Sync" class="anchor"></a></div><div id="impl-Unpin" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="enum.ExprAST.html" title="enum llvm_kaleidoscope_rs::parser::ExprAST">ExprAST</a></h3><a href="#impl-Unpin" class="anchor"></a></div><div id="impl-UnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="enum" href="enum.ExprAST.html" title="enum llvm_kaleidoscope_rs::parser::ExprAST">ExprAST</a></h3><a href="#impl-UnwindSafe" class="anchor"></a></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Any" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/any.rs.html#131-135" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_id" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.54.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4><a href="#method.type_id" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/any.rs.html#132" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Borrow%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#208-213" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&</a>T</h4><a href="#method.borrow" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#210" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-BorrowMut%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#216-220" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow_mut" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&mut </a>T</h4><a href="#method.borrow_mut" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#217" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-From%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#544-548" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.from" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</h4><a href="#method.from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#545" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Into%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></h3><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#533-540" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.into" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</h4><a href="#method.into" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#537" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-TryFrom%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></h3><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#581-590" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Error" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4><a href="#associatedtype.Error" class="anchor"></a></div></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_from" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4><a href="#method.try_from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#587" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-TryInto%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></h3><a href="#impl-TryInto%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#567-576" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Error-1" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html#associatedtype.Error" class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4><a href="#associatedtype.Error-1" class="anchor"></a></div></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_into" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4><a href="#method.try_into" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#573" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="llvm_kaleidoscope_rs" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script></body></html>
\ No newline at end of file diff --git a/llvm_kaleidoscope_rs/parser/index.html b/llvm_kaleidoscope_rs/parser/index.html new file mode 100644 index 0000000..79a8a5c --- /dev/null +++ b/llvm_kaleidoscope_rs/parser/index.html @@ -0,0 +1,10 @@ +<!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 `parser` mod in crate `llvm_kaleidoscope_rs`."><meta name="keywords" content="rust, rustlang, rust-lang, parser"><title>llvm_kaleidoscope_rs::parser - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg"> +<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"> +<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../llvm_kaleidoscope_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module parser</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li></ul></div><div id="sidebar-vars" data-name="parser" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">llvm_kaleidoscope_rs</a>::<wbr><a class="mod" href="#">parser</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/llvm_kaleidoscope_rs/parser.rs.html#1-460" title="goto source code">[src]</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2> +<table><tr class="module-item"><td><a class="struct" href="struct.FunctionAST.html" title="llvm_kaleidoscope_rs::parser::FunctionAST struct">FunctionAST</a></td><td class="docblock-short"><p>FunctionAST - This class represents a function definition itself.</p> +</td></tr><tr class="module-item"><td><a class="struct" href="struct.Parser.html" title="llvm_kaleidoscope_rs::parser::Parser struct">Parser</a></td><td class="docblock-short"><p>Parser for the <code>kaleidoscope</code> language.</p> +</td></tr><tr class="module-item"><td><a class="struct" href="struct.PrototypeAST.html" title="llvm_kaleidoscope_rs::parser::PrototypeAST struct">PrototypeAST</a></td><td class="docblock-short"><p>PrototypeAST - This class represents the “prototype” for a function, +which captures its name, and its argument names (thus implicitly the number +of arguments the function takes).</p> +</td></tr></table><h2 id="enums" class="section-header"><a href="#enums">Enums</a></h2> +<table><tr class="module-item"><td><a class="enum" href="enum.ExprAST.html" title="llvm_kaleidoscope_rs::parser::ExprAST enum">ExprAST</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="llvm_kaleidoscope_rs" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script></body></html>
\ No newline at end of file diff --git a/llvm_kaleidoscope_rs/parser/sidebar-items.js b/llvm_kaleidoscope_rs/parser/sidebar-items.js new file mode 100644 index 0000000..0582f57 --- /dev/null +++ b/llvm_kaleidoscope_rs/parser/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"enum":[["ExprAST",""]],"struct":[["FunctionAST","FunctionAST - This class represents a function definition itself."],["Parser","Parser for the `kaleidoscope` language."],["PrototypeAST","PrototypeAST - This class represents the “prototype” for a function, which captures its name, and its argument names (thus implicitly the number of arguments the function takes)."]]});
\ No newline at end of file diff --git a/llvm_kaleidoscope_rs/parser/struct.FunctionAST.html b/llvm_kaleidoscope_rs/parser/struct.FunctionAST.html new file mode 100644 index 0000000..9592bbb --- /dev/null +++ b/llvm_kaleidoscope_rs/parser/struct.FunctionAST.html @@ -0,0 +1,17 @@ +<!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="FunctionAST - This class represents a function definition itself."><meta name="keywords" content="rust, rustlang, rust-lang, FunctionAST"><title>FunctionAST in llvm_kaleidoscope_rs::parser - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg"> +<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"> +<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../llvm_kaleidoscope_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct FunctionAST</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#trait-implementations">Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-Debug">Debug</a><a href="#impl-PartialEq%3CFunctionAST%3E">PartialEq<FunctionAST></a><a href="#impl-StructuralPartialEq">StructuralPartialEq</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a></div></div><h2 class="location">Other items in<br><a href="../index.html">llvm_kaleidoscope_rs</a>::<wbr><a href="index.html">parser</a></h2><div id="sidebar-vars" data-name="FunctionAST" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">llvm_kaleidoscope_rs</a>::<wbr><a href="index.html">parser</a>::<wbr><a class="struct" href="#">FunctionAST</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/llvm_kaleidoscope_rs/parser.rs.html#26" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust struct">pub struct FunctionAST(pub <a class="struct" href="struct.PrototypeAST.html" title="struct llvm_kaleidoscope_rs::parser::PrototypeAST">PrototypeAST</a>, pub <a class="enum" href="enum.ExprAST.html" title="enum llvm_kaleidoscope_rs::parser::ExprAST">ExprAST</a>);</pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>FunctionAST - This class represents a function definition itself.</p> +</div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Debug" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.FunctionAST.html" title="struct llvm_kaleidoscope_rs::parser::FunctionAST">FunctionAST</a></h3><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/parser.rs.html#25" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.fmt" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.54.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.54.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4><a href="#method.fmt" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/parser.rs.html#25" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.54.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-PartialEq%3CFunctionAST%3E" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.FunctionAST.html" title="struct llvm_kaleidoscope_rs::parser::FunctionAST">FunctionAST</a>> for <a class="struct" href="struct.FunctionAST.html" title="struct llvm_kaleidoscope_rs::parser::FunctionAST">FunctionAST</a></h3><a href="#impl-PartialEq%3CFunctionAST%3E" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/parser.rs.html#25" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.eq" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, other: &<a class="struct" href="struct.FunctionAST.html" title="struct llvm_kaleidoscope_rs::parser::FunctionAST">FunctionAST</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a href="#method.eq" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/parser.rs.html#25" title="goto source code">[src]</a></div></summary><div class='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>. <a href="https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.ne" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&self, other: &<a class="struct" href="struct.FunctionAST.html" title="struct llvm_kaleidoscope_rs::parser::FunctionAST">FunctionAST</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a href="#method.ne" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/parser.rs.html#25" title="goto source code">[src]</a></div></summary><div class='docblock'><p>This method tests for <code>!=</code>.</p> +</div></details></div></details><div id="impl-StructuralPartialEq" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="struct" href="struct.FunctionAST.html" title="struct llvm_kaleidoscope_rs::parser::FunctionAST">FunctionAST</a></h3><a href="#impl-StructuralPartialEq" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/parser.rs.html#25" title="goto source code">[src]</a></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><div id="impl-RefUnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.FunctionAST.html" title="struct llvm_kaleidoscope_rs::parser::FunctionAST">FunctionAST</a></h3><a href="#impl-RefUnwindSafe" class="anchor"></a></div><div id="impl-Send" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.FunctionAST.html" title="struct llvm_kaleidoscope_rs::parser::FunctionAST">FunctionAST</a></h3><a href="#impl-Send" class="anchor"></a></div><div id="impl-Sync" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.FunctionAST.html" title="struct llvm_kaleidoscope_rs::parser::FunctionAST">FunctionAST</a></h3><a href="#impl-Sync" class="anchor"></a></div><div id="impl-Unpin" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.FunctionAST.html" title="struct llvm_kaleidoscope_rs::parser::FunctionAST">FunctionAST</a></h3><a href="#impl-Unpin" class="anchor"></a></div><div id="impl-UnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.FunctionAST.html" title="struct llvm_kaleidoscope_rs::parser::FunctionAST">FunctionAST</a></h3><a href="#impl-UnwindSafe" class="anchor"></a></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Any" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/any.rs.html#131-135" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_id" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.54.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4><a href="#method.type_id" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/any.rs.html#132" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Borrow%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#208-213" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&</a>T</h4><a href="#method.borrow" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#210" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-BorrowMut%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#216-220" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow_mut" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&mut </a>T</h4><a href="#method.borrow_mut" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#217" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-From%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#544-548" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.from" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</h4><a href="#method.from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#545" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Into%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></h3><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#533-540" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.into" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</h4><a href="#method.into" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#537" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-TryFrom%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></h3><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#581-590" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Error" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4><a href="#associatedtype.Error" class="anchor"></a></div></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_from" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4><a href="#method.try_from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#587" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-TryInto%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></h3><a href="#impl-TryInto%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#567-576" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Error-1" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html#associatedtype.Error" class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4><a href="#associatedtype.Error-1" class="anchor"></a></div></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_into" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4><a href="#method.try_into" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#573" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="llvm_kaleidoscope_rs" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script></body></html>
\ No newline at end of file diff --git a/llvm_kaleidoscope_rs/parser/struct.Parser.html b/llvm_kaleidoscope_rs/parser/struct.Parser.html new file mode 100644 index 0000000..860dfc4 --- /dev/null +++ b/llvm_kaleidoscope_rs/parser/struct.Parser.html @@ -0,0 +1,24 @@ +<!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="Parser for the `kaleidoscope` language."><meta name="keywords" content="rust, rustlang, rust-lang, Parser"><title>Parser in llvm_kaleidoscope_rs::parser - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg"> +<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"> +<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../llvm_kaleidoscope_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct Parser</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.cur_tok">cur_tok</a><a href="#method.get_next_token">get_next_token</a><a href="#method.new">new</a><a href="#method.parse_definition">parse_definition</a><a href="#method.parse_extern">parse_extern</a><a href="#method.parse_top_level_expr">parse_top_level_expr</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a></div></div><h2 class="location">Other items in<br><a href="../index.html">llvm_kaleidoscope_rs</a>::<wbr><a href="index.html">parser</a></h2><div id="sidebar-vars" data-name="Parser" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">llvm_kaleidoscope_rs</a>::<wbr><a href="index.html">parser</a>::<wbr><a class="struct" href="#">Parser</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/llvm_kaleidoscope_rs/parser.rs.html#32-38" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust struct">pub struct Parser<I> <span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.char.html">char</a>>, </span> { /* fields omitted */ }</pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Parser for the <code>kaleidoscope</code> language.</p> +</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><h3 class="code-header in-band">impl<I> <a class="struct" href="struct.Parser.html" title="struct llvm_kaleidoscope_rs::parser::Parser">Parser</a><I> <span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.char.html">char</a>>, </span></h3><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/parser.rs.html#40-313" title="goto source code">[src]</a></div></summary><div class="impl-items"><div id="method.new" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.new" class="fnname">new</a>(lexer: <a class="struct" href="../lexer/struct.Lexer.html" title="struct llvm_kaleidoscope_rs::lexer::Lexer">Lexer</a><I>) -> Self</h4><a href="#method.new" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/parser.rs.html#44-49" title="goto source code">[src]</a></div><details class="rustdoc-toggle method-toggle" open><summary><div id="method.cur_tok" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.cur_tok" class="fnname">cur_tok</a>(&self) -> &<a class="enum" href="../lexer/enum.Token.html" title="enum llvm_kaleidoscope_rs::lexer::Token">Token</a></h4><a href="#method.cur_tok" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/parser.rs.html#59-61" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Implement the global variable <code>int CurTok;</code> from the tutorial.</p> +<h1 id="panics" class="section-header"><a href="#panics">Panics</a></h1> +<p>Panics if the parser doesn’t have a current token.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.get_next_token" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.get_next_token" class="fnname">get_next_token</a>(&mut self)</h4><a href="#method.get_next_token" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/parser.rs.html#66-68" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Advance the <code>cur_tok</code> by getting the next token from the lexer.</p> +<p>Implement the fucntion <code>int getNextToken();</code> from the tutorial.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.parse_definition" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.parse_definition" class="fnname">parse_definition</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="struct.FunctionAST.html" title="struct llvm_kaleidoscope_rs::parser::FunctionAST">FunctionAST</a>, <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>></h4><a href="#method.parse_definition" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/parser.rs.html#283-292" title="goto source code">[src]</a></div></summary><div class="docblock"><p>definition ::= ‘def’ prototype expression</p> +<p>Implement <code>std::unique_ptr<FunctionAST> ParseDefinition();</code> from the tutorial.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.parse_extern" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.parse_extern" class="fnname">parse_extern</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="struct.PrototypeAST.html" title="struct llvm_kaleidoscope_rs::parser::PrototypeAST">PrototypeAST</a>, <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>></h4><a href="#method.parse_extern" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/parser.rs.html#297-303" title="goto source code">[src]</a></div></summary><div class="docblock"><p>external ::= ‘extern’ prototype</p> +<p>Implement <code>std::unique_ptr<PrototypeAST> ParseExtern();</code> from the tutorial.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.parse_top_level_expr" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.parse_top_level_expr" class="fnname">parse_top_level_expr</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="struct.FunctionAST.html" title="struct llvm_kaleidoscope_rs::parser::FunctionAST">FunctionAST</a>, <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>></h4><a href="#method.parse_top_level_expr" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/parser.rs.html#308-312" title="goto source code">[src]</a></div></summary><div class="docblock"><p>toplevelexpr ::= expression</p> +<p>Implement <code>std::unique_ptr<FunctionAST> ParseTopLevelExpr();</code> from the tutorial.</p> +</div></details></div></details><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><div id="impl-RefUnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl<I> <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Parser.html" title="struct llvm_kaleidoscope_rs::parser::Parser">Parser</a><I> <span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a>, </span></h3><a href="#impl-RefUnwindSafe" class="anchor"></a></div><div id="impl-Send" class="impl has-srclink"><h3 class="code-header in-band">impl<I> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Parser.html" title="struct llvm_kaleidoscope_rs::parser::Parser">Parser</a><I> <span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>, </span></h3><a href="#impl-Send" class="anchor"></a></div><div id="impl-Sync" class="impl has-srclink"><h3 class="code-header in-band">impl<I> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Parser.html" title="struct llvm_kaleidoscope_rs::parser::Parser">Parser</a><I> <span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>, </span></h3><a href="#impl-Sync" class="anchor"></a></div><div id="impl-Unpin" class="impl has-srclink"><h3 class="code-header in-band">impl<I> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Parser.html" title="struct llvm_kaleidoscope_rs::parser::Parser">Parser</a><I> <span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>, </span></h3><a href="#impl-Unpin" class="anchor"></a></div><div id="impl-UnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl<I> <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Parser.html" title="struct llvm_kaleidoscope_rs::parser::Parser">Parser</a><I> <span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a>, </span></h3><a href="#impl-UnwindSafe" class="anchor"></a></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Any" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/any.rs.html#131-135" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_id" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.54.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4><a href="#method.type_id" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/any.rs.html#132" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Borrow%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#208-213" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&</a>T</h4><a href="#method.borrow" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#210" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-BorrowMut%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#216-220" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow_mut" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&mut </a>T</h4><a href="#method.borrow_mut" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#217" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-From%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#544-548" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.from" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</h4><a href="#method.from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#545" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Into%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></h3><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#533-540" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.into" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</h4><a href="#method.into" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#537" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-TryFrom%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></h3><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#581-590" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Error" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4><a href="#associatedtype.Error" class="anchor"></a></div></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_from" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4><a href="#method.try_from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#587" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-TryInto%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></h3><a href="#impl-TryInto%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#567-576" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Error-1" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html#associatedtype.Error" class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4><a href="#associatedtype.Error-1" class="anchor"></a></div></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_into" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4><a href="#method.try_into" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#573" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="llvm_kaleidoscope_rs" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script></body></html>
\ No newline at end of file diff --git a/llvm_kaleidoscope_rs/parser/struct.PrototypeAST.html b/llvm_kaleidoscope_rs/parser/struct.PrototypeAST.html new file mode 100644 index 0000000..96148d4 --- /dev/null +++ b/llvm_kaleidoscope_rs/parser/struct.PrototypeAST.html @@ -0,0 +1,19 @@ +<!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="PrototypeAST - This class represents the “prototype” for a function, which captures its name, and its argument names (thus implicitly the number of arguments the function takes)."><meta name="keywords" content="rust, rustlang, rust-lang, PrototypeAST"><title>PrototypeAST in llvm_kaleidoscope_rs::parser - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg"> +<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"> +<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../llvm_kaleidoscope_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct PrototypeAST</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#trait-implementations">Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-Debug">Debug</a><a href="#impl-PartialEq%3CPrototypeAST%3E">PartialEq<PrototypeAST></a><a href="#impl-StructuralPartialEq">StructuralPartialEq</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a></div></div><h2 class="location">Other items in<br><a href="../index.html">llvm_kaleidoscope_rs</a>::<wbr><a href="index.html">parser</a></h2><div id="sidebar-vars" data-name="PrototypeAST" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">llvm_kaleidoscope_rs</a>::<wbr><a href="index.html">parser</a>::<wbr><a class="struct" href="#">PrototypeAST</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/llvm_kaleidoscope_rs/parser.rs.html#22" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust struct">pub struct PrototypeAST(pub <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, pub <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>);</pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>PrototypeAST - This class represents the “prototype” for a function, +which captures its name, and its argument names (thus implicitly the number +of arguments the function takes).</p> +</div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Debug" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.PrototypeAST.html" title="struct llvm_kaleidoscope_rs::parser::PrototypeAST">PrototypeAST</a></h3><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/parser.rs.html#21" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.fmt" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.54.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.54.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4><a href="#method.fmt" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/parser.rs.html#21" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.54.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-PartialEq%3CPrototypeAST%3E" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.PrototypeAST.html" title="struct llvm_kaleidoscope_rs::parser::PrototypeAST">PrototypeAST</a>> for <a class="struct" href="struct.PrototypeAST.html" title="struct llvm_kaleidoscope_rs::parser::PrototypeAST">PrototypeAST</a></h3><a href="#impl-PartialEq%3CPrototypeAST%3E" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/parser.rs.html#21" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.eq" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, other: &<a class="struct" href="struct.PrototypeAST.html" title="struct llvm_kaleidoscope_rs::parser::PrototypeAST">PrototypeAST</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a href="#method.eq" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/parser.rs.html#21" title="goto source code">[src]</a></div></summary><div class='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>. <a href="https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.ne" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&self, other: &<a class="struct" href="struct.PrototypeAST.html" title="struct llvm_kaleidoscope_rs::parser::PrototypeAST">PrototypeAST</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a href="#method.ne" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/parser.rs.html#21" title="goto source code">[src]</a></div></summary><div class='docblock'><p>This method tests for <code>!=</code>.</p> +</div></details></div></details><div id="impl-StructuralPartialEq" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="struct" href="struct.PrototypeAST.html" title="struct llvm_kaleidoscope_rs::parser::PrototypeAST">PrototypeAST</a></h3><a href="#impl-StructuralPartialEq" class="anchor"></a><a class="srclink" href="../../src/llvm_kaleidoscope_rs/parser.rs.html#21" title="goto source code">[src]</a></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><div id="impl-RefUnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.PrototypeAST.html" title="struct llvm_kaleidoscope_rs::parser::PrototypeAST">PrototypeAST</a></h3><a href="#impl-RefUnwindSafe" class="anchor"></a></div><div id="impl-Send" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.PrototypeAST.html" title="struct llvm_kaleidoscope_rs::parser::PrototypeAST">PrototypeAST</a></h3><a href="#impl-Send" class="anchor"></a></div><div id="impl-Sync" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.PrototypeAST.html" title="struct llvm_kaleidoscope_rs::parser::PrototypeAST">PrototypeAST</a></h3><a href="#impl-Sync" class="anchor"></a></div><div id="impl-Unpin" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.PrototypeAST.html" title="struct llvm_kaleidoscope_rs::parser::PrototypeAST">PrototypeAST</a></h3><a href="#impl-Unpin" class="anchor"></a></div><div id="impl-UnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.PrototypeAST.html" title="struct llvm_kaleidoscope_rs::parser::PrototypeAST">PrototypeAST</a></h3><a href="#impl-UnwindSafe" class="anchor"></a></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Any" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/any.rs.html#131-135" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_id" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.54.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4><a href="#method.type_id" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/any.rs.html#132" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Borrow%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#208-213" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&</a>T</h4><a href="#method.borrow" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#210" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-BorrowMut%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#216-220" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow_mut" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&mut </a>T</h4><a href="#method.borrow_mut" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#217" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-From%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#544-548" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.from" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</h4><a href="#method.from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#545" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Into%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></h3><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#533-540" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.into" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</h4><a href="#method.into" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#537" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-TryFrom%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></h3><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#581-590" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Error" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4><a href="#associatedtype.Error" class="anchor"></a></div></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_from" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4><a href="#method.try_from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#587" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-TryInto%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></h3><a href="#impl-TryInto%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#567-576" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Error-1" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html#associatedtype.Error" class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4><a href="#associatedtype.Error-1" class="anchor"></a></div></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_into" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4><a href="#method.try_into" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#573" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="llvm_kaleidoscope_rs" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script></body></html>
\ No newline at end of file diff --git a/llvm_kaleidoscope_rs/sidebar-items.js b/llvm_kaleidoscope_rs/sidebar-items.js new file mode 100644 index 0000000..05674ad --- /dev/null +++ b/llvm_kaleidoscope_rs/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"constant":[["SMALL_STR_SIZE","Fixed size of [`SmallCStr`] including the trailing `\\0` byte."]],"enum":[["Either","Either type, for APIs accepting two types."]],"mod":[["codegen",""],["lexer",""],["llvm","Safe wrapper around the LLVM C API."],["parser",""]],"struct":[["SmallCStr","Small C string on the stack with fixed size [`SMALL_STR_SIZE`]."]]});
\ No newline at end of file diff --git a/llvm_kaleidoscope_rs/struct.SmallCStr.html b/llvm_kaleidoscope_rs/struct.SmallCStr.html new file mode 100644 index 0000000..308dced --- /dev/null +++ b/llvm_kaleidoscope_rs/struct.SmallCStr.html @@ -0,0 +1,22 @@ +<!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="Small C string on the stack with fixed size [`SMALL_STR_SIZE`]."><meta name="keywords" content="rust, rustlang, rust-lang, SmallCStr"><title>SmallCStr in llvm_kaleidoscope_rs - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><script src="../crates.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg"> +<link rel="alternate icon" type="image/png" href="../favicon-16x16.png"> +<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../llvm_kaleidoscope_rs/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct SmallCStr</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.as_ptr">as_ptr</a><a href="#method.new">new</a></div><h3 class="sidebar-title"><a href="#trait-implementations">Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-Debug">Debug</a><a href="#impl-PartialEq%3CSmallCStr%3E">PartialEq<SmallCStr></a><a href="#impl-StructuralPartialEq">StructuralPartialEq</a><a href="#impl-TryFrom%3C%26%27_%20str%3E">TryFrom<&'_ str></a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a></div></div><h2 class="location">Other items in<br><a href="index.html">llvm_kaleidoscope_rs</a></h2><div id="sidebar-vars" data-name="SmallCStr" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../settings.html" title="settings"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="index.html">llvm_kaleidoscope_rs</a>::<wbr><a class="struct" href="#">SmallCStr</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/llvm_kaleidoscope_rs/lib.rs.html#13" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust struct">pub struct SmallCStr(_);</pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Small C string on the stack with fixed size <a href="constant.SMALL_STR_SIZE.html" title="SMALL_STR_SIZE"><code>SMALL_STR_SIZE</code></a>.</p> +</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="struct" href="struct.SmallCStr.html" title="struct llvm_kaleidoscope_rs::SmallCStr">SmallCStr</a></h3><a href="#impl" class="anchor"></a><a class="srclink" href="../src/llvm_kaleidoscope_rs/lib.rs.html#15-38" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.new" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.new" class="fnname">new</a><T: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">[</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">]</a>>>(src: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&</a>T) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.SmallCStr.html" title="struct llvm_kaleidoscope_rs::SmallCStr">SmallCStr</a>></h4><a href="#method.new" class="anchor"></a><a class="srclink" href="../src/llvm_kaleidoscope_rs/lib.rs.html#18-32" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Create a new C string from <code>src</code>. +Returns <a href="https://doc.rust-lang.org/1.54.0/core/option/enum.Option.html#variant.None" title="None"><code>None</code></a> if <code>src</code> exceeds the fixed size or contains any <code>\0</code> bytes.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.as_ptr" class="method has-srclink"><h4 class="code-header">pub const fn <a href="#method.as_ptr" class="fnname">as_ptr</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.pointer.html">*const </a>c_char</h4><a href="#method.as_ptr" class="anchor"></a><a class="srclink" href="../src/llvm_kaleidoscope_rs/lib.rs.html#35-37" title="goto source code">[src]</a></div></summary><div class="docblock"><p>Return pointer to C string.</p> +</div></details></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Debug" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.SmallCStr.html" title="struct llvm_kaleidoscope_rs::SmallCStr">SmallCStr</a></h3><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../src/llvm_kaleidoscope_rs/lib.rs.html#12" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.fmt" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.54.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.54.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4><a href="#method.fmt" class="anchor"></a><a class="srclink" href="../src/llvm_kaleidoscope_rs/lib.rs.html#12" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.54.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-PartialEq%3CSmallCStr%3E" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.SmallCStr.html" title="struct llvm_kaleidoscope_rs::SmallCStr">SmallCStr</a>> for <a class="struct" href="struct.SmallCStr.html" title="struct llvm_kaleidoscope_rs::SmallCStr">SmallCStr</a></h3><a href="#impl-PartialEq%3CSmallCStr%3E" class="anchor"></a><a class="srclink" href="../src/llvm_kaleidoscope_rs/lib.rs.html#12" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.eq" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, other: &<a class="struct" href="struct.SmallCStr.html" title="struct llvm_kaleidoscope_rs::SmallCStr">SmallCStr</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a href="#method.eq" class="anchor"></a><a class="srclink" href="../src/llvm_kaleidoscope_rs/lib.rs.html#12" title="goto source code">[src]</a></div></summary><div class='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>. <a href="https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.ne" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&self, other: &<a class="struct" href="struct.SmallCStr.html" title="struct llvm_kaleidoscope_rs::SmallCStr">SmallCStr</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></h4><a href="#method.ne" class="anchor"></a><a class="srclink" href="../src/llvm_kaleidoscope_rs/lib.rs.html#12" title="goto source code">[src]</a></div></summary><div class='docblock'><p>This method tests for <code>!=</code>.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-TryFrom%3C%26%27_%20str%3E" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><&'_ <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.str.html">str</a>> for <a class="struct" href="struct.SmallCStr.html" title="struct llvm_kaleidoscope_rs::SmallCStr">SmallCStr</a></h3><a href="#impl-TryFrom%3C%26%27_%20str%3E" class="anchor"></a><a class="srclink" href="../src/llvm_kaleidoscope_rs/lib.rs.html#40-46" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Error" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="type">Error</a> = <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.unit.html">()</a></h4><a href="#associatedtype.Error" class="anchor"></a></div></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_from" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: &<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, Self::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4><a href="#method.try_from" class="anchor"></a><a class="srclink" href="../src/llvm_kaleidoscope_rs/lib.rs.html#43-45" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details><div id="impl-StructuralPartialEq" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="struct" href="struct.SmallCStr.html" title="struct llvm_kaleidoscope_rs::SmallCStr">SmallCStr</a></h3><a href="#impl-StructuralPartialEq" class="anchor"></a><a class="srclink" href="../src/llvm_kaleidoscope_rs/lib.rs.html#12" title="goto source code">[src]</a></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><div id="impl-RefUnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.SmallCStr.html" title="struct llvm_kaleidoscope_rs::SmallCStr">SmallCStr</a></h3><a href="#impl-RefUnwindSafe" class="anchor"></a></div><div id="impl-Send" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.SmallCStr.html" title="struct llvm_kaleidoscope_rs::SmallCStr">SmallCStr</a></h3><a href="#impl-Send" class="anchor"></a></div><div id="impl-Sync" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.SmallCStr.html" title="struct llvm_kaleidoscope_rs::SmallCStr">SmallCStr</a></h3><a href="#impl-Sync" class="anchor"></a></div><div id="impl-Unpin" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.SmallCStr.html" title="struct llvm_kaleidoscope_rs::SmallCStr">SmallCStr</a></h3><a href="#impl-Unpin" class="anchor"></a></div><div id="impl-UnwindSafe" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.SmallCStr.html" title="struct llvm_kaleidoscope_rs::SmallCStr">SmallCStr</a></h3><a href="#impl-UnwindSafe" class="anchor"></a></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Any" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/any.rs.html#131-135" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_id" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.54.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4><a href="#method.type_id" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/any.rs.html#132" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.54.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Borrow%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#208-213" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&</a>T</h4><a href="#method.borrow" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#210" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-BorrowMut%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.54.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#216-220" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow_mut" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&mut </a>T</h4><a href="#method.borrow_mut" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/borrow.rs.html#217" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.54.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-From%3CT%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#544-548" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.from" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</h4><a href="#method.from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#545" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Into%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></h3><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#533-540" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.into" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</h4><a href="#method.into" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#537" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-TryFrom%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></h3><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#581-590" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Error-1" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4><a href="#associatedtype.Error-1" class="anchor"></a></div></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_from-1" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4><a href="#method.try_from-1" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#587" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-TryInto%3CU%3E" class="impl has-srclink"><h3 class="code-header in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></h3><a href="#impl-TryInto%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#567-576" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Error-2" class="type trait-impl has-srclink"><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html#associatedtype.Error" class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4><a href="#associatedtype.Error-2" class="anchor"></a></div></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_into" class="method trait-impl has-srclink"><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/1.54.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4><a href="#method.try_into" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/convert/mod.rs.html#573" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs the conversion.</p> +</div></details></div></details></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="llvm_kaleidoscope_rs" data-search-index-js="../search-index.js" data-search-js="../search.js"></div><script src="../main.js"></script></body></html>
\ No newline at end of file @@ -0,0 +1,8 @@ +if(!String.prototype.startsWith){String.prototype.startsWith=function(searchString,position){position=position||0;return this.indexOf(searchString,position)===position}}if(!String.prototype.endsWith){String.prototype.endsWith=function(suffix,length){var l=length||this.length;return this.indexOf(suffix,l-suffix.length)!==-1}}if(!DOMTokenList.prototype.add){DOMTokenList.prototype.add=function(className){if(className&&!hasClass(this,className)){if(this.className&&this.className.length>0){this.className+=" "+className}else{this.className=className}}}}if(!DOMTokenList.prototype.remove){DOMTokenList.prototype.remove=function(className){if(className&&this.className){this.className=(" "+this.className+" ").replace(" "+className+" "," ").trim()}}}(function(){var rustdocVars=document.getElementById("rustdoc-vars");if(rustdocVars){window.rootPath=rustdocVars.attributes["data-root-path"].value;window.currentCrate=rustdocVars.attributes["data-current-crate"].value;window.searchJS=rustdocVars.attributes["data-search-js"].value;window.searchIndexJS=rustdocVars.attributes["data-search-index-js"].value}var sidebarVars=document.getElementById("sidebar-vars");if(sidebarVars){window.sidebarCurrent={name:sidebarVars.attributes["data-name"].value,ty:sidebarVars.attributes["data-ty"].value,relpath:sidebarVars.attributes["data-relpath"].value,}}}());function getVirtualKey(ev){if("key"in ev&&typeof ev.key!="undefined"){return ev.key}var c=ev.charCode||ev.keyCode;if(c==27){return"Escape"}return String.fromCharCode(c)}var THEME_PICKER_ELEMENT_ID="theme-picker";var THEMES_ELEMENT_ID="theme-choices";function getThemesElement(){return document.getElementById(THEMES_ELEMENT_ID)}function getThemePickerElement(){return document.getElementById(THEME_PICKER_ELEMENT_ID)}function getNakedUrl(){return window.location.href.split("?")[0].split("#")[0]}function showThemeButtonState(){var themePicker=getThemePickerElement();var themeChoices=getThemesElement();themeChoices.style.display="block";themePicker.style.borderBottomRightRadius="0";themePicker.style.borderBottomLeftRadius="0"}function hideThemeButtonState(){var themePicker=getThemePickerElement();var themeChoices=getThemesElement();themeChoices.style.display="none";themePicker.style.borderBottomRightRadius="3px";themePicker.style.borderBottomLeftRadius="3px"}(function(){var themeChoices=getThemesElement();var themePicker=getThemePickerElement();var availableThemes=["ayu","dark","light"];function switchThemeButtonState(){if(themeChoices.style.display==="block"){hideThemeButtonState()}else{showThemeButtonState()}}function handleThemeButtonsBlur(e){var active=document.activeElement;var related=e.relatedTarget;if(active.id!==THEME_PICKER_ELEMENT_ID&&(!active.parentNode||active.parentNode.id!==THEMES_ELEMENT_ID)&&(!related||(related.id!==THEME_PICKER_ELEMENT_ID&&(!related.parentNode||related.parentNode.id!==THEMES_ELEMENT_ID)))){hideThemeButtonState()}}themePicker.onclick=switchThemeButtonState;themePicker.onblur=handleThemeButtonsBlur;availableThemes.forEach(function(item){var but=document.createElement("button");but.textContent=item;but.onclick=function(){switchTheme(window.currentTheme,window.mainTheme,item,true);useSystemTheme(false)};but.onblur=handleThemeButtonsBlur;themeChoices.appendChild(but)})}());(function(){"use strict";window.searchState={loadingText:"Loading search results...",input:document.getElementsByClassName("search-input")[0],outputElement:function(){return document.getElementById("search")},title:document.title,titleBeforeSearch:document.title,timeout:null,currentTab:0,focusedByTab:[null,null,null],clearInputTimeout:function(){if(searchState.timeout!==null){clearTimeout(searchState.timeout);searchState.timeout=null}},focus:function(){searchState.input.focus()},defocus:function(){searchState.input.blur()},showResults:function(search){if(search===null||typeof search==='undefined'){search=searchState.outputElement()}addClass(main,"hidden");removeClass(search,"hidden");searchState.mouseMovedAfterSearch=false;document.title=searchState.title},hideResults:function(search){if(search===null||typeof search==='undefined'){search=searchState.outputElement()}addClass(search,"hidden");removeClass(main,"hidden");document.title=searchState.titleBeforeSearch;if(searchState.browserSupportsHistoryApi()){history.replaceState("",window.currentCrate+" - Rust",getNakedUrl()+window.location.hash)}},getQueryStringParams:function(){var params={};window.location.search.substring(1).split("&").map(function(s){var pair=s.split("=");params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1])});return params},putBackSearch:function(search_input){var search=searchState.outputElement();if(search_input.value!==""&&hasClass(search,"hidden")){searchState.showResults(search);if(searchState.browserSupportsHistoryApi()){var extra="?search="+encodeURIComponent(search_input.value);history.replaceState(search_input.value,"",getNakedUrl()+extra+window.location.hash)}document.title=searchState.title}},browserSupportsHistoryApi:function(){return window.history&&typeof window.history.pushState==="function"},setup:function(){var search_input=searchState.input;if(!searchState.input){return}function loadScript(url){var script=document.createElement('script');script.src=url;document.head.append(script)}var searchLoaded=false;function loadSearch(){if(!searchLoaded){searchLoaded=true;loadScript(window.searchJS);loadScript(window.searchIndexJS)}}search_input.addEventListener("focus",function(){searchState.putBackSearch(this);search_input.origPlaceholder=searchState.input.placeholder;search_input.placeholder="Type your search here.";loadSearch()});search_input.addEventListener("blur",function(){search_input.placeholder=searchState.input.origPlaceholder});search_input.removeAttribute('disabled');searchState.addCrateDropdown(window.ALL_CRATES);var params=searchState.getQueryStringParams();if(params.search!==undefined){var search=searchState.outputElement();search.innerHTML="<h3 style=\"text-align: center;\">"+searchState.loadingText+"</h3>";searchState.showResults(search);loadSearch()}},addCrateDropdown:function(crates){var elem=document.getElementById("crate-search");if(!elem){return}var savedCrate=getSettingValue("saved-filter-crate");for(var i=0,len=crates.length;i<len;++i){var option=document.createElement("option");option.value=crates[i];option.innerText=crates[i];elem.appendChild(option);if(crates[i]===savedCrate){elem.value=savedCrate}}},};function getPageId(){if(window.location.hash){var tmp=window.location.hash.replace(/^#/,"");if(tmp.length>0){return tmp}}return null}function showSidebar(){var elems=document.getElementsByClassName("sidebar-elems")[0];if(elems){addClass(elems,"show-it")}var sidebar=document.getElementsByClassName("sidebar")[0];if(sidebar){addClass(sidebar,"mobile");var filler=document.getElementById("sidebar-filler");if(!filler){var div=document.createElement("div");div.id="sidebar-filler";sidebar.appendChild(div)}}}function hideSidebar(){var elems=document.getElementsByClassName("sidebar-elems")[0];if(elems){removeClass(elems,"show-it")}var sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"mobile");var filler=document.getElementById("sidebar-filler");if(filler){filler.remove()}document.getElementsByTagName("body")[0].style.marginTop=""}var toggleAllDocsId="toggle-all-docs";var main=document.getElementById("main");var savedHash="";function handleHashes(ev){var elem;var search=searchState.outputElement();if(ev!==null&&search&&!hasClass(search,"hidden")&&ev.newURL){searchState.hideResults(search);var hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(searchState.browserSupportsHistoryApi()){history.replaceState(hash,"",getNakedUrl()+window.location.search+"#"+hash)}elem=document.getElementById(hash);if(elem){elem.scrollIntoView()}}if(savedHash!==window.location.hash){savedHash=window.location.hash;if(savedHash.length===0){return}expandSection(savedHash.slice(1))}}function onHashChange(ev){hideSidebar();handleHashes(ev)}function openParentDetails(elem){while(elem){if(elem.tagName==="DETAILS"){elem.open=true}elem=elem.parentNode}}function expandSection(id){openParentDetails(document.getElementById(id))}function getHelpElement(build){if(build){buildHelperPopup()}return document.getElementById("help")}function displayHelp(display,ev,help){if(display){help=help?help:getHelpElement(true);if(hasClass(help,"hidden")){ev.preventDefault();removeClass(help,"hidden");addClass(document.body,"blur")}}else{help=help?help:getHelpElement(false);if(help&&!hasClass(help,"hidden")){ev.preventDefault();addClass(help,"hidden");removeClass(document.body,"blur")}}}function handleEscape(ev){var help=getHelpElement(false);var search=searchState.outputElement();if(help&&!hasClass(help,"hidden")){displayHelp(false,ev,help)}else if(search&&!hasClass(search,"hidden")){searchState.clearInputTimeout();ev.preventDefault();searchState.hideResults(search)}searchState.defocus();hideThemeButtonState()}var disableShortcuts=getSettingValue("disable-shortcuts")==="true";function handleShortcut(ev){if(ev.ctrlKey||ev.altKey||ev.metaKey||disableShortcuts){return}if(document.activeElement.tagName==="INPUT"){switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break}}else{switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break;case"s":case"S":displayHelp(false,ev);ev.preventDefault();searchState.focus();break;case"+":case"-":ev.preventDefault();toggleAllDocs();break;case"?":displayHelp(true,ev);break;case"t":case"T":displayHelp(false,ev);ev.preventDefault();var themePicker=getThemePickerElement();themePicker.click();themePicker.focus();break;default:if(getThemePickerElement().parentNode.contains(ev.target)){handleThemeKeyDown(ev)}}}}function handleThemeKeyDown(ev){var active=document.activeElement;var themes=getThemesElement();switch(getVirtualKey(ev)){case"ArrowUp":ev.preventDefault();if(active.previousElementSibling&&ev.target.id!==THEME_PICKER_ELEMENT_ID){active.previousElementSibling.focus()}else{showThemeButtonState();themes.lastElementChild.focus()}break;case"ArrowDown":ev.preventDefault();if(active.nextElementSibling&&ev.target.id!==THEME_PICKER_ELEMENT_ID){active.nextElementSibling.focus()}else{showThemeButtonState();themes.firstElementChild.focus()}break;case"Enter":case"Return":case"Space":if(ev.target.id===THEME_PICKER_ELEMENT_ID&&themes.style.display==="none"){ev.preventDefault();showThemeButtonState();themes.firstElementChild.focus()}break;case"Home":ev.preventDefault();themes.firstElementChild.focus();break;case"End":ev.preventDefault();themes.lastElementChild.focus();break}}document.addEventListener("keypress",handleShortcut);document.addEventListener("keydown",handleShortcut);(function(){var x=document.getElementsByClassName("version-selector");if(x.length>0){x[0].onchange=function(){var i,match,url=document.location.href,stripped="",len=window.rootPath.match(/\.\.\//g).length+1;for(i=0;i<len;++i){match=url.match(/\/[^/]*$/);if(i<len-1){stripped=match[0]+stripped}url=url.substring(0,url.length-match[0].length)}var selectedVersion=document.getElementsByClassName("version-selector")[0].value;url+="/"+selectedVersion+stripped;document.location.href=url}}}());window.initSidebarItems=function(items){var sidebar=document.getElementsByClassName("sidebar-elems")[0];var current=window.sidebarCurrent;function addSidebarCrates(crates){if(!hasClass(document.body,"crate")){return}var div=document.createElement("div");div.className="block crate";div.innerHTML="<h3>Crates</h3>";var ul=document.createElement("ul");div.appendChild(ul);for(var i=0;i<crates.length;++i){var klass="crate";if(window.rootPath!=="./"&&crates[i]===window.currentCrate){klass+=" current"}var link=document.createElement("a");link.href=window.rootPath+crates[i]+"/index.html";link.className=klass;link.textContent=crates[i];var li=document.createElement("li");li.appendChild(link);ul.appendChild(li)}sidebar.appendChild(div)}function block(shortty,longty){var filtered=items[shortty];if(!filtered){return}var div=document.createElement("div");div.className="block "+shortty;var h3=document.createElement("h3");h3.textContent=longty;div.appendChild(h3);var ul=document.createElement("ul");for(var i=0,len=filtered.length;i<len;++i){var item=filtered[i];var name=item[0];var desc=item[1];var klass=shortty;if(name===current.name&&shortty===current.ty){klass+=" current"}var path;if(shortty==="mod"){path=name+"/index.html"}else{path=shortty+"."+name+".html"}var link=document.createElement("a");link.href=current.relpath+path;link.title=desc;link.className=klass;link.textContent=name;var li=document.createElement("li");li.appendChild(link);ul.appendChild(li)}div.appendChild(ul);sidebar.appendChild(div)}if(sidebar){var isModule=hasClass(document.body,"mod");if(!isModule){block("primitive","Primitive Types");block("mod","Modules");block("macro","Macros");block("struct","Structs");block("enum","Enums");block("union","Unions");block("constant","Constants");block("static","Statics");block("trait","Traits");block("fn","Functions");block("type","Type Definitions");block("foreigntype","Foreign Types");block("keyword","Keywords");block("traitalias","Trait Aliases")}addSidebarCrates(window.ALL_CRATES)}};window.register_implementors=function(imp){var implementors=document.getElementById("implementors-list");var synthetic_implementors=document.getElementById("synthetic-implementors-list");if(synthetic_implementors){var inlined_types=new Set();onEachLazy(synthetic_implementors.getElementsByClassName("impl"),function(el){var aliases=el.getAttribute("data-aliases");if(!aliases){return}aliases.split(",").forEach(function(alias){inlined_types.add(alias)})})}var libs=Object.getOwnPropertyNames(imp);for(var i=0,llength=libs.length;i<llength;++i){if(libs[i]===window.currentCrate){continue}var structs=imp[libs[i]];struct_loop:for(var j=0,slength=structs.length;j<slength;++j){var struct=structs[j];var list=struct.synthetic?synthetic_implementors:implementors;if(struct.synthetic){for(var k=0,stlength=struct.types.length;k<stlength;k++){if(inlined_types.has(struct.types[k])){continue struct_loop}inlined_types.add(struct.types[k])}}var code=document.createElement("h3");code.innerHTML=struct.text;addClass(code,"code-header");addClass(code,"in-band");onEachLazy(code.getElementsByTagName("a"),function(elem){var href=elem.getAttribute("href");if(href&&href.indexOf("http")!==0){elem.setAttribute("href",window.rootPath+href)}});var display=document.createElement("h3");addClass(display,"impl");display.innerHTML="<span class=\"in-band\"><table class=\"table-display\">"+"<tbody><tr><td><code>"+code.outerHTML+"</code></td><td></td></tr>"+"</tbody></table></span>";list.appendChild(display)}}};if(window.pending_implementors){window.register_implementors(window.pending_implementors)}function labelForToggleButton(sectionIsCollapsed){if(sectionIsCollapsed){return"+"}return"\u2212"}function toggleAllDocs(){var innerToggle=document.getElementById(toggleAllDocsId);if(!innerToggle){return}var sectionIsCollapsed=false;if(hasClass(innerToggle,"will-expand")){removeClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("rustdoc-toggle"),function(e){if(!hasClass(e,"type-contents-toggle")){e.open=true}});innerToggle.title="collapse all docs"}else{addClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("rustdoc-toggle"),function(e){if(e.parentNode.id!=="main"||(!hasClass(e,"implementors-toggle")&&!hasClass(e,"type-contents-toggle"))){e.open=false}});sectionIsCollapsed=true;innerToggle.title="expand all docs"}innerToggle.children[0].innerText=labelForToggleButton(sectionIsCollapsed)}function insertAfter(newNode,referenceNode){referenceNode.parentNode.insertBefore(newNode,referenceNode.nextSibling)}(function(){var toggles=document.getElementById(toggleAllDocsId);if(toggles){toggles.onclick=toggleAllDocs}var hideMethodDocs=getSettingValue("auto-hide-method-docs")==="true";var hideImplementors=getSettingValue("auto-collapse-implementors")!=="false";var hideImplementations=getSettingValue("auto-hide-trait-implementations")!=="false";var hideLargeItemContents=getSettingValue("auto-hide-large-items")!=="false";function openImplementors(id){var list=document.getElementById(id);if(list!==null){onEachLazy(list.getElementsByClassName("implementors-toggle"),function(e){e.open=true})}}if(!hideImplementations){openImplementors("trait-implementations-list");openImplementors("blanket-implementations-list")}if(!hideImplementors){openImplementors("implementors-list")}onEachLazy(document.getElementsByClassName("rustdoc-toggle"),function(e){if(!hideLargeItemContents&&hasClass(e,"type-contents-toggle")){e.open=true}if(hideMethodDocs&&hasClass(e,"method-toggle")){e.open=false}});var pageId=getPageId();if(pageId!==null){expandSection(pageId)}}());(function(){var lineNumbersFunc=function(){};if(getSettingValue("line-numbers")==="true"){lineNumbersFunc=function(x){var count=x.textContent.split("\n").length;var elems=[];for(var i=0;i<count;++i){elems.push(i+1)}var node=document.createElement("pre");addClass(node,"line-number");node.innerHTML=elems.join("\n");x.parentNode.insertBefore(node,x)}}onEachLazy(document.getElementsByClassName("rust-example-rendered"),function(e){if(hasClass(e,"compile_fail")){e.addEventListener("mouseover",function(){this.parentElement.previousElementSibling.childNodes[0].style.color="#f00"});e.addEventListener("mouseout",function(){this.parentElement.previousElementSibling.childNodes[0].style.color=""})}else if(hasClass(e,"ignore")){e.addEventListener("mouseover",function(){this.parentElement.previousElementSibling.childNodes[0].style.color="#ff9200"});e.addEventListener("mouseout",function(){this.parentElement.previousElementSibling.childNodes[0].style.color=""})}lineNumbersFunc(e)})}());function handleClick(id,f){var elem=document.getElementById(id);if(elem){elem.addEventListener("click",f)}}handleClick("help-button",function(ev){displayHelp(true,ev)});onEachLazy(document.getElementsByTagName("a"),function(el){if(el.hash){el.addEventListener("click",function(){expandSection(el.hash.slice(1))})}});onEachLazy(document.getElementsByClassName("notable-traits"),function(e){e.onclick=function(){this.getElementsByClassName('notable-traits-tooltiptext')[0].classList.toggle("force-tooltip")}});var sidebar_menu=document.getElementsByClassName("sidebar-menu")[0];if(sidebar_menu){sidebar_menu.onclick=function(){var sidebar=document.getElementsByClassName("sidebar")[0];if(hasClass(sidebar,"mobile")){hideSidebar()}else{showSidebar()}}}var buildHelperPopup=function(){var popup=document.createElement("aside");addClass(popup,"hidden");popup.id="help";popup.addEventListener("click",function(ev){if(ev.target===popup){displayHelp(false,ev)}});var book_info=document.createElement("span");book_info.innerHTML="You can find more information in \ + <a href=\"https://doc.rust-lang.org/rustdoc/\">the rustdoc book</a>.";var container=document.createElement("div");var shortcuts=[["?","Show this help dialog"],["S","Focus the search field"],["T","Focus the theme picker menu"],["↑","Move up in search results"],["↓","Move down in search results"],["← / →","Switch result tab (when results focused)"],["⏎","Go to active search result"],["+","Expand all sections"],["-","Collapse all sections"],].map(function(x){return"<dt>"+x[0].split(" ").map(function(y,index){return(index&1)===0?"<kbd>"+y+"</kbd>":" "+y+" "}).join("")+"</dt><dd>"+x[1]+"</dd>"}).join("");var div_shortcuts=document.createElement("div");addClass(div_shortcuts,"shortcuts");div_shortcuts.innerHTML="<h2>Keyboard Shortcuts</h2><dl>"+shortcuts+"</dl></div>";var infos=["Prefix searches with a type followed by a colon (e.g., <code>fn:</code>) to \ + restrict the search to a given item kind.","Accepted kinds are: <code>fn</code>, <code>mod</code>, <code>struct</code>, \ + <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, \ + and <code>const</code>.","Search functions by type signature (e.g., <code>vec -> usize</code> or \ + <code>* -> vec</code>)","Search multiple things at once by splitting your query with comma (e.g., \ + <code>str,u8</code> or <code>String,struct:Vec,test</code>)","You can look for items with an exact name by putting double quotes around \ + your request: <code>\"string\"</code>","Look for items inside another one by searching for a path: <code>vec::Vec</code>",].map(function(x){return"<p>"+x+"</p>"}).join("");var div_infos=document.createElement("div");addClass(div_infos,"infos");div_infos.innerHTML="<h2>Search Tricks</h2>"+infos;container.appendChild(book_info);container.appendChild(div_shortcuts);container.appendChild(div_infos);popup.appendChild(container);insertAfter(popup,searchState.outputElement());buildHelperPopup=function(){}};onHashChange(null);window.addEventListener("hashchange",onHashChange);searchState.setup()}());(function(){var reset_button_timeout=null;window.copy_path=function(but){var parent=but.parentElement;var path=[];onEach(parent.childNodes,function(child){if(child.tagName==='A'){path.push(child.textContent)}});var el=document.createElement('textarea');el.value='use '+path.join('::')+';';el.setAttribute('readonly','');el.style.position='absolute';el.style.left='-9999px';document.body.appendChild(el);el.select();document.execCommand('copy');document.body.removeChild(el);but.children[0].style.display='none';var tmp;if(but.childNodes.length<2){tmp=document.createTextNode('✓');but.appendChild(tmp)}else{onEachLazy(but.childNodes,function(e){if(e.nodeType===Node.TEXT_NODE){tmp=e;return true}});tmp.textContent='✓'}if(reset_button_timeout!==null){window.clearTimeout(reset_button_timeout)}function reset_button(){tmp.textContent='';reset_button_timeout=null;but.children[0].style.display=""}reset_button_timeout=window.setTimeout(reset_button,1000)}}())
\ No newline at end of file diff --git a/normalize.css b/normalize.css new file mode 100644 index 0000000..6d692b5 --- /dev/null +++ b/normalize.css @@ -0,0 +1,2 @@ + /*! normalize.css v3.0.0 | MIT License | git.io/normalize */ +html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}
\ No newline at end of file diff --git a/noscript.css b/noscript.css new file mode 100644 index 0000000..aea68ef --- /dev/null +++ b/noscript.css @@ -0,0 +1 @@ + #main .attributes{margin-left:0 !important;}#copy-path{display:none;}
\ No newline at end of file diff --git a/noto-sans-kr-v13-korean-regular-LICENSE.txt b/noto-sans-kr-v13-korean-regular-LICENSE.txt new file mode 100644 index 0000000..922d5fd --- /dev/null +++ b/noto-sans-kr-v13-korean-regular-LICENSE.txt @@ -0,0 +1,93 @@ +Copyright 2014, 2015 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. + +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/noto-sans-kr-v13-korean-regular.woff b/noto-sans-kr-v13-korean-regular.woff Binary files differnew file mode 100644 index 0000000..01d6b6b --- /dev/null +++ b/noto-sans-kr-v13-korean-regular.woff diff --git a/rust-logo.png b/rust-logo.png Binary files differnew file mode 100644 index 0000000..74b4bd6 --- /dev/null +++ b/rust-logo.png diff --git a/rustdoc.css b/rustdoc.css new file mode 100644 index 0000000..9b9be79 --- /dev/null +++ b/rustdoc.css @@ -0,0 +1 @@ + @font-face {font-family:'Fira Sans';font-style:normal;font-weight:400;src:local('Fira Sans'),url("FiraSans-Regular.woff2") format("woff2"),url("FiraSans-Regular.woff") format('woff');font-display:swap;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium.woff2") format("woff2"),url("FiraSans-Medium.woff") format('woff');font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:400;src:local('Source Serif 4'),url("SourceSerif4-Regular.ttf.woff") format('woff');font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:italic;font-weight:400;src:local('Source Serif 4 Italic'),url("SourceSerif4-It.ttf.woff") format('woff');font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:700;src:local('Source Serif 4 Bold'),url("SourceSerif4-Bold.ttf.woff") format('woff');font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular.ttf.woff") format('woff');font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:italic;font-weight:400;src:url("SourceCodePro-It.ttf.woff") format('woff');font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold.ttf.woff") format('woff');font-display:swap;}@font-face {font-family:'Noto Sans KR';src:url("noto-sans-kr-v13-korean-regular.woff") format("woff");font-display:swap;unicode-range:U+A960-A97F,U+AC00-D7AF,U+D7B0-D7FF;}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}html{content:"";}@media (prefers-color-scheme:light){html{content:"light";}}@media (prefers-color-scheme:dark){html{content:"dark";}}body{font:16px/1.4 "Source Serif 4","Noto Sans KR",serif;margin:0;position:relative;padding:10px 15px 20px 15px;-webkit-font-feature-settings:"kern","liga";-moz-font-feature-settings:"kern","liga";font-feature-settings:"kern","liga";}h1{font-size:1.5em;}h2{font-size:1.4em;}h3{font-size:1.3em;}h1,h2,h3,h4{font-weight:500;margin:20px 0 15px 0;padding-bottom:6px;}h1.fqn{display:flex;border-bottom:1px dashed;margin-top:0;padding-left:1px;}h1.fqn>.in-band>a:hover{text-decoration:underline;}#main>h2,#main>h3,#main>h4{border-bottom:1px solid;}h3.code-header,h4.code-header{font-size:1em;font-weight:600;border:none;padding:0;margin:0;}.impl,.impl-items .method,.methods .method,.impl-items .type,.methods .type,.impl-items .associatedconstant,.methods .associatedconstant,.impl-items .associatedtype,.methods .associatedtype{flex-basis:100%;font-weight:600;margin-top:16px;margin-bottom:10px;position:relative;}.impl,.method.trait-impl,.type.trait-impl,.associatedconstant.trait-impl,.associatedtype.trait-impl{padding-left:15px;}div.impl-items>div{padding-left:0;}h1,h2,h3,h4,.sidebar,a.source,.search-input,.search-results .result-name,.content table td:first-child>a,div.item-list .out-of-band,span.since,#source-sidebar,#sidebar-toggle,details.rustdoc-toggle>summary::before,details.undocumented>summary::before,div.impl-items>div:not(.docblock):not(.item-info),.content ul.crate a.crate,a.srclink,#main>ul.docblock>li>a{font-family:"Fira Sans",Arial,sans-serif;}.content ul.crate a.crate{font-size:16px/1.6;}ol,ul{padding-left:25px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.6em;}p{margin:0 0 .6em 0;}summary{outline:none;}td,th{padding:0;}table{border-collapse:collapse;}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0;}details:not(.rustdoc-toggle) summary{margin-bottom:.6em;}code,pre,a.test-arrow,.code-header{font-family:"Source Code Pro",monospace;}.docblock code,.docblock-short code{border-radius:3px;padding:0 0.1em;}.docblock pre code,.docblock-short pre code{padding:0;padding-right:1ex;}pre{padding:14px;}.source .content pre{padding:20px;}img{max-width:100%;}li{position:relative;}.source .content{margin-top:50px;max-width:none;overflow:visible;margin-left:0px;}nav.sub{font-size:16px;text-transform:uppercase;}.sidebar{width:200px;position:fixed;left:0;top:0;bottom:0;overflow:auto;}*{scrollbar-width:initial;}.sidebar{scrollbar-width:thin;}::-webkit-scrollbar{width:12px;}.sidebar::-webkit-scrollbar{width:8px;}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0;}.sidebar .block>ul>li{margin-right:-10px;}.content,nav{max-width:960px;}.hidden{display:none !important;}.logo-container{height:100px;width:100px;position:relative;margin:20px auto;display:block;margin-top:10px;}.logo-container>img{max-width:100px;max-height:100px;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:block;}.sidebar .location{border:1px solid;font-size:17px;margin:30px 10px 20px 10px;text-align:center;word-wrap:break-word;font-weight:inherit;padding:0;}.sidebar .version{font-size:15px;text-align:center;border-bottom:1px solid;overflow-wrap:break-word;word-wrap:break-word;word-break:break-word;}.location:empty{border:none;}.location a:first-of-type{font-weight:500;}.location a:hover{text-decoration:underline;}.block{padding:0;margin-bottom:14px;}.block h2,.block h3{text-align:center;}.block ul,.block li{margin:0 10px;padding:0;list-style:none;}.block a{display:block;text-overflow:ellipsis;overflow:hidden;line-height:15px;padding:7px 5px;font-size:14px;font-weight:300;transition:border 500ms ease-out;}.sidebar-title{border-top:1px solid;border-bottom:1px solid;text-align:center;font-size:17px;margin-bottom:5px;font-weight:inherit;padding:0;}.sidebar-links{margin-bottom:15px;}.sidebar-links>a{padding-left:10px;width:100%;}.sidebar-menu{display:none;}.content{padding:15px 0;}.source .content pre.rust{white-space:pre;overflow:auto;padding-left:0;}.rustdoc .example-wrap{display:inline-flex;margin-bottom:10px;}.example-wrap{position:relative;width:100%;}.example-wrap>pre.line-number{overflow:initial;border:1px solid;padding:13px 8px;text-align:right;border-top-left-radius:5px;border-bottom-left-radius:5px;}.rustdoc:not(.source) .example-wrap>pre.rust{width:100%;overflow-x:auto;}.rustdoc .example-wrap>pre{margin:0;}#search{margin-left:230px;position:relative;}#results>table{width:100%;table-layout:fixed;}.content>.example-wrap pre.line-numbers{position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}.line-numbers span{cursor:pointer;}.docblock-short{overflow-wrap:anywhere;}.docblock-short p{display:inline;}.docblock-short p{overflow:hidden;text-overflow:ellipsis;margin:0;}.docblock>:not(pre)>code,.docblock-short>:not(pre)>code{white-space:pre-wrap;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom:1px solid;}.top-doc .docblock h1{font-size:1.3em;}.top-doc .docblock h2{font-size:1.15em;}.top-doc .docblock h3,.top-doc .docblock h4,.top-doc .docblock h5{font-size:1em;}.docblock h1{font-size:1em;}.docblock h2{font-size:0.95em;}.docblock h3,.docblock h4,.docblock h5{font-size:0.9em;}.docblock{margin-left:24px;position:relative;}.content .out-of-band{flex-grow:0;text-align:right;font-size:23px;margin:0px;padding:0 0 0 12px;font-weight:normal;}.method>.code-header,.trait-impl>.code-header,.invisible>.code-header{max-width:calc(100% - 41px);display:block;flex-grow:1;}.invisible{width:100%;display:inline-block;}.content .in-band{flex-grow:1;margin:0px;padding:0px;}.in-band>code,.in-band>.code-header{display:inline-block;}#main{position:relative;}#main>.since{top:inherit;font-family:"Fira Sans",Arial,sans-serif;}.content table:not(.table-display){border-spacing:0 5px;}.content td{vertical-align:top;}.content td:first-child{padding-right:20px;}.content td p:first-child{margin-top:0;}.content td h1,.content td h2{margin-left:0;font-size:1.1em;}.content tr:first-child td{border-top:0;}.docblock table{margin:.5em 0;width:calc(100% - 2px);border:1px dashed;}.docblock table td{padding:.5em;border:1px dashed;}.docblock table th{padding:.5em;text-align:left;border:1px solid;}.fields+table{margin-bottom:1em;}.content .item-list{list-style-type:none;padding:0;}.content .multi-column{-moz-column-count:5;-moz-column-gap:2.5em;-webkit-column-count:5;-webkit-column-gap:2.5em;column-count:5;column-gap:2.5em;}.content .multi-column li{width:100%;display:inline-block;}.content>.methods>.method{font-size:1em;position:relative;}.content .method .where,.content .fn .where,.content .where.fmt-newline{display:block;font-size:0.8em;}.content .methods>div:not(.notable-traits):not(.method){margin-left:40px;margin-bottom:15px;}.content .docblock>.impl-items{margin-left:20px;margin-top:-34px;}.content .docblock>.impl-items .table-display{margin:0;}.content .docblock>.impl-items table td{padding:0;}.content .docblock>.impl-items .table-display,.impl-items table td{border:none;}.content .item-info code{font-size:90%;}.content .item-info{position:relative;margin-left:33px;margin-top:-6px;}.sub-variant>div>.item-info{margin-top:initial;}.content .item-info::before{content:'⬑';font-size:25px;position:absolute;top:0px;left:-19px;}.content .impl-items .method,.content .impl-items>.type,.impl-items>.associatedconstant,.impl-items>.associatedtype,.content .impl-items details>summary>.type,.impl-items details>summary>.associatedconstant,.impl-items details>summary>.associatedtype{margin-left:20px;}.content .impl-items .docblock,.content .impl-items .item-info{margin-bottom:.6em;}.content .impl-items>.item-info{margin-left:40px;}.methods>.item-info,.content .impl-items>.item-info{margin-top:-8px;}.impl-items{flex-basis:100%;}#main>.item-info{margin-top:0;}nav:not(.sidebar){border-bottom:1px solid;padding-bottom:10px;margin-bottom:10px;}nav.main{padding:20px 0;text-align:center;}nav.main .current{border-top:1px solid;border-bottom:1px solid;}nav.main .separator{border:1px solid;display:inline-block;height:23px;margin:0 20px;}nav.sum{text-align:right;}nav.sub form{display:inline;}nav.sub,.content{margin-left:230px;}a{text-decoration:none;background:transparent;}.small-section-header:hover>.anchor{display:initial;}.in-band:hover>.anchor,.impl:hover>.anchor,.method.trait-impl:hover>.anchor,.type.trait-impl:hover>.anchor,.associatedconstant.trait-impl:hover>.anchor,.associatedtype.trait-impl:hover>.anchor{display:inline-block;position:absolute;}.anchor{display:none;position:absolute;left:-7px;}.anchor.field{left:-5px;}.small-section-header>.anchor{left:-28px;padding-right:10px;}.anchor:before{content:'\2002\00a7\2002';}.docblock a:not(.srclink):not(.test-arrow):hover,.docblock-short a:not(.srclink):not(.test-arrow):hover,.item-info a{text-decoration:underline;}.invisible>.srclink,.method>.code-header+.srclink{position:absolute;top:0;right:0;font-size:17px;font-weight:normal;}.block a.current.crate{font-weight:500;}.search-container{position:relative;}.search-container>div{display:inline-flex;width:calc(100% - 63px);}#crate-search{min-width:115px;margin-top:5px;padding:6px;padding-right:19px;flex:none;border:0;border-right:0;border-radius:4px 0 0 4px;outline:none;cursor:pointer;border-right:1px solid;-moz-appearance:none;-webkit-appearance:none;text-indent:0.01px;text-overflow:"";background-repeat:no-repeat;background-color:transparent;background-size:20px;background-position:calc(100% - 1px) 56%;}.search-container>.top-button{position:absolute;right:0;top:10px;}.search-input{-moz-box-sizing:border-box !important;box-sizing:border-box !important;outline:none;border:none;border-radius:1px;margin-top:5px;padding:10px 16px;font-size:17px;transition:border-color 300ms ease;transition:border-radius 300ms ease-in-out;transition:box-shadow 300ms ease-in-out;width:100%;}#crate-search+.search-input{border-radius:0 1px 1px 0;width:calc(100% - 32px);}.search-input:focus{border-radius:2px;border:0;outline:0;}.search-results{display:none;padding-bottom:2em;}.search-results.active{display:block;clear:both;}.search-results .desc>span{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:block;}.search-results>a{display:block;width:100%;margin-left:2px;margin-right:2px;border-bottom:1px solid #aaa3;}.search-results>a>div{display:flex;flex-flow:row wrap;}.search-results .result-name,.search-results div.desc,.search-results .result-description{width:50%;}.search-results .result-name{padding-right:1em;}.search-results .result-name>span{display:inline-block;margin:0;font-weight:normal;}body.blur>:not(#help){filter:blur(8px);-webkit-filter:blur(8px);opacity:.7;}#help{width:100%;height:100vh;position:fixed;top:0;left:0;display:flex;justify-content:center;align-items:center;}#help>div{flex:0 0 auto;box-shadow:0 0 6px rgba(0,0,0,.2);width:550px;height:auto;border:1px solid;}#help dt{float:left;clear:left;display:block;margin-right:0.5rem;}#help>div>span{text-align:center;display:block;margin:10px 0;font-size:18px;border-bottom:1px solid #ccc;padding-bottom:4px;margin-bottom:6px;}#help dd{margin:5px 35px;}#help .infos{padding-left:0;}#help h1,#help h2{margin-top:0;}#help>div div{width:50%;float:left;padding:0 20px 20px 17px;;}.stab{display:table;border-width:1px;border-style:solid;padding:3px;margin-bottom:5px;font-size:90%;}.stab p{display:inline;}.stab summary{display:list-item;}.stab .emoji{font-size:1.5em;}.emoji{text-shadow:1px 0 0 black,-1px 0 0 black,0 1px 0 black,0 -1px 0 black;}.module-item .stab,.import-item .stab{border-radius:3px;display:inline-block;font-size:80%;line-height:1.2;margin-bottom:0;margin-right:.3em;padding:2px;vertical-align:text-bottom;}.module-item.unstable,.import-item.unstable{opacity:0.65;}.since{font-weight:normal;font-size:initial;position:absolute;right:0;top:0;}.impl-items .since,.impl .since,.methods .since{flex-grow:0;padding-left:12px;padding-right:6px;position:initial;}.impl-items .srclink,.impl .srclink,.methods .srclink{flex-grow:0;font-size:17px;font-weight:normal;}.impl-items code,.impl code,.methods code{flex-grow:1;}.has-srclink{display:flex;flex-basis:100%;font-size:16px;margin-bottom:12px;justify-content:space-between;}.variants_table{width:100%;}.variants_table tbody tr td:first-child{width:1%;}td.summary-column{width:100%;}.summary{padding-right:0px;}pre.rust .question-mark{font-weight:bold;}a.test-arrow{display:inline-block;position:absolute;padding:5px 10px 5px 10px;border-radius:5px;font-size:130%;top:5px;right:5px;z-index:1;}a.test-arrow:hover{text-decoration:none;}.section-header:hover a:before{position:absolute;left:-25px;padding-right:10px;content:'\2002\00a7\2002';}.section-header:hover a{text-decoration:none;}.section-header a{color:inherit;}.code-attribute{font-weight:300;}.since+.srclink{display:table-cell;padding-left:10px;}.item-spacer{width:100%;height:12px;}.out-of-band>span.since{position:initial;font-size:20px;margin-right:5px;}.sub-variant,.sub-variant>h3{margin-top:0px !important;padding-top:1px;}#main>details>.sub-variant>h3{font-size:15px;margin-left:25px;margin-bottom:5px;}.sub-variant>div{margin-left:20px;margin-bottom:10px;}.sub-variant>div>span{display:block;position:relative;}.toggle-label{display:inline-block;margin-left:4px;margin-top:3px;}.docblock>.section-header:first-child{margin-left:15px;margin-top:0;}.docblock>.section-header:first-child:hover>a:before{left:-10px;}#main>.variant,#main>.structfield{display:block;}:target>code,:target>.code-header{opacity:1;}.information{position:absolute;left:-25px;margin-top:7px;z-index:1;}.tooltip{position:relative;display:inline-block;cursor:pointer;}.tooltip::after{display:none;text-align:center;padding:5px 3px 3px 3px;border-radius:6px;margin-left:5px;font-size:16px;}.tooltip.ignore::after{content:"This example is not tested";}.tooltip.compile_fail::after{content:"This example deliberately fails to compile";}.tooltip.should_panic::after{content:"This example panics";}.tooltip.edition::after{content:"This code runs with edition " attr(data-edition);}.tooltip::before{content:" ";position:absolute;top:50%;left:16px;margin-top:-5px;border-width:5px;border-style:solid;display:none;}.tooltip:hover::before,.tooltip:hover::after{display:inline;}.tooltip.compile_fail,.tooltip.should_panic,.tooltip.ignore{font-weight:bold;font-size:20px;}.notable-traits-tooltip{display:inline-block;cursor:pointer;}.notable-traits:hover .notable-traits-tooltiptext,.notable-traits .notable-traits-tooltiptext.force-tooltip{display:inline-block;}.notable-traits .notable-traits-tooltiptext{display:none;padding:5px 3px 3px 3px;border-radius:6px;margin-left:5px;z-index:10;font-size:16px;cursor:default;position:absolute;border:1px solid;}.notable-traits-tooltip::after{content:"\00a0\00a0\00a0";}.notable-traits .notable,.notable-traits .docblock{margin:0;}.notable-traits .notable{margin:0;margin-bottom:13px;font-size:19px;font-weight:600;}.notable-traits .docblock code.content{margin:0;padding:0;font-size:20px;}pre.rust.rust-example-rendered{position:relative;}pre.rust{tab-size:4;-moz-tab-size:4;}.search-failed{text-align:center;margin-top:20px;display:none;}.search-failed.active{display:block;}.search-failed>ul{text-align:left;max-width:570px;margin-left:auto;margin-right:auto;}#titles{height:35px;}#titles>button{float:left;width:33.3%;text-align:center;font-size:18px;cursor:pointer;border:0;border-top:2px solid;}#titles>button:not(:last-child){margin-right:1px;width:calc(33.3% - 1px);}#titles>button>div.count{display:inline-block;font-size:16px;}.notable-traits{cursor:pointer;z-index:2;margin-left:5px;}#all-types{text-align:center;border:1px solid;margin:0 10px;margin-bottom:10px;display:block;border-radius:7px;}#all-types>p{margin:5px 0;}#sidebar-toggle{position:fixed;top:30px;left:300px;z-index:10;padding:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;cursor:pointer;font-weight:bold;transition:left .5s;font-size:1.2em;border:1px solid;border-left:0;}#source-sidebar{position:fixed;top:0;bottom:0;left:0;width:300px;z-index:1;overflow:auto;transition:left .5s;border-right:1px solid;}#source-sidebar>.title{font-size:1.5em;text-align:center;border-bottom:1px solid;margin-bottom:6px;}.theme-picker{position:absolute;left:211px;top:19px;}.theme-picker button{outline:none;}#settings-menu,#help-button{position:absolute;top:10px;}#settings-menu{right:0;outline:none;}#theme-picker,#settings-menu,#help-button,#copy-path{padding:4px;width:27px;height:29px;border:1px solid;border-radius:3px;cursor:pointer;}#help-button{right:30px;font-family:"Fira Sans",Arial,sans-serif;text-align:center;font-size:17px;padding-top:2px;}#copy-path{background:initial;margin-left:10px;padding:0;padding-left:2px;border:0;}#theme-choices{display:none;position:absolute;left:0;top:28px;border:1px solid;border-radius:3px;z-index:1;cursor:pointer;}#theme-choices>button{border:none;width:100%;padding:4px 8px;text-align:center;background:rgba(0,0,0,0);}#theme-choices>button:not(:first-child){border-top:1px solid;}kbd{display:inline-block;padding:3px 5px;font:15px monospace;line-height:10px;vertical-align:middle;border:solid 1px;border-radius:3px;box-shadow:inset 0 -1px 0;cursor:default;}.hidden-by-impl-hider,.hidden-by-usual-hider{display:none !important;}#implementations-list>h3>span.in-band{width:100%;}.table-display{width:100%;border:0;border-collapse:collapse;border-spacing:0;font-size:16px;}.table-display tr td:first-child{padding-right:0;}.table-display tr td:last-child{float:right;}.table-display .out-of-band{position:relative;font-size:19px;display:block;}#implementors-list>.impl-items .table-display .out-of-band{font-size:17px;}.table-display td:hover .anchor{display:block;top:2px;left:-5px;}#main>ul{padding-left:10px;}#main>ul>li{list-style:none;}.non-exhaustive{margin-bottom:1em;}div.children{padding-left:27px;display:none;}div.name{cursor:pointer;position:relative;margin-left:16px;}div.files>a{display:block;padding:0 3px;}div.files>a:hover,div.name:hover{background-color:#a14b4b;}div.name.expand+.children{display:block;}div.name::before{content:"\25B6";padding-left:4px;font-size:0.7em;position:absolute;left:-16px;top:4px;}div.name.expand::before{transform:rotate(90deg);left:-15px;top:2px;}details.rustdoc-toggle>summary.hideme{cursor:pointer;}details.rustdoc-toggle>summary,details.undocumented>summary{list-style:none;}details.rustdoc-toggle>summary::-webkit-details-marker,details.rustdoc-toggle>summary::marker,details.undocumented>summary::-webkit-details-marker,details.undocumented>summary::marker{display:none;}details.rustdoc-toggle>summary.hideme>span{margin-left:9px;}details.rustdoc-toggle>summary::before{content:"[+]";font-weight:300;font-size:0.8em;letter-spacing:1px;cursor:pointer;}details.rustdoc-toggle.top-doc>summary,details.rustdoc-toggle.top-doc>summary::before,details.rustdoc-toggle.non-exhaustive>summary,details.rustdoc-toggle.non-exhaustive>summary::before{font-family:'Fira Sans';font-size:16px;}details.non-exhaustive{margin-bottom:8px;}details.rustdoc-toggle>summary.hideme::before{position:relative;}details.rustdoc-toggle>summary:not(.hideme)::before{position:absolute;left:-23px;top:3px;}.impl-items>details.rustdoc-toggle>summary:not(.hideme)::before,.undocumented>details.rustdoc-toggle>summary:not(.hideme)::before{position:absolute;left:-2px;}details.rustdoc-toggle[open] >summary.hideme{position:absolute;}details.rustdoc-toggle,details.undocumented{position:relative;}details.rustdoc-toggle[open] >summary.hideme>span{display:none;}details.rustdoc-toggle[open] >summary::before{content:"[−]";display:inline;}details.undocumented>summary::before{content:"[+] Show hidden undocumented items";cursor:pointer;font-size:16px;font-weight:300;}details.undocumented[open] >summary::before{content:"[−] Hide undocumented items";}@media (min-width:701px){.docblock>.information:first-child>.tooltip{margin-top:16px;}}@media (max-width:700px){body{padding-top:0px;}.rustdoc>.sidebar{height:45px;min-height:40px;margin:0;margin-left:-15px;padding:0 15px;position:static;z-index:11;}.sidebar>.location{float:right;margin:0px;margin-top:2px;padding:3px 10px 1px 10px;min-height:39px;background:inherit;text-align:left;font-size:24px;}.sidebar .location:empty{padding:0;}.sidebar .logo-container{width:35px;height:35px;margin-top:5px;margin-bottom:5px;float:left;margin-left:50px;}.sidebar .logo-container>img{max-width:35px;max-height:35px;}.sidebar-menu{position:fixed;z-index:10;font-size:2rem;cursor:pointer;width:45px;left:0;text-align:center;display:block;border-bottom:1px solid;border-right:1px solid;height:45px;}.rustdoc.source>.sidebar>.sidebar-menu{display:none;}.sidebar-elems{position:fixed;z-index:1;top:45px;bottom:0;width:246px;left:-246px;overflow-y:auto;border-right:1px solid;}.sidebar>.block.version{border-bottom:none;margin-top:12px;margin-bottom:0;}nav.sub{width:calc(100% - 32px);float:right;}.content{margin-left:0px;}#main,#search{margin-top:45px;padding:0;}#search{margin-left:0;}.content .impl-items .method,.content .impl-items>.type,.impl-items>.associatedconstant,.impl-items>.associatedtype{display:flex;}.anchor{display:none !important;}.theme-picker{left:10px;top:54px;z-index:1;}.notable-traits{position:absolute;left:-22px;top:24px;}#titles>button>div.count{float:left;width:100%;}#titles{height:50px;}.sidebar.mobile{position:fixed;width:100%;margin-left:0;background-color:rgba(0,0,0,0);height:100%;}.sidebar.mobile>div.version{overflow:hidden;max-height:33px;}.sidebar{width:calc(100% + 30px);}.show-it{left:0;}.show-it>.block.items{margin:8px 0;}.show-it>.block.items>ul{margin:0;}.show-it>.block.items>ul>li{text-align:center;margin:2px 0;}.show-it>.block.items>ul>li>a{font-size:21px;}#sidebar-filler{position:fixed;left:45px;width:calc(100% - 45px);top:0;height:45px;z-index:-1;border-bottom:1px solid;}#main>details.rustdoc-toggle>summary::before,#main>div>details.rustdoc-toggle>summary::before{left:-11px;}#all-types{margin:10px;}#sidebar-toggle{top:100px;width:30px;font-size:1.5rem;text-align:center;padding:0;}#source-sidebar{z-index:11;}#main>.line-numbers{margin-top:0;}.notable-traits .notable-traits-tooltiptext{left:0;top:100%;}#help-button{display:none;}.search-container>div{width:calc(100% - 32px);}.search-results>a{border-bottom:1px solid #aaa9;padding:5px 0px;}.search-results .result-name,.search-results div.desc,.search-results .result-description{width:100%;}.search-results div.desc,.search-results .result-description{padding-left:2em;}}@media print{nav.sub,.content .out-of-band{display:none;}}@media (max-width:464px){#titles,#titles>button{height:73px;}#main,#search{margin-top:100px;}#main>table:not(.table-display) td{word-break:break-word;width:50%;}.search-container>div{display:block;width:calc(100% - 37px);}#crate-search{width:100%;border-radius:4px;border:0;}#crate-search+.search-input{width:calc(100% + 71px);margin-left:-36px;}#theme-picker,#settings-menu{padding:5px;width:31px;height:31px;}#theme-picker{margin-top:-2px;}#settings-menu{top:7px;}.docblock{margin-left:12px;}}
\ No newline at end of file diff --git a/search-index.js b/search-index.js new file mode 100644 index 0000000..ee80716 --- /dev/null +++ b/search-index.js @@ -0,0 +1,4 @@ +var searchIndex = JSON.parse('{\ +"llvm_kaleidoscope_rs":{"doc":"","t":[13,13,4,17,3,11,11,11,11,11,0,11,11,11,11,11,11,0,0,11,11,0,11,11,11,11,11,11,11,3,11,11,11,11,11,11,11,11,13,13,13,13,13,3,13,4,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,3,3,3,3,3,3,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,13,13,4,3,13,3,3,13,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11],"n":["A","B","Either","SMALL_STR_SIZE","SmallCStr","as_ptr","borrow","borrow","borrow_mut","borrow_mut","codegen","eq","fmt","from","from","into","into","lexer","llvm","ne","new","parser","try_from","try_from","try_from","try_into","try_into","type_id","type_id","Codegen","borrow","borrow_mut","compile","from","into","try_from","try_into","type_id","Char","Def","Eof","Extern","Identifier","Lexer","Number","Token","borrow","borrow","borrow_mut","borrow_mut","eq","fmt","from","from","gettok","into","into","ne","new","try_from","try_from","try_into","try_into","type_id","type_id","BasicBlock","Builder","FnValue","Module","Type","Value","add_fn","append_basic_block","arg","args","basic_blocks","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","call","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","const_f64","deref","drop","drop","dump","dump","dump","fadd","fcmpult","fmul","from","from","from","from","from","from","fsub","get_fn","get_name","into","into","into","into","into","into","is_f64","is_int","new","pos_at_end","ret","ret_type","set_name","to_owned","to_owned","to_owned","to_owned","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","type_f64","type_fn","type_id","type_id","type_id","type_id","type_id","type_id","type_of","uitofp","verify","with_ctx","0","0","1","1","Binary","Call","ExprAST","FunctionAST","Number","Parser","PrototypeAST","Variable","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","cur_tok","eq","eq","eq","fmt","fmt","fmt","from","from","from","from","get_next_token","into","into","into","into","ne","ne","ne","new","parse_definition","parse_extern","parse_top_level_expr","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id"],"q":["llvm_kaleidoscope_rs","","","","","","","","","","","","","","","","","","","","","","","","","","","","","llvm_kaleidoscope_rs::codegen","","","","","","","","","llvm_kaleidoscope_rs::lexer","","","","","","","","","","","","","","","","","","","","","","","","","","","llvm_kaleidoscope_rs::llvm","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","llvm_kaleidoscope_rs::parser","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"d":["","","Either type, for APIs accepting two types.","Fixed size of [<code>SmallCStr</code>] including the trailing <code>\\\\0</code> byte.","Small C string on the stack with fixed size […","Return pointer to C string.","","","","","","","","","","","","","Safe wrapper around the LLVM C API.","","Create a new C string from <code>src</code>. Returns [<code>None</code>] if <code>src</code> …","","","","","","","","","Code generator from kaleidoscope AST to LLVM IR.","","","Compile either a [<code>PrototypeAST</code>] or a [<code>FunctionAST</code>] into …","","","","","","","","","","","","","","","","","","","","","","Lex and return the next token.","","","","","","","","","","","Wrapper for a LLVM Basic Block.","Wrapper for a LLVM IR Builder.","Wrapper for a LLVM Value Reference specialized for …","Wrapper for a LLVM Module with its own LLVM Context.","Wrapper for a LLVM Type Reference.","Wrapper for a LLVM Value Reference.","Add a function with the given <code>name</code> and <code>fn_type</code> to the …","Append a Basic Block to the end of the function …","Get a value reference for the function argument at index …","Get the number of function arguments for the given …","Get the number of Basic Blocks for the given function …","","","","","","","","","","","","","Emit a call instruction.","","","","","","","","","Get a value reference representing the const <code>f64</code> value.","","","","Dump LLVM IR emitted into the Module to stdout.","Dump the LLVM Type to stdout.","Dump the LLVM Value to stdout.","Emit a fadd instruction.","Emit a fcmult instruction.","Emit a fmul instruction.","","","","","","","Emit a fsub instruction.","Get a function value reference to the function with the …","Get the name for the given value reference.","","","","","","","Check if value is of <code>f64</code> type.","Check if value is of integer type.","Create a new Module instance.","Position the IR Builder at the end of the given Basic …","Emit a ret instruction.","Get a type reference representing the return value of the …","Set the name for the given value reference.","","","","","","","","","","","","","","","","","Get a type reference representing a <code>f64</code> float.","Get a type reference representing a <code>fn(args) -> ret</code> …","","","","","","","Get a type reference representing for the given value …","Emit a uitofp instruction.","Verify that the given function is valid.","Create a new LLVM IR Builder with the <code>module</code>s context.","","","","","Binary - Expression class for a binary operator.","Call - Expression class for function calls.","","FunctionAST - This class represents a function definition …","Number - Expression class for numeric literals like “1.0…","Parser for the <code>kaleidoscope</code> language.","PrototypeAST - This class represents the “prototype” …","Variable - Expression class for referencing a variable, …","","","","","","","","","Implement the global variable <code>int CurTok;</code> from the …","","","","","","","","","","","Advance the <code>cur_tok</code> by getting the next token from the …","","","","","","","","","definition ::= ‘def’ prototype expression","external ::= ‘extern’ prototype","toplevelexpr ::= expression","","","","","","","","","","","",""],"i":[1,1,0,0,0,2,1,2,1,2,0,2,2,1,2,1,2,0,0,2,2,0,1,2,2,1,2,1,2,0,3,3,3,3,3,3,3,3,4,4,4,4,4,0,4,0,5,4,5,4,4,4,5,4,5,5,4,4,5,5,4,5,4,5,4,0,0,0,0,0,0,6,6,7,7,7,6,8,9,10,11,7,6,8,9,10,11,7,8,9,10,11,7,9,10,11,7,10,7,6,8,6,10,11,8,8,8,6,8,9,10,11,7,8,6,11,6,8,9,10,11,7,11,11,6,8,8,7,11,9,10,11,7,6,8,9,10,11,7,6,8,9,10,11,7,6,6,6,8,9,10,11,7,11,8,7,8,12,13,12,13,14,14,0,0,14,0,0,14,15,14,12,13,15,14,12,13,15,14,12,13,14,12,13,15,14,12,13,15,15,14,12,13,14,12,13,15,15,15,15,15,14,12,13,15,14,12,13,15,14,12,13],"f":[null,null,null,null,null,[[]],[[]],[[]],[[]],[[]],null,[[["smallcstr",3]],["bool",15]],[[["formatter",3]],["result",6]],[[]],[[]],[[]],[[]],null,null,[[["smallcstr",3]],["bool",15]],[[],[["option",4],["smallcstr",3]]],null,[[],["result",4]],[[["str",15]],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],[[],["typeid",3]],null,[[]],[[]],[[["module",3],["functionast",3],["either",4],["prototypeast",3]],[["string",3],["result",4],["fnvalue",3]]],[[]],[[]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],null,null,null,null,null,null,null,null,[[]],[[]],[[]],[[]],[[["token",4]],["bool",15]],[[["formatter",3]],["result",6]],[[]],[[]],[[],["token",4]],[[]],[[]],[[["token",4]],["bool",15]],[[],["lexer",3]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],[[],["typeid",3]],null,null,null,null,null,null,[[["type",3],["str",15]],["fnvalue",3]],[[["fnvalue",3]],["basicblock",3]],[[["usize",15]],["value",3]],[[],["usize",15]],[[],["usize",15]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[["fnvalue",3]],["value",3]],[[],["basicblock",3]],[[],["type",3]],[[],["value",3]],[[],["fnvalue",3]],[[]],[[]],[[]],[[]],[[["f64",15]],["value",3]],[[]],[[]],[[]],[[]],[[]],[[]],[[["value",3]],["value",3]],[[["value",3]],["value",3]],[[["value",3]],["value",3]],[[]],[[]],[[]],[[]],[[]],[[]],[[["value",3]],["value",3]],[[["str",15]],[["option",4],["fnvalue",3]]],[[],["str",15]],[[]],[[]],[[]],[[]],[[]],[[]],[[],["bool",15]],[[],["bool",15]],[[]],[[["basicblock",3]]],[[["value",3]]],[[],["type",3]],[[["str",15]]],[[]],[[]],[[]],[[]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["type",3]],[[["type",3]],["type",3]],[[],["typeid",3]],[[],["typeid",3]],[[],["typeid",3]],[[],["typeid",3]],[[],["typeid",3]],[[],["typeid",3]],[[],["type",3]],[[["type",3],["value",3]],["value",3]],[[],["bool",15]],[[["module",3]],["builder",3]],null,null,null,null,null,null,null,null,null,null,null,null,[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[],["token",4]],[[["exprast",4]],["bool",15]],[[["prototypeast",3]],["bool",15]],[[["functionast",3]],["bool",15]],[[["formatter",3]],["result",6]],[[["formatter",3]],["result",6]],[[["formatter",3]],["result",6]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[["exprast",4]],["bool",15]],[[["prototypeast",3]],["bool",15]],[[["functionast",3]],["bool",15]],[[["lexer",3]]],[[],[["string",3],["result",4],["functionast",3]]],[[],[["string",3],["result",4],["prototypeast",3]]],[[],[["string",3],["result",4],["functionast",3]]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],[[],["typeid",3]],[[],["typeid",3]],[[],["typeid",3]]],"p":[[4,"Either"],[3,"SmallCStr"],[3,"Codegen"],[4,"Token"],[3,"Lexer"],[3,"Module"],[3,"FnValue"],[3,"Builder"],[3,"BasicBlock"],[3,"Type"],[3,"Value"],[3,"PrototypeAST"],[3,"FunctionAST"],[4,"ExprAST"],[3,"Parser"]]}\ +}'); +if (window.initSearch) {window.initSearch(searchIndex)};
\ No newline at end of file diff --git a/search.js b/search.js new file mode 100644 index 0000000..af0714e --- /dev/null +++ b/search.js @@ -0,0 +1 @@ +(function(){var itemTypes=["mod","externcrate","import","struct","enum","fn","type","static","trait","impl","tymethod","method","structfield","variant","macro","primitive","associatedtype","constant","associatedconstant","union","foreigntype","keyword","existential","attr","derive","traitalias"];var TY_PRIMITIVE=itemTypes.indexOf("primitive");var TY_KEYWORD=itemTypes.indexOf("keyword");function printTab(nb){if(nb===0||nb===1||nb===2){searchState.currentTab=nb}var nb_copy=nb;onEachLazy(document.getElementById("titles").childNodes,function(elem){if(nb_copy===0){addClass(elem,"selected")}else{removeClass(elem,"selected")}nb_copy-=1});onEachLazy(document.getElementById("results").childNodes,function(elem){if(nb===0){addClass(elem,"active")}else{removeClass(elem,"active")}nb-=1})}function removeEmptyStringsFromArray(x){for(var i=0,len=x.length;i<len;++i){if(x[i]===""){x.splice(i,1);i-=1}}}var levenshtein_row2=[];function levenshtein(s1,s2){if(s1===s2){return 0}var s1_len=s1.length,s2_len=s2.length;if(s1_len&&s2_len){var i1=0,i2=0,a,b,c,c2,row=levenshtein_row2;while(i1<s1_len){row[i1]=++i1}while(i2<s2_len){c2=s2.charCodeAt(i2);a=i2;++i2;b=i2;for(i1=0;i1<s1_len;++i1){c=a+(s1.charCodeAt(i1)!==c2?1:0);a=row[i1];b=b<a?(b<c?b+1:c):(a<c?a+1:c);row[i1]=b}}return b}return s1_len+s2_len}window.initSearch=function(rawSearchIndex){var MAX_LEV_DISTANCE=3;var MAX_RESULTS=200;var GENERICS_DATA=1;var NAME=0;var INPUTS_DATA=0;var OUTPUT_DATA=1;var NO_TYPE_FILTER=-1;var currentResults,index,searchIndex;var ALIASES={};var params=searchState.getQueryStringParams();if(searchState.input.value===""){searchState.input.value=params.search||""}function execQuery(query,searchWords,filterCrates){function itemTypeFromName(typename){for(var i=0,len=itemTypes.length;i<len;++i){if(itemTypes[i]===typename){return i}}return NO_TYPE_FILTER}var valLower=query.query.toLowerCase(),val=valLower,typeFilter=itemTypeFromName(query.type),results={},results_in_args={},results_returned={},split=valLower.split("::");removeEmptyStringsFromArray(split);function transformResults(results){var out=[];for(var i=0,len=results.length;i<len;++i){if(results[i].id>-1){var obj=searchIndex[results[i].id];obj.lev=results[i].lev;var res=buildHrefAndPath(obj);obj.displayPath=pathSplitter(res[0]);obj.fullPath=obj.displayPath+obj.name;obj.fullPath+="|"+obj.ty;obj.href=res[1];out.push(obj);if(out.length>=MAX_RESULTS){break}}}return out}function sortResults(results,isType){var ar=[];for(var entry in results){if(hasOwnPropertyRustdoc(results,entry)){ar.push(results[entry])}}results=ar;var i,len,result;for(i=0,len=results.length;i<len;++i){result=results[i];result.word=searchWords[result.id];result.item=searchIndex[result.id]||{}}if(results.length===0){return[]}results.sort(function(aaa,bbb){var a,b;a=(aaa.word!==val);b=(bbb.word!==val);if(a!==b){return a-b}a=(aaa.lev);b=(bbb.lev);if(a!==b){return a-b}a=(aaa.item.crate!==window.currentCrate);b=(bbb.item.crate!==window.currentCrate);if(a!==b){return a-b}a=aaa.word.length;b=bbb.word.length;if(a!==b){return a-b}a=aaa.word;b=bbb.word;if(a!==b){return(a>b?+1:-1)}a=(aaa.index<0);b=(bbb.index<0);if(a!==b){return a-b}a=aaa.index;b=bbb.index;if(a!==b){return a-b}if((aaa.item.ty===TY_PRIMITIVE&&bbb.item.ty!==TY_KEYWORD)||(aaa.item.ty===TY_KEYWORD&&bbb.item.ty!==TY_PRIMITIVE)){return-1}if((bbb.item.ty===TY_PRIMITIVE&&aaa.item.ty!==TY_PRIMITIVE)||(bbb.item.ty===TY_KEYWORD&&aaa.item.ty!==TY_KEYWORD)){return 1}a=(aaa.item.desc==="");b=(bbb.item.desc==="");if(a!==b){return a-b}a=aaa.item.ty;b=bbb.item.ty;if(a!==b){return a-b}a=aaa.item.path;b=bbb.item.path;if(a!==b){return(a>b?+1:-1)}return 0});for(i=0,len=results.length;i<len;++i){result=results[i];if(result.dontValidate){continue}var name=result.item.name.toLowerCase(),path=result.item.path.toLowerCase(),parent=result.item.parent;if(!isType&&!validateResult(name,path,split,parent)){result.id=-1}}return transformResults(results)}function extractGenerics(val){val=val.toLowerCase();if(val.indexOf("<")!==-1){var values=val.substring(val.indexOf("<")+1,val.lastIndexOf(">"));return{name:val.substring(0,val.indexOf("<")),generics:values.split(/\s*,\s*/),}}return{name:val,generics:[],}}function getObjectNameFromId(id){if(typeof id==="number"){return searchIndex[id].name}return id}function checkGenerics(obj,val){var tmp_lev,elem_name;if(val.generics.length>0){if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>=val.generics.length){var elems=Object.create(null);var elength=obj[GENERICS_DATA].length;for(var x=0;x<elength;++x){elems[getObjectNameFromId(obj[GENERICS_DATA][x])]+=1}var total=0;var done=0;var vlength=val.generics.length;for(x=0;x<vlength;++x){var lev=MAX_LEV_DISTANCE+1;var firstGeneric=getObjectNameFromId(val.generics[x]);var match=null;if(elems[firstGeneric]){match=firstGeneric;lev=0}else{for(elem_name in elems){tmp_lev=levenshtein(elem_name,firstGeneric);if(tmp_lev<lev){lev=tmp_lev;match=elem_name}}}if(match!==null){elems[match]-=1;if(elems[match]==0){delete elems[match]}total+=lev;done+=1}else{return MAX_LEV_DISTANCE+1}}return Math.ceil(total/done)}}return MAX_LEV_DISTANCE+1}function checkType(obj,val,literalSearch){var lev_distance=MAX_LEV_DISTANCE+1;var len,x,firstGeneric;if(obj[NAME]===val.name){if(literalSearch){if(val.generics&&val.generics.length!==0){if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>=val.generics.length){var elems=Object.create(null);len=obj[GENERICS_DATA].length;for(x=0;x<len;++x){elems[getObjectNameFromId(obj[GENERICS_DATA][x])]+=1}var allFound=true;len=val.generics.length;for(x=0;x<len;++x){firstGeneric=getObjectNameFromId(val.generics[x]);if(elems[firstGeneric]){elems[firstGeneric]-=1}else{allFound=false;break}}if(allFound){return true}}else{return false}}return true}if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length!==0){var tmp_lev=checkGenerics(obj,val);if(tmp_lev<=MAX_LEV_DISTANCE){return tmp_lev}}else{return 0}}if(literalSearch){if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>0){return obj[GENERICS_DATA].some(function(name){return name===val.name})}return false}lev_distance=Math.min(levenshtein(obj[NAME],val.name),lev_distance);if(lev_distance<=MAX_LEV_DISTANCE){lev_distance=Math.ceil((checkGenerics(obj,val)+lev_distance)/2)}else if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>0){var olength=obj[GENERICS_DATA].length;for(x=0;x<olength;++x){lev_distance=Math.min(levenshtein(obj[GENERICS_DATA][x],val.name),lev_distance)}}return lev_distance+1}function findArg(obj,val,literalSearch,typeFilter){var lev_distance=MAX_LEV_DISTANCE+1;if(obj&&obj.type&&obj.type[INPUTS_DATA]&&obj.type[INPUTS_DATA].length>0){var length=obj.type[INPUTS_DATA].length;for(var i=0;i<length;i++){var tmp=obj.type[INPUTS_DATA][i];if(!typePassesFilter(typeFilter,tmp[1])){continue}tmp=checkType(tmp,val,literalSearch);if(literalSearch){if(tmp){return true}continue}lev_distance=Math.min(tmp,lev_distance);if(lev_distance===0){return 0}}}return literalSearch?false:lev_distance}function checkReturned(obj,val,literalSearch,typeFilter){var lev_distance=MAX_LEV_DISTANCE+1;if(obj&&obj.type&&obj.type.length>OUTPUT_DATA){var ret=obj.type[OUTPUT_DATA];if(typeof ret[0]==="string"){ret=[ret]}for(var x=0,len=ret.length;x<len;++x){var tmp=ret[x];if(!typePassesFilter(typeFilter,tmp[1])){continue}tmp=checkType(tmp,val,literalSearch);if(literalSearch){if(tmp){return true}continue}lev_distance=Math.min(tmp,lev_distance);if(lev_distance===0){return 0}}}return literalSearch?false:lev_distance}function checkPath(contains,lastElem,ty){if(contains.length===0){return 0}var ret_lev=MAX_LEV_DISTANCE+1;var path=ty.path.split("::");if(ty.parent&&ty.parent.name){path.push(ty.parent.name.toLowerCase())}var length=path.length;var clength=contains.length;if(clength>length){return MAX_LEV_DISTANCE+1}for(var i=0;i<length;++i){if(i+clength>length){break}var lev_total=0;var aborted=false;for(var x=0;x<clength;++x){var lev=levenshtein(path[i+x],contains[x]);if(lev>MAX_LEV_DISTANCE){aborted=true;break}lev_total+=lev}if(!aborted){ret_lev=Math.min(ret_lev,Math.round(lev_total/clength))}}return ret_lev}function typePassesFilter(filter,type){if(filter<=NO_TYPE_FILTER)return true;if(filter===type)return true;var name=itemTypes[type];switch(itemTypes[filter]){case"constant":return name==="associatedconstant";case"fn":return name==="method"||name==="tymethod";case"type":return name==="primitive"||name==="associatedtype";case"trait":return name==="traitalias"}return false}function createAliasFromItem(item){return{crate:item.crate,name:item.name,path:item.path,desc:item.desc,ty:item.ty,parent:item.parent,type:item.type,is_alias:true,}}function handleAliases(ret,query,filterCrates){var aliases=[];var crateAliases=[];if(filterCrates!==undefined){if(ALIASES[filterCrates]&&ALIASES[filterCrates][query.search]){var query_aliases=ALIASES[filterCrates][query.search];var len=query_aliases.length;for(var i=0;i<len;++i){aliases.push(createAliasFromItem(searchIndex[query_aliases[i]]))}}}else{Object.keys(ALIASES).forEach(function(crate){if(ALIASES[crate][query.search]){var pushTo=crate===window.currentCrate?crateAliases:aliases;var query_aliases=ALIASES[crate][query.search];var len=query_aliases.length;for(var i=0;i<len;++i){pushTo.push(createAliasFromItem(searchIndex[query_aliases[i]]))}}})}var sortFunc=function(aaa,bbb){if(aaa.path<bbb.path){return 1}else if(aaa.path===bbb.path){return 0}return-1};crateAliases.sort(sortFunc);aliases.sort(sortFunc);var pushFunc=function(alias){alias.alias=query.raw;var res=buildHrefAndPath(alias);alias.displayPath=pathSplitter(res[0]);alias.fullPath=alias.displayPath+alias.name;alias.href=res[1];ret.others.unshift(alias);if(ret.others.length>MAX_RESULTS){ret.others.pop()}};onEach(aliases,pushFunc);onEach(crateAliases,pushFunc)}var nSearchWords=searchWords.length;var i,it;var ty;var fullId;var returned;var in_args;var len;if((val.charAt(0)==="\""||val.charAt(0)==="'")&&val.charAt(val.length-1)===val.charAt(0)){val=extractGenerics(val.substr(1,val.length-2));for(i=0;i<nSearchWords;++i){if(filterCrates!==undefined&&searchIndex[i].crate!==filterCrates){continue}in_args=findArg(searchIndex[i],val,true,typeFilter);returned=checkReturned(searchIndex[i],val,true,typeFilter);ty=searchIndex[i];fullId=ty.id;if(searchWords[i]===val.name&&typePassesFilter(typeFilter,searchIndex[i].ty)&&results[fullId]===undefined){results[fullId]={id:i,index:-1,dontValidate:true,}}if(in_args&&results_in_args[fullId]===undefined){results_in_args[fullId]={id:i,index:-1,dontValidate:true,}}if(returned&&results_returned[fullId]===undefined){results_returned[fullId]={id:i,index:-1,dontValidate:true,}}}query.inputs=[val];query.output=val;query.search=val}else if(val.search("->")>-1){var trimmer=function(s){return s.trim()};var parts=val.split("->").map(trimmer);var input=parts[0];var inputs=input.split(",").map(trimmer).sort();for(i=0,len=inputs.length;i<len;++i){inputs[i]=extractGenerics(inputs[i])}var output=extractGenerics(parts[1]);for(i=0;i<nSearchWords;++i){if(filterCrates!==undefined&&searchIndex[i].crate!==filterCrates){continue}var type=searchIndex[i].type;ty=searchIndex[i];if(!type){continue}fullId=ty.id;returned=checkReturned(ty,output,true,NO_TYPE_FILTER);if(output.name==="*"||returned){in_args=false;var is_module=false;if(input==="*"){is_module=true}else{var allFound=true;for(it=0,len=inputs.length;allFound&&it<len;it++){allFound=checkType(type,inputs[it],true)}in_args=allFound}if(in_args){results_in_args[fullId]={id:i,index:-1,dontValidate:true,}}if(returned){results_returned[fullId]={id:i,index:-1,dontValidate:true,}}if(is_module){results[fullId]={id:i,index:-1,dontValidate:true,}}}}query.inputs=inputs.map(function(input){return input.name});query.output=output.name}else{query.inputs=[val];query.output=val;query.search=val;val=val.replace(/_/g,"");var valGenerics=extractGenerics(val);var paths=valLower.split("::");removeEmptyStringsFromArray(paths);val=paths[paths.length-1];var contains=paths.slice(0,paths.length>1?paths.length-1:1);var lev,j;for(j=0;j<nSearchWords;++j){ty=searchIndex[j];if(!ty||(filterCrates!==undefined&&ty.crate!==filterCrates)){continue}var lev_add=0;if(paths.length>1){lev=checkPath(contains,paths[paths.length-1],ty);if(lev>MAX_LEV_DISTANCE){continue}else if(lev>0){lev_add=lev/10}}returned=MAX_LEV_DISTANCE+1;in_args=MAX_LEV_DISTANCE+1;var index=-1;lev=MAX_LEV_DISTANCE+1;fullId=ty.id;if(searchWords[j].indexOf(split[i])>-1||searchWords[j].indexOf(val)>-1||ty.normalizedName.indexOf(val)>-1){if(typePassesFilter(typeFilter,ty.ty)&&results[fullId]===undefined){index=ty.normalizedName.indexOf(val)}}if((lev=levenshtein(searchWords[j],val))<=MAX_LEV_DISTANCE){if(typePassesFilter(typeFilter,ty.ty)){lev+=1}else{lev=MAX_LEV_DISTANCE+1}}in_args=findArg(ty,valGenerics,false,typeFilter);returned=checkReturned(ty,valGenerics,false,typeFilter);lev+=lev_add;if(lev>0&&val.length>3&&searchWords[j].indexOf(val)>-1){if(val.length<6){lev-=1}else{lev=0}}if(in_args<=MAX_LEV_DISTANCE){if(results_in_args[fullId]===undefined){results_in_args[fullId]={id:j,index:index,lev:in_args,}}results_in_args[fullId].lev=Math.min(results_in_args[fullId].lev,in_args)}if(returned<=MAX_LEV_DISTANCE){if(results_returned[fullId]===undefined){results_returned[fullId]={id:j,index:index,lev:returned,}}results_returned[fullId].lev=Math.min(results_returned[fullId].lev,returned)}if(index!==-1||lev<=MAX_LEV_DISTANCE){if(index!==-1&&paths.length<2){lev=0}if(results[fullId]===undefined){results[fullId]={id:j,index:index,lev:lev,}}results[fullId].lev=Math.min(results[fullId].lev,lev)}}}var ret={"in_args":sortResults(results_in_args,true),"returned":sortResults(results_returned,true),"others":sortResults(results,false),};handleAliases(ret,query,filterCrates);return ret}function validateResult(name,path,keys,parent){for(var i=0,len=keys.length;i<len;++i){if(!(name.indexOf(keys[i])>-1||path.indexOf(keys[i])>-1||(parent!==undefined&&parent.name!==undefined&&parent.name.toLowerCase().indexOf(keys[i])>-1)||levenshtein(name,keys[i])<=MAX_LEV_DISTANCE)){return false}}return true}function getQuery(raw){var matches,type,query;query=raw;matches=query.match(/^(fn|mod|struct|enum|trait|type|const|macro)\s*:\s*/i);if(matches){type=matches[1].replace(/^const$/,"constant");query=query.substring(matches[0].length)}return{raw:raw,query:query,type:type,id:query+type}}function nextTab(direction){var next=(searchState.currentTab+direction+3)%searchState.focusedByTab.length;searchState.focusedByTab[searchState.currentTab]=document.activeElement;printTab(next);focusSearchResult()}function focusSearchResult(){var target=searchState.focusedByTab[searchState.currentTab]||document.querySelectorAll(".search-results.active a").item(0)||document.querySelectorAll("#titles > button").item(searchState.currentTab);if(target){target.focus()}}function buildHrefAndPath(item){var displayPath;var href;var type=itemTypes[item.ty];var name=item.name;var path=item.path;if(type==="mod"){displayPath=path+"::";href=window.rootPath+path.replace(/::/g,"/")+"/"+name+"/index.html"}else if(type==="primitive"||type==="keyword"){displayPath="";href=window.rootPath+path.replace(/::/g,"/")+"/"+type+"."+name+".html"}else if(type==="externcrate"){displayPath="";href=window.rootPath+name+"/index.html"}else if(item.parent!==undefined){var myparent=item.parent;var anchor="#"+type+"."+name;var parentType=itemTypes[myparent.ty];var pageType=parentType;var pageName=myparent.name;if(parentType==="primitive"){displayPath=myparent.name+"::"}else if(type==="structfield"&&parentType==="variant"){var enumNameIdx=item.path.lastIndexOf("::");var enumName=item.path.substr(enumNameIdx+2);path=item.path.substr(0,enumNameIdx);displayPath=path+"::"+enumName+"::"+myparent.name+"::";anchor="#variant."+myparent.name+".field."+name;pageType="enum";pageName=enumName}else{displayPath=path+"::"+myparent.name+"::"}href=window.rootPath+path.replace(/::/g,"/")+"/"+pageType+"."+pageName+".html"+anchor}else{displayPath=item.path+"::";href=window.rootPath+item.path.replace(/::/g,"/")+"/"+type+"."+name+".html"}return[displayPath,href]}function escape(content){var h1=document.createElement("h1");h1.textContent=content;return h1.innerHTML}function pathSplitter(path){var tmp="<span>"+path.replace(/::/g,"::</span><span>");if(tmp.endsWith("<span>")){return tmp.slice(0,tmp.length-6)}return tmp}function addTab(array,query,display){var extraClass="";if(display===true){extraClass=" active"}var output=document.createElement("div");var duplicates={};var length=0;if(array.length>0){output.className="search-results "+extraClass;array.forEach(function(item){if(item.is_alias!==true){if(duplicates[item.fullPath]){return}duplicates[item.fullPath]=true}var name=item.name;var type=itemTypes[item.ty];length+=1;var extra="";if(type==="primitive"){extra=" <i>(primitive type)</i>"}else if(type==="keyword"){extra=" <i>(keyword)</i>"}var link=document.createElement("a");link.className="result-"+type;link.href=item.href;var wrapper=document.createElement("div");var resultName=document.createElement("div");resultName.className="result-name";if(item.is_alias){var alias=document.createElement("span");alias.className="alias";var bold=document.createElement("b");bold.innerText=item.alias;alias.appendChild(bold);alias.insertAdjacentHTML("beforeend","<span class=\"grey\"><i> - see </i></span>");resultName.appendChild(alias)}resultName.insertAdjacentHTML("beforeend",item.displayPath+"<span class=\""+type+"\">"+name+extra+"</span>");wrapper.appendChild(resultName);var description=document.createElement("div");description.className="desc";var spanDesc=document.createElement("span");spanDesc.insertAdjacentHTML("beforeend",item.desc);description.appendChild(spanDesc);wrapper.appendChild(description);link.appendChild(wrapper);output.appendChild(link)})}else{output.className="search-failed"+extraClass;output.innerHTML="No results :(<br/>"+"Try on <a href=\"https://duckduckgo.com/?q="+encodeURIComponent("rust "+query.query)+"\">DuckDuckGo</a>?<br/><br/>"+"Or try looking in one of these:<ul><li>The <a "+"href=\"https://doc.rust-lang.org/reference/index.html\">Rust Reference</a> "+" for technical details about the language.</li><li><a "+"href=\"https://doc.rust-lang.org/rust-by-example/index.html\">Rust By "+"Example</a> for expository code examples.</a></li><li>The <a "+"href=\"https://doc.rust-lang.org/book/index.html\">Rust Book</a> for "+"introductions to language features and the language itself.</li><li><a "+"href=\"https://docs.rs\">Docs.rs</a> for documentation of crates released on"+" <a href=\"https://crates.io/\">crates.io</a>.</li></ul>"}return[output,length]}function makeTabHeader(tabNb,text,nbElems){if(searchState.currentTab===tabNb){return"<button class=\"selected\">"+text+" <div class=\"count\">("+nbElems+")</div></button>"}return"<button>"+text+" <div class=\"count\">("+nbElems+")</div></button>"}function showResults(results){var search=searchState.outputElement();if(results.others.length===1&&getSettingValue("go-to-only-result")==="true"&&(!search.firstChild||search.firstChild.innerText!==searchState.loadingText)){var elem=document.createElement("a");elem.href=results.others[0].href;removeClass(elem,"active");document.body.appendChild(elem);elem.click();return}var query=getQuery(searchState.input.value);currentResults=query.id;var ret_others=addTab(results.others,query);var ret_in_args=addTab(results.in_args,query,false);var ret_returned=addTab(results.returned,query,false);var currentTab=searchState.currentTab;if((currentTab===0&&ret_others[1]===0)||(currentTab===1&&ret_in_args[1]===0)||(currentTab===2&&ret_returned[1]===0)){if(ret_others[1]!==0){currentTab=0}else if(ret_in_args[1]!==0){currentTab=1}else if(ret_returned[1]!==0){currentTab=2}}var output="<h1>Results for "+escape(query.query)+(query.type?" (type: "+escape(query.type)+")":"")+"</h1>"+"<div id=\"titles\">"+makeTabHeader(0,"In Names",ret_others[1])+makeTabHeader(1,"In Parameters",ret_in_args[1])+makeTabHeader(2,"In Return Types",ret_returned[1])+"</div>";var resultsElem=document.createElement("div");resultsElem.id="results";resultsElem.appendChild(ret_others[0]);resultsElem.appendChild(ret_in_args[0]);resultsElem.appendChild(ret_returned[0]);search.innerHTML=output;search.appendChild(resultsElem);searchState.focusedByTab=[null,null,null];searchState.showResults(search);var elems=document.getElementById("titles").childNodes;elems[0].onclick=function(){printTab(0)};elems[1].onclick=function(){printTab(1)};elems[2].onclick=function(){printTab(2)};printTab(currentTab)}function execSearch(query,searchWords,filterCrates){function getSmallest(arrays,positions,notDuplicates){var start=null;for(var it=0,len=positions.length;it<len;++it){if(arrays[it].length>positions[it]&&(start===null||start>arrays[it][positions[it]].lev)&&!notDuplicates[arrays[it][positions[it]].fullPath]){start=arrays[it][positions[it]].lev}}return start}function mergeArrays(arrays){var ret=[];var positions=[];var notDuplicates={};for(var x=0,arrays_len=arrays.length;x<arrays_len;++x){positions.push(0)}while(ret.length<MAX_RESULTS){var smallest=getSmallest(arrays,positions,notDuplicates);if(smallest===null){break}for(x=0;x<arrays_len&&ret.length<MAX_RESULTS;++x){if(arrays[x].length>positions[x]&&arrays[x][positions[x]].lev===smallest&&!notDuplicates[arrays[x][positions[x]].fullPath]){ret.push(arrays[x][positions[x]]);notDuplicates[arrays[x][positions[x]].fullPath]=true;positions[x]+=1}}}return ret}var queries=query.raw.split(",");var results={"in_args":[],"returned":[],"others":[],};for(var i=0,len=queries.length;i<len;++i){query=queries[i].trim();if(query.length!==0){var tmp=execQuery(getQuery(query),searchWords,filterCrates);results.in_args.push(tmp.in_args);results.returned.push(tmp.returned);results.others.push(tmp.others)}}if(queries.length>1){return{"in_args":mergeArrays(results.in_args),"returned":mergeArrays(results.returned),"others":mergeArrays(results.others),}}return{"in_args":results.in_args[0],"returned":results.returned[0],"others":results.others[0],}}function getFilterCrates(){var elem=document.getElementById("crate-search");if(elem&&elem.value!=="All crates"&&hasOwnPropertyRustdoc(rawSearchIndex,elem.value)){return elem.value}return undefined}function search(e,forced){var params=searchState.getQueryStringParams();var query=getQuery(searchState.input.value.trim());if(e){e.preventDefault()}if(query.query.length===0){return}if(!forced&&query.id===currentResults){if(query.query.length>0){searchState.putBackSearch(searchState.input)}return}searchState.title="Results for "+query.query+" - Rust";if(searchState.browserSupportsHistoryApi()){var newURL=getNakedUrl()+"?search="+encodeURIComponent(query.raw)+window.location.hash;if(!history.state&&!params.search){history.pushState(query,"",newURL)}else{history.replaceState(query,"",newURL)}}var filterCrates=getFilterCrates();showResults(execSearch(query,index,filterCrates))}function buildIndex(rawSearchIndex){searchIndex=[];var searchWords=[];var i,word;var currentIndex=0;var id=0;for(var crate in rawSearchIndex){if(!hasOwnPropertyRustdoc(rawSearchIndex,crate)){continue}var crateSize=0;searchWords.push(crate);var crateRow={crate:crate,ty:1,name:crate,path:"",desc:rawSearchIndex[crate].doc,parent:undefined,type:null,id:id,normalizedName:crate.indexOf("_")===-1?crate:crate.replace(/_/g,""),};id+=1;searchIndex.push(crateRow);currentIndex+=1;var itemTypes=rawSearchIndex[crate].t;var itemNames=rawSearchIndex[crate].n;var itemPaths=rawSearchIndex[crate].q;var itemDescs=rawSearchIndex[crate].d;var itemParentIdxs=rawSearchIndex[crate].i;var itemFunctionSearchTypes=rawSearchIndex[crate].f;var paths=rawSearchIndex[crate].p;var aliases=rawSearchIndex[crate].a;var len=paths.length;for(i=0;i<len;++i){paths[i]={ty:paths[i][0],name:paths[i][1]}}len=itemTypes.length;var lastPath="";for(i=0;i<len;++i){if(typeof itemNames[i]==="string"){word=itemNames[i].toLowerCase();searchWords.push(word)}else{word="";searchWords.push("")}var row={crate:crate,ty:itemTypes[i],name:itemNames[i],path:itemPaths[i]?itemPaths[i]:lastPath,desc:itemDescs[i],parent:itemParentIdxs[i]>0?paths[itemParentIdxs[i]-1]:undefined,type:itemFunctionSearchTypes[i],id:id,normalizedName:word.indexOf("_")===-1?word:word.replace(/_/g,""),};id+=1;searchIndex.push(row);lastPath=row.path;crateSize+=1}if(aliases){ALIASES[crate]={};var j,local_aliases;for(var alias_name in aliases){if(!hasOwnPropertyRustdoc(aliases,alias_name)){continue}if(!hasOwnPropertyRustdoc(ALIASES[crate],alias_name)){ALIASES[crate][alias_name]=[]}local_aliases=aliases[alias_name];for(j=0,len=local_aliases.length;j<len;++j){ALIASES[crate][alias_name].push(local_aliases[j]+currentIndex)}}}currentIndex+=crateSize}return searchWords}function registerSearchEvents(){var searchAfter500ms=function(){searchState.clearInputTimeout();if(searchState.input.value.length===0){if(searchState.browserSupportsHistoryApi()){history.replaceState("",window.currentCrate+" - Rust",getNakedUrl()+window.location.hash)}searchState.hideResults()}else{searchState.timeout=setTimeout(search,500)}};searchState.input.onkeyup=searchAfter500ms;searchState.input.oninput=searchAfter500ms;document.getElementsByClassName("search-form")[0].onsubmit=function(e){e.preventDefault();searchState.clearInputTimeout();search()};searchState.input.onchange=function(e){if(e.target!==document.activeElement){return}searchState.clearInputTimeout();setTimeout(search,0)};searchState.input.onpaste=searchState.input.onchange;searchState.outputElement().addEventListener("keydown",function(e){if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey){return}if(e.which===38){var previous=document.activeElement.previousElementSibling;if(previous){previous.focus()}else{searchState.focus()}e.preventDefault()}else if(e.which===40){var next=document.activeElement.nextElementSibling;if(next){next.focus()}var rect=document.activeElement.getBoundingClientRect();if(window.innerHeight-rect.bottom<rect.height){window.scrollBy(0,rect.height)}e.preventDefault()}else if(e.which===37){nextTab(-1);e.preventDefault()}else if(e.which===39){nextTab(1);e.preventDefault()}});searchState.input.addEventListener("keydown",function(e){if(e.which===40){focusSearchResult();e.preventDefault()}});var selectCrate=document.getElementById("crate-search");if(selectCrate){selectCrate.onchange=function(){updateLocalStorage("rustdoc-saved-filter-crate",selectCrate.value);search(undefined,true)}}if(searchState.browserSupportsHistoryApi()){var previousTitle=document.title;window.addEventListener("popstate",function(e){var params=searchState.getQueryStringParams();document.title=previousTitle;currentResults=null;if(params.search&¶ms.search.length>0){searchState.input.value=params.search;search(e)}else{searchState.input.value="";searchState.hideResults()}})}window.onpageshow=function(){var qSearch=searchState.getQueryStringParams().search;if(searchState.input.value===""&&qSearch){searchState.input.value=qSearch}search()}}index=buildIndex(rawSearchIndex);registerSearchEvents();if(searchState.getQueryStringParams().search){search()}};if(window.searchIndex!==undefined){initSearch(window.searchIndex)}})()
\ No newline at end of file diff --git a/settings.css b/settings.css new file mode 100644 index 0000000..6709865 --- /dev/null +++ b/settings.css @@ -0,0 +1 @@ +.setting-line{padding:5px;position:relative;}.setting-line>div{display:inline-block;vertical-align:top;font-size:17px;padding-top:2px;}.setting-line>.title{font-size:19px;width:100%;max-width:none;border-bottom:1px solid;}.toggle{position:relative;display:inline-block;width:45px;height:27px;margin-right:20px;}.toggle input{opacity:0;position:absolute;}.select-wrapper{float:right;position:relative;height:27px;min-width:25%;}.select-wrapper select{appearance:none;-moz-appearance:none;-webkit-appearance:none;background:none;border:2px solid #ccc;padding-right:28px;width:100%;}.select-wrapper img{pointer-events:none;position:absolute;right:0;bottom:0;background:#ccc;height:100%;width:28px;padding:0px 4px;}.select-wrapper select option{color:initial;}.slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.3s;transition:.3s;}.slider:before{position:absolute;content:"";height:19px;width:19px;left:4px;bottom:4px;background-color:white;-webkit-transition:.3s;transition:.3s;}input:checked+.slider{background-color:#2196F3;}input:focus+.slider{box-shadow:0 0 0 2px #0a84ff,0 0 0 6px rgba(10,132,255,0.3);}input:checked+.slider:before{-webkit-transform:translateX(19px);-ms-transform:translateX(19px);transform:translateX(19px);}.setting-line>.sub-settings{padding-left:42px;width:100%;display:block;}
\ No newline at end of file diff --git a/settings.html b/settings.html new file mode 100644 index 0000000..f623d7c --- /dev/null +++ b/settings.html @@ -0,0 +1,4 @@ +<!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="Settings of Rustdoc"><meta name="keywords" content="rust, rustlang, rust-lang"><title>Rustdoc settings</title><link rel="stylesheet" type="text/css" href="./normalize.css"><link rel="stylesheet" type="text/css" href="./rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="./light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="./dark.css" disabled ><link rel="stylesheet" type="text/css" href="./ayu.css" disabled ><link rel="stylesheet" type="text/css" href="./settings.css" ><script id="default-settings"></script><script src="./storage.js"></script><script src="./crates.js"></script><noscript><link rel="stylesheet" href="./noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="./favicon.svg"> +<link rel="alternate icon" type="image/png" href="./favicon-16x16.png"> +<link rel="alternate icon" type="image/png" href="./favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("./down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='./llvm_kaleidoscope_rs/index.html'><div class='logo-container rust-logo'><img src='./rust-logo.png' alt='logo'></div></a><h2 class="location">Settings</h2><div class="sidebar-elems"></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="./brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="./settings.html" title="settings"><img src="./wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Rustdoc settings</span></h1><div class="settings"><div class="setting-line"><div class="title">Theme preferences</div><div class="sub-settings"><div class="setting-line"><label class="toggle"><input type="checkbox" id="use-system-theme" checked><span class="slider"></span></label><div>Use system theme</div></div><div class="setting-line"><div>Preferred dark theme</div><label class="select-wrapper"><select id="preferred-dark-theme" autocomplete="off"><option value="light" >light</option><option value="dark" selected>dark</option><option value="ayu" >ayu</option></select><img src="./down-arrow.svg" alt="Select item"></label></div><div class="setting-line"><div>Preferred light theme</div><label class="select-wrapper"><select id="preferred-light-theme" autocomplete="off"><option value="light" selected>light</option><option value="dark" >dark</option><option value="ayu" >ayu</option></select><img src="./down-arrow.svg" alt="Select item"></label></div></div> + </div><div class="setting-line"><label class="toggle"><input type="checkbox" id="auto-hide-large-items" checked><span class="slider"></span></label><div>Auto-hide item contents for large items.</div></div><div class="setting-line"><label class="toggle"><input type="checkbox" id="auto-hide-method-docs" ><span class="slider"></span></label><div>Auto-hide item methods' documentation</div></div><div class="setting-line"><label class="toggle"><input type="checkbox" id="auto-hide-trait-implementations" checked><span class="slider"></span></label><div>Auto-hide trait implementation documentation</div></div><div class="setting-line"><label class="toggle"><input type="checkbox" id="auto-collapse-implementors" checked><span class="slider"></span></label><div>Auto-hide implementors of a trait</div></div><div class="setting-line"><label class="toggle"><input type="checkbox" id="go-to-only-result" ><span class="slider"></span></label><div>Directly go to item in search if there is only one result</div></div><div class="setting-line"><label class="toggle"><input type="checkbox" id="line-numbers" ><span class="slider"></span></label><div>Show line numbers on code examples</div></div><div class="setting-line"><label class="toggle"><input type="checkbox" id="disable-shortcuts" ><span class="slider"></span></label><div>Disable keyboard shortcuts</div></div></div><script src="./settings.js"></script></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="./" data-current-crate="llvm_kaleidoscope_rs" data-search-index-js="./search-index.js" data-search-js="./search.js"></div><script src="./main.js"></script></body></html>
\ No newline at end of file diff --git a/settings.js b/settings.js new file mode 100644 index 0000000..b4d6fdc --- /dev/null +++ b/settings.js @@ -0,0 +1 @@ +(function(){function changeSetting(settingName,value){updateLocalStorage("rustdoc-"+settingName,value);switch(settingName){case"preferred-dark-theme":case"preferred-light-theme":case"use-system-theme":updateSystemTheme();break}}function handleKey(ev){if(ev.ctrlKey||ev.altKey||ev.metaKey){return}switch(getVirtualKey(ev)){case"Enter":case"Return":case"Space":ev.target.checked=!ev.target.checked;ev.preventDefault();break}}function setEvents(){onEachLazy(document.getElementsByClassName("slider"),function(elem){var toggle=elem.previousElementSibling;var settingId=toggle.id;var settingValue=getSettingValue(settingId);if(settingValue!==null){toggle.checked=settingValue==="true"}toggle.onchange=function(){changeSetting(this.id,this.checked)};toggle.onkeyup=handleKey;toggle.onkeyrelease=handleKey});onEachLazy(document.getElementsByClassName("select-wrapper"),function(elem){var select=elem.getElementsByTagName("select")[0];var settingId=select.id;var settingValue=getSettingValue(settingId);if(settingValue!==null){select.value=settingValue}select.onchange=function(){changeSetting(this.id,this.value)}})}window.addEventListener("DOMContentLoaded",setEvents)})()
\ No newline at end of file diff --git a/source-files.js b/source-files.js new file mode 100644 index 0000000..5d7863a --- /dev/null +++ b/source-files.js @@ -0,0 +1,3 @@ +var N = null;var sourcesIndex = {}; +sourcesIndex["llvm_kaleidoscope_rs"] = {"name":"","files":["codegen.rs","lexer.rs","lib.rs","llvm.rs","parser.rs"]}; +createSourceSidebar(); diff --git a/source-script.js b/source-script.js new file mode 100644 index 0000000..5dc8fee --- /dev/null +++ b/source-script.js @@ -0,0 +1 @@ +(function(){function getCurrentFilePath(){var parts=window.location.pathname.split("/");var rootPathParts=window.rootPath.split("/");for(var i=0,len=rootPathParts.length;i<len;++i){if(rootPathParts[i]===".."){parts.pop()}}var file=window.location.pathname.substring(parts.join("/").length);if(file.startsWith("/")){file=file.substring(1)}return file.substring(0,file.length-5)}function createDirEntry(elem,parent,fullPath,currentFile,hasFoundFile){var name=document.createElement("div");name.className="name";fullPath+=elem["name"]+"/";name.onclick=function(){if(hasClass(this,"expand")){removeClass(this,"expand")}else{addClass(this,"expand")}};name.innerText=elem["name"];var i,len;var children=document.createElement("div");children.className="children";var folders=document.createElement("div");folders.className="folders";if(elem.dirs){for(i=0,len=elem.dirs.length;i<len;++i){if(createDirEntry(elem.dirs[i],folders,fullPath,currentFile,hasFoundFile)){addClass(name,"expand");hasFoundFile=true}}}children.appendChild(folders);var files=document.createElement("div");files.className="files";if(elem.files){for(i=0,len=elem.files.length;i<len;++i){var file=document.createElement("a");file.innerText=elem.files[i];file.href=window.rootPath+"src/"+fullPath+elem.files[i]+".html";if(!hasFoundFile&¤tFile===fullPath+elem.files[i]){file.className="selected";addClass(name,"expand");hasFoundFile=true}files.appendChild(file)}}search.fullPath=fullPath;children.appendChild(files);parent.appendChild(name);parent.appendChild(children);return hasFoundFile&¤tFile.startsWith(fullPath)}function toggleSidebar(){var sidebar=document.getElementById("source-sidebar");var child=this.children[0].children[0];if(child.innerText===">"){sidebar.style.left="";this.style.left="";child.innerText="<";updateLocalStorage("rustdoc-source-sidebar-show","true")}else{sidebar.style.left="-300px";this.style.left="0";child.innerText=">";updateLocalStorage("rustdoc-source-sidebar-show","false")}}function createSidebarToggle(){var sidebarToggle=document.createElement("div");sidebarToggle.id="sidebar-toggle";sidebarToggle.onclick=toggleSidebar;var inner1=document.createElement("div");inner1.style.position="relative";var inner2=document.createElement("div");inner2.style.paddingTop="3px";if(getCurrentValue("rustdoc-source-sidebar-show")==="true"){inner2.innerText="<"}else{inner2.innerText=">";sidebarToggle.style.left="0"}inner1.appendChild(inner2);sidebarToggle.appendChild(inner1);return sidebarToggle}function createSourceSidebar(){if(!window.rootPath.endsWith("/")){window.rootPath+="/"}var main=document.getElementById("main");var sidebarToggle=createSidebarToggle();main.insertBefore(sidebarToggle,main.firstChild);var sidebar=document.createElement("div");sidebar.id="source-sidebar";if(getCurrentValue("rustdoc-source-sidebar-show")!=="true"){sidebar.style.left="-300px"}var currentFile=getCurrentFilePath();var hasFoundFile=false;var title=document.createElement("div");title.className="title";title.innerText="Files";sidebar.appendChild(title);Object.keys(sourcesIndex).forEach(function(key){sourcesIndex[key].name=key;hasFoundFile=createDirEntry(sourcesIndex[key],sidebar,"",currentFile,hasFoundFile)});main.insertBefore(sidebar,main.firstChild);var selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus()}}var lineNumbersRegex=/^#?(\d+)(?:-(\d+))?$/;function highlightSourceLines(scrollTo,match){if(typeof match==="undefined"){match=window.location.hash.match(lineNumbersRegex)}if(!match){return}var from=parseInt(match[1],10);var to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10)}if(to<from){var tmp=to;to=from;from=tmp}var elem=document.getElementById(from);if(!elem){return}if(scrollTo){var x=document.getElementById(from);if(x){x.scrollIntoView()}}onEachLazy(document.getElementsByClassName("line-numbers"),function(e){onEachLazy(e.getElementsByTagName("span"),function(i_e){removeClass(i_e,"line-highlighted")})});for(var i=from;i<=to;++i){elem=document.getElementById(i);if(!elem){break}addClass(elem,"line-highlighted")}}var handleSourceHighlight=(function(){var prev_line_id=0;var set_fragment=function(name){var x=window.scrollX,y=window.scrollY;if(searchState.browserSupportsHistoryApi()){history.replaceState(null,null,"#"+name);highlightSourceLines(true)}else{location.replace("#"+name)}window.scrollTo(x,y)};return function(ev){var cur_line_id=parseInt(ev.target.id,10);ev.preventDefault();if(ev.shiftKey&&prev_line_id){if(prev_line_id>cur_line_id){var tmp=prev_line_id;prev_line_id=cur_line_id;cur_line_id=tmp}set_fragment(prev_line_id+"-"+cur_line_id)}else{prev_line_id=cur_line_id;set_fragment(cur_line_id)}}}());window.addEventListener("hashchange",function(){var match=window.location.hash.match(lineNumbersRegex);if(match){return highlightSourceLines(false,match)}});onEachLazy(document.getElementsByClassName("line-numbers"),function(el){el.addEventListener("click",handleSourceHighlight)});highlightSourceLines(true);window.createSourceSidebar=createSourceSidebar})()
\ No newline at end of file diff --git a/src/llvm_kaleidoscope_rs/codegen.rs.html b/src/llvm_kaleidoscope_rs/codegen.rs.html new file mode 100644 index 0000000..bcaa770 --- /dev/null +++ b/src/llvm_kaleidoscope_rs/codegen.rs.html @@ -0,0 +1,275 @@ +<!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 `src/codegen.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>codegen.rs - source</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg"> +<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"> +<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc source"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../llvm_kaleidoscope_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><div class="example-wrap"><pre class="line-numbers"><span id="1"> 1</span> +<span id="2"> 2</span> +<span id="3"> 3</span> +<span id="4"> 4</span> +<span id="5"> 5</span> +<span id="6"> 6</span> +<span id="7"> 7</span> +<span id="8"> 8</span> +<span id="9"> 9</span> +<span id="10"> 10</span> +<span id="11"> 11</span> +<span id="12"> 12</span> +<span id="13"> 13</span> +<span id="14"> 14</span> +<span id="15"> 15</span> +<span id="16"> 16</span> +<span id="17"> 17</span> +<span id="18"> 18</span> +<span id="19"> 19</span> +<span id="20"> 20</span> +<span id="21"> 21</span> +<span id="22"> 22</span> +<span id="23"> 23</span> +<span id="24"> 24</span> +<span id="25"> 25</span> +<span id="26"> 26</span> +<span id="27"> 27</span> +<span id="28"> 28</span> +<span id="29"> 29</span> +<span id="30"> 30</span> +<span id="31"> 31</span> +<span id="32"> 32</span> +<span id="33"> 33</span> +<span id="34"> 34</span> +<span id="35"> 35</span> +<span id="36"> 36</span> +<span id="37"> 37</span> +<span id="38"> 38</span> +<span id="39"> 39</span> +<span id="40"> 40</span> +<span id="41"> 41</span> +<span id="42"> 42</span> +<span id="43"> 43</span> +<span id="44"> 44</span> +<span id="45"> 45</span> +<span id="46"> 46</span> +<span id="47"> 47</span> +<span id="48"> 48</span> +<span id="49"> 49</span> +<span id="50"> 50</span> +<span id="51"> 51</span> +<span id="52"> 52</span> +<span id="53"> 53</span> +<span id="54"> 54</span> +<span id="55"> 55</span> +<span id="56"> 56</span> +<span id="57"> 57</span> +<span id="58"> 58</span> +<span id="59"> 59</span> +<span id="60"> 60</span> +<span id="61"> 61</span> +<span id="62"> 62</span> +<span id="63"> 63</span> +<span id="64"> 64</span> +<span id="65"> 65</span> +<span id="66"> 66</span> +<span id="67"> 67</span> +<span id="68"> 68</span> +<span id="69"> 69</span> +<span id="70"> 70</span> +<span id="71"> 71</span> +<span id="72"> 72</span> +<span id="73"> 73</span> +<span id="74"> 74</span> +<span id="75"> 75</span> +<span id="76"> 76</span> +<span id="77"> 77</span> +<span id="78"> 78</span> +<span id="79"> 79</span> +<span id="80"> 80</span> +<span id="81"> 81</span> +<span id="82"> 82</span> +<span id="83"> 83</span> +<span id="84"> 84</span> +<span id="85"> 85</span> +<span id="86"> 86</span> +<span id="87"> 87</span> +<span id="88"> 88</span> +<span id="89"> 89</span> +<span id="90"> 90</span> +<span id="91"> 91</span> +<span id="92"> 92</span> +<span id="93"> 93</span> +<span id="94"> 94</span> +<span id="95"> 95</span> +<span id="96"> 96</span> +<span id="97"> 97</span> +<span id="98"> 98</span> +<span id="99"> 99</span> +<span id="100">100</span> +<span id="101">101</span> +<span id="102">102</span> +<span id="103">103</span> +<span id="104">104</span> +<span id="105">105</span> +<span id="106">106</span> +<span id="107">107</span> +<span id="108">108</span> +<span id="109">109</span> +<span id="110">110</span> +<span id="111">111</span> +<span id="112">112</span> +<span id="113">113</span> +<span id="114">114</span> +<span id="115">115</span> +<span id="116">116</span> +<span id="117">117</span> +<span id="118">118</span> +<span id="119">119</span> +<span id="120">120</span> +<span id="121">121</span> +<span id="122">122</span> +<span id="123">123</span> +<span id="124">124</span> +<span id="125">125</span> +<span id="126">126</span> +<span id="127">127</span> +<span id="128">128</span> +<span id="129">129</span> +<span id="130">130</span> +<span id="131">131</span> +<span id="132">132</span> +<span id="133">133</span> +<span id="134">134</span> +<span id="135">135</span> +</pre><pre class="rust"> +<span class="kw">use</span> <span class="ident">std::collections::HashMap</span>; + +<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::llvm</span>::{<span class="ident">Builder</span>, <span class="ident">FnValue</span>, <span class="ident">Module</span>, <span class="ident">Value</span>}; +<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::parser</span>::{<span class="ident">ExprAST</span>, <span class="ident">FunctionAST</span>, <span class="ident">PrototypeAST</span>}; +<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::Either</span>; + +<span class="kw">type</span> <span class="ident">CodegenResult</span><span class="op"><</span><span class="ident">T</span><span class="op">></span> <span class="op">=</span> <span class="prelude-ty">Result</span><span class="op"><</span><span class="ident">T</span>, <span class="ident">String</span><span class="op">></span>; + +<span class="doccomment">/// Code generator from kaleidoscope AST to LLVM IR.</span> +<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">Codegen</span><span class="op"><</span><span class="lifetime">'llvm</span>, <span class="lifetime">'a</span><span class="op">></span> { + <span class="ident">module</span>: <span class="kw-2">&</span><span class="lifetime">'llvm</span> <span class="ident">Module</span>, + <span class="ident">builder</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">Builder</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span>, +} + +<span class="kw">impl</span><span class="op"><</span><span class="lifetime">'llvm</span>, <span class="lifetime">'a</span><span class="op">></span> <span class="ident">Codegen</span><span class="op"><</span><span class="lifetime">'llvm</span>, <span class="lifetime">'a</span><span class="op">></span> { + <span class="doccomment">/// Compile either a [`PrototypeAST`] or a [`FunctionAST`] into the LLVM `module`.</span> + <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">compile</span>( + <span class="ident">module</span>: <span class="kw-2">&</span><span class="lifetime">'llvm</span> <span class="ident">Module</span>, + <span class="ident">compilee</span>: <span class="ident">Either</span><span class="op"><</span><span class="kw-2">&</span><span class="ident">PrototypeAST</span>, <span class="kw-2">&</span><span class="ident">FunctionAST</span><span class="op">></span>, + ) <span class="op">-</span><span class="op">></span> <span class="ident">CodegenResult</span><span class="op"><</span><span class="ident">FnValue</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span><span class="op">></span> { + <span class="kw">let</span> <span class="ident">cg</span> <span class="op">=</span> <span class="ident">Codegen</span> { + <span class="ident">module</span>, + <span class="ident">builder</span>: <span class="kw-2">&</span><span class="ident">Builder::with_ctx</span>(<span class="ident">module</span>), + }; + <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">variables</span> <span class="op">=</span> <span class="ident">HashMap::new</span>(); + + <span class="kw">match</span> <span class="ident">compilee</span> { + <span class="ident">Either::A</span>(<span class="ident">proto</span>) <span class="op">=</span><span class="op">></span> <span class="prelude-val">Ok</span>(<span class="ident">cg</span>.<span class="ident">codegen_prototype</span>(<span class="ident">proto</span>)), + <span class="ident">Either::B</span>(<span class="ident">func</span>) <span class="op">=</span><span class="op">></span> <span class="ident">cg</span>.<span class="ident">codegen_function</span>(<span class="ident">func</span>, <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">variables</span>), + } + } + + <span class="kw">fn</span> <span class="ident">codegen_expr</span>( + <span class="kw-2">&</span><span class="self">self</span>, + <span class="ident">expr</span>: <span class="kw-2">&</span><span class="ident">ExprAST</span>, + <span class="ident">named_values</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">HashMap</span><span class="op"><</span><span class="kw-2">&</span><span class="lifetime">'llvm</span> <span class="ident">str</span>, <span class="ident">Value</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span><span class="op">></span>, + ) <span class="op">-</span><span class="op">></span> <span class="ident">CodegenResult</span><span class="op"><</span><span class="ident">Value</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span><span class="op">></span> { + <span class="kw">match</span> <span class="ident">expr</span> { + <span class="ident">ExprAST::Number</span>(<span class="ident">num</span>) <span class="op">=</span><span class="op">></span> <span class="prelude-val">Ok</span>(<span class="self">self</span>.<span class="ident">module</span>.<span class="ident">type_f64</span>().<span class="ident">const_f64</span>(<span class="kw-2">*</span><span class="ident">num</span>)), + <span class="ident">ExprAST::Variable</span>(<span class="ident">name</span>) <span class="op">=</span><span class="op">></span> <span class="kw">match</span> <span class="ident">named_values</span>.<span class="ident">get</span>(<span class="ident">name</span>.<span class="ident">as_str</span>()) { + <span class="prelude-val">Some</span>(<span class="ident">value</span>) <span class="op">=</span><span class="op">></span> <span class="prelude-val">Ok</span>(<span class="kw-2">*</span><span class="ident">value</span>), + <span class="prelude-val">None</span> <span class="op">=</span><span class="op">></span> <span class="prelude-val">Err</span>(<span class="string">"Unknown variable name"</span>.<span class="ident">into</span>()), + }, + <span class="ident">ExprAST::Binary</span>(<span class="ident">binop</span>, <span class="ident">lhs</span>, <span class="ident">rhs</span>) <span class="op">=</span><span class="op">></span> { + <span class="kw">let</span> <span class="ident">l</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">codegen_expr</span>(<span class="ident">lhs</span>, <span class="ident">named_values</span>)<span class="question-mark">?</span>; + <span class="kw">let</span> <span class="ident">r</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">codegen_expr</span>(<span class="ident">rhs</span>, <span class="ident">named_values</span>)<span class="question-mark">?</span>; + + <span class="kw">match</span> <span class="ident">binop</span> { + <span class="string">'+'</span> <span class="op">=</span><span class="op">></span> <span class="prelude-val">Ok</span>(<span class="self">self</span>.<span class="ident">builder</span>.<span class="ident">fadd</span>(<span class="ident">l</span>, <span class="ident">r</span>)), + <span class="string">'-'</span> <span class="op">=</span><span class="op">></span> <span class="prelude-val">Ok</span>(<span class="self">self</span>.<span class="ident">builder</span>.<span class="ident">fsub</span>(<span class="ident">l</span>, <span class="ident">r</span>)), + <span class="string">'*'</span> <span class="op">=</span><span class="op">></span> <span class="prelude-val">Ok</span>(<span class="self">self</span>.<span class="ident">builder</span>.<span class="ident">fmul</span>(<span class="ident">l</span>, <span class="ident">r</span>)), + <span class="string">'<'</span> <span class="op">=</span><span class="op">></span> { + <span class="kw">let</span> <span class="ident">res</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">builder</span>.<span class="ident">fcmpult</span>(<span class="ident">l</span>, <span class="ident">r</span>); + <span class="comment">// Turn bool into f64.</span> + <span class="prelude-val">Ok</span>(<span class="self">self</span>.<span class="ident">builder</span>.<span class="ident">uitofp</span>(<span class="ident">res</span>, <span class="self">self</span>.<span class="ident">module</span>.<span class="ident">type_f64</span>())) + } + <span class="kw">_</span> <span class="op">=</span><span class="op">></span> <span class="prelude-val">Err</span>(<span class="string">"invalid binary operator"</span>.<span class="ident">into</span>()), + } + } + <span class="ident">ExprAST::Call</span>(<span class="ident">callee</span>, <span class="ident">args</span>) <span class="op">=</span><span class="op">></span> <span class="kw">match</span> <span class="self">self</span>.<span class="ident">module</span>.<span class="ident">get_fn</span>(<span class="ident">callee</span>) { + <span class="prelude-val">Some</span>(<span class="ident">callee</span>) <span class="op">=</span><span class="op">></span> { + <span class="kw">if</span> <span class="ident">callee</span>.<span class="ident">args</span>() <span class="op">!</span><span class="op">=</span> <span class="ident">args</span>.<span class="ident">len</span>() { + <span class="kw">return</span> <span class="prelude-val">Err</span>(<span class="string">"Incorrect # arguments passed"</span>.<span class="ident">into</span>()); + } + + <span class="comment">// Generate code for function argument expressions.</span> + <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">args</span>: <span class="ident">Vec</span><span class="op"><</span><span class="ident">Value</span><span class="op"><</span><span class="lifetime">'_</span><span class="op">></span><span class="op">></span> <span class="op">=</span> <span class="ident">args</span> + .<span class="ident">iter</span>() + .<span class="ident">map</span>(<span class="op">|</span><span class="ident">arg</span><span class="op">|</span> <span class="self">self</span>.<span class="ident">codegen_expr</span>(<span class="ident">arg</span>, <span class="ident">named_values</span>)) + .<span class="ident">collect</span>::<span class="op"><</span><span class="ident">CodegenResult</span><span class="op"><</span><span class="kw">_</span><span class="op">></span><span class="op">></span>()<span class="question-mark">?</span>; + + <span class="prelude-val">Ok</span>(<span class="self">self</span>.<span class="ident">builder</span>.<span class="ident">call</span>(<span class="ident">callee</span>, <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">args</span>)) + } + <span class="prelude-val">None</span> <span class="op">=</span><span class="op">></span> <span class="prelude-val">Err</span>(<span class="string">"Unknown function referenced"</span>.<span class="ident">into</span>()), + }, + } + } + + <span class="kw">fn</span> <span class="ident">codegen_prototype</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">PrototypeAST</span>(<span class="ident">name</span>, <span class="ident">args</span>): <span class="kw-2">&</span><span class="ident">PrototypeAST</span>) <span class="op">-</span><span class="op">></span> <span class="ident">FnValue</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span> { + <span class="kw">let</span> <span class="ident">type_f64</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">module</span>.<span class="ident">type_f64</span>(); + + <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">doubles</span> <span class="op">=</span> <span class="ident">Vec::new</span>(); + <span class="ident">doubles</span>.<span class="ident">resize</span>(<span class="ident">args</span>.<span class="ident">len</span>(), <span class="ident">type_f64</span>); + + <span class="comment">// Build the function type: fn(f64, f64, ..) -> f64</span> + <span class="kw">let</span> <span class="ident">ft</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">module</span>.<span class="ident">type_fn</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">doubles</span>, <span class="ident">type_f64</span>); + + <span class="comment">// Create the function declaration.</span> + <span class="kw">let</span> <span class="ident">f</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">module</span>.<span class="ident">add_fn</span>(<span class="ident">name</span>, <span class="ident">ft</span>); + + <span class="comment">// Set the names of the function arguments.</span> + <span class="kw">for</span> <span class="ident">idx</span> <span class="kw">in</span> <span class="number">0</span>..<span class="ident">f</span>.<span class="ident">args</span>() { + <span class="ident">f</span>.<span class="ident">arg</span>(<span class="ident">idx</span>).<span class="ident">set_name</span>(<span class="kw-2">&</span><span class="ident">args</span>[<span class="ident">idx</span>]); + } + + <span class="ident">f</span> + } + + <span class="kw">fn</span> <span class="ident">codegen_function</span>( + <span class="kw-2">&</span><span class="self">self</span>, + <span class="ident">FunctionAST</span>(<span class="ident">proto</span>, <span class="ident">body</span>): <span class="kw-2">&</span><span class="ident">FunctionAST</span>, + <span class="ident">named_values</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">HashMap</span><span class="op"><</span><span class="kw-2">&</span><span class="lifetime">'llvm</span> <span class="ident">str</span>, <span class="ident">Value</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span><span class="op">></span>, + ) <span class="op">-</span><span class="op">></span> <span class="ident">CodegenResult</span><span class="op"><</span><span class="ident">FnValue</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span><span class="op">></span> { + <span class="kw">let</span> <span class="ident">the_function</span> <span class="op">=</span> <span class="kw">match</span> <span class="self">self</span>.<span class="ident">module</span>.<span class="ident">get_fn</span>(<span class="kw-2">&</span><span class="ident">proto</span>.<span class="number">0</span>) { + <span class="prelude-val">Some</span>(<span class="ident">f</span>) <span class="op">=</span><span class="op">></span> <span class="ident">f</span>, + <span class="prelude-val">None</span> <span class="op">=</span><span class="op">></span> <span class="self">self</span>.<span class="ident">codegen_prototype</span>(<span class="ident">proto</span>), + }; + + <span class="kw">if</span> <span class="ident">the_function</span>.<span class="ident">basic_blocks</span>() <span class="op">></span> <span class="number">0</span> { + <span class="kw">return</span> <span class="prelude-val">Err</span>(<span class="string">"Function cannot be redefined."</span>.<span class="ident">into</span>()); + } + + <span class="comment">// Create entry basic block to insert code.</span> + <span class="kw">let</span> <span class="ident">bb</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">module</span>.<span class="ident">append_basic_block</span>(<span class="ident">the_function</span>); + <span class="self">self</span>.<span class="ident">builder</span>.<span class="ident">pos_at_end</span>(<span class="ident">bb</span>); + + <span class="comment">// New scope, clear the map with the function args.</span> + <span class="ident">named_values</span>.<span class="ident">clear</span>(); + + <span class="comment">// Update the map with the current functions args.</span> + <span class="kw">for</span> <span class="ident">idx</span> <span class="kw">in</span> <span class="number">0</span>..<span class="ident">the_function</span>.<span class="ident">args</span>() { + <span class="kw">let</span> <span class="ident">arg</span> <span class="op">=</span> <span class="ident">the_function</span>.<span class="ident">arg</span>(<span class="ident">idx</span>); + <span class="ident">named_values</span>.<span class="ident">insert</span>(<span class="ident">arg</span>.<span class="ident">get_name</span>(), <span class="ident">arg</span>); + } + + <span class="comment">// Codegen function body.</span> + <span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Ok</span>(<span class="ident">ret</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">codegen_expr</span>(<span class="ident">body</span>, <span class="ident">named_values</span>) { + <span class="self">self</span>.<span class="ident">builder</span>.<span class="ident">ret</span>(<span class="ident">ret</span>); + <span class="macro">assert!</span>(<span class="ident">the_function</span>.<span class="ident">verify</span>()); + <span class="prelude-val">Ok</span>(<span class="ident">the_function</span>) + } <span class="kw">else</span> { + <span class="macro">todo!</span>(<span class="string">"Failed to codegen function body, erase from module!"</span>); + } + } +} +</pre></div> +</section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="llvm_kaleidoscope_rs" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script><script src="../../source-script.js"></script><script src="../../source-files.js"></script></body></html>
\ No newline at end of file diff --git a/src/llvm_kaleidoscope_rs/lexer.rs.html b/src/llvm_kaleidoscope_rs/lexer.rs.html new file mode 100644 index 0000000..3524648 --- /dev/null +++ b/src/llvm_kaleidoscope_rs/lexer.rs.html @@ -0,0 +1,367 @@ +<!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 `src/lexer.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>lexer.rs - source</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg"> +<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"> +<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc source"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../llvm_kaleidoscope_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><div class="example-wrap"><pre class="line-numbers"><span id="1"> 1</span> +<span id="2"> 2</span> +<span id="3"> 3</span> +<span id="4"> 4</span> +<span id="5"> 5</span> +<span id="6"> 6</span> +<span id="7"> 7</span> +<span id="8"> 8</span> +<span id="9"> 9</span> +<span id="10"> 10</span> +<span id="11"> 11</span> +<span id="12"> 12</span> +<span id="13"> 13</span> +<span id="14"> 14</span> +<span id="15"> 15</span> +<span id="16"> 16</span> +<span id="17"> 17</span> +<span id="18"> 18</span> +<span id="19"> 19</span> +<span id="20"> 20</span> +<span id="21"> 21</span> +<span id="22"> 22</span> +<span id="23"> 23</span> +<span id="24"> 24</span> +<span id="25"> 25</span> +<span id="26"> 26</span> +<span id="27"> 27</span> +<span id="28"> 28</span> +<span id="29"> 29</span> +<span id="30"> 30</span> +<span id="31"> 31</span> +<span id="32"> 32</span> +<span id="33"> 33</span> +<span id="34"> 34</span> +<span id="35"> 35</span> +<span id="36"> 36</span> +<span id="37"> 37</span> +<span id="38"> 38</span> +<span id="39"> 39</span> +<span id="40"> 40</span> +<span id="41"> 41</span> +<span id="42"> 42</span> +<span id="43"> 43</span> +<span id="44"> 44</span> +<span id="45"> 45</span> +<span id="46"> 46</span> +<span id="47"> 47</span> +<span id="48"> 48</span> +<span id="49"> 49</span> +<span id="50"> 50</span> +<span id="51"> 51</span> +<span id="52"> 52</span> +<span id="53"> 53</span> +<span id="54"> 54</span> +<span id="55"> 55</span> +<span id="56"> 56</span> +<span id="57"> 57</span> +<span id="58"> 58</span> +<span id="59"> 59</span> +<span id="60"> 60</span> +<span id="61"> 61</span> +<span id="62"> 62</span> +<span id="63"> 63</span> +<span id="64"> 64</span> +<span id="65"> 65</span> +<span id="66"> 66</span> +<span id="67"> 67</span> +<span id="68"> 68</span> +<span id="69"> 69</span> +<span id="70"> 70</span> +<span id="71"> 71</span> +<span id="72"> 72</span> +<span id="73"> 73</span> +<span id="74"> 74</span> +<span id="75"> 75</span> +<span id="76"> 76</span> +<span id="77"> 77</span> +<span id="78"> 78</span> +<span id="79"> 79</span> +<span id="80"> 80</span> +<span id="81"> 81</span> +<span id="82"> 82</span> +<span id="83"> 83</span> +<span id="84"> 84</span> +<span id="85"> 85</span> +<span id="86"> 86</span> +<span id="87"> 87</span> +<span id="88"> 88</span> +<span id="89"> 89</span> +<span id="90"> 90</span> +<span id="91"> 91</span> +<span id="92"> 92</span> +<span id="93"> 93</span> +<span id="94"> 94</span> +<span id="95"> 95</span> +<span id="96"> 96</span> +<span id="97"> 97</span> +<span id="98"> 98</span> +<span id="99"> 99</span> +<span id="100">100</span> +<span id="101">101</span> +<span id="102">102</span> +<span id="103">103</span> +<span id="104">104</span> +<span id="105">105</span> +<span id="106">106</span> +<span id="107">107</span> +<span id="108">108</span> +<span id="109">109</span> +<span id="110">110</span> +<span id="111">111</span> +<span id="112">112</span> +<span id="113">113</span> +<span id="114">114</span> +<span id="115">115</span> +<span id="116">116</span> +<span id="117">117</span> +<span id="118">118</span> +<span id="119">119</span> +<span id="120">120</span> +<span id="121">121</span> +<span id="122">122</span> +<span id="123">123</span> +<span id="124">124</span> +<span id="125">125</span> +<span id="126">126</span> +<span id="127">127</span> +<span id="128">128</span> +<span id="129">129</span> +<span id="130">130</span> +<span id="131">131</span> +<span id="132">132</span> +<span id="133">133</span> +<span id="134">134</span> +<span id="135">135</span> +<span id="136">136</span> +<span id="137">137</span> +<span id="138">138</span> +<span id="139">139</span> +<span id="140">140</span> +<span id="141">141</span> +<span id="142">142</span> +<span id="143">143</span> +<span id="144">144</span> +<span id="145">145</span> +<span id="146">146</span> +<span id="147">147</span> +<span id="148">148</span> +<span id="149">149</span> +<span id="150">150</span> +<span id="151">151</span> +<span id="152">152</span> +<span id="153">153</span> +<span id="154">154</span> +<span id="155">155</span> +<span id="156">156</span> +<span id="157">157</span> +<span id="158">158</span> +<span id="159">159</span> +<span id="160">160</span> +<span id="161">161</span> +<span id="162">162</span> +<span id="163">163</span> +<span id="164">164</span> +<span id="165">165</span> +<span id="166">166</span> +<span id="167">167</span> +<span id="168">168</span> +<span id="169">169</span> +<span id="170">170</span> +<span id="171">171</span> +<span id="172">172</span> +<span id="173">173</span> +<span id="174">174</span> +<span id="175">175</span> +<span id="176">176</span> +<span id="177">177</span> +<span id="178">178</span> +<span id="179">179</span> +<span id="180">180</span> +<span id="181">181</span> +</pre><pre class="rust"> +<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Debug</span>, <span class="ident">PartialEq</span>)]</span> +<span class="kw">pub</span> <span class="kw">enum</span> <span class="ident">Token</span> { + <span class="ident">Eof</span>, + <span class="ident">Def</span>, + <span class="ident">Extern</span>, + <span class="ident">Identifier</span>(<span class="ident">String</span>), + <span class="ident">Number</span>(<span class="ident">f64</span>), + <span class="ident">Char</span>(<span class="ident">char</span>), +} + +<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">Lexer</span><span class="op"><</span><span class="ident">I</span><span class="op">></span> +<span class="kw">where</span> + <span class="ident">I</span>: <span class="ident">Iterator</span><span class="op"><</span><span class="ident">Item</span> <span class="op">=</span> <span class="ident">char</span><span class="op">></span>, +{ + <span class="ident">input</span>: <span class="ident">I</span>, + <span class="ident">last_char</span>: <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">char</span><span class="op">></span>, +} + +<span class="kw">impl</span><span class="op"><</span><span class="ident">I</span><span class="op">></span> <span class="ident">Lexer</span><span class="op"><</span><span class="ident">I</span><span class="op">></span> +<span class="kw">where</span> + <span class="ident">I</span>: <span class="ident">Iterator</span><span class="op"><</span><span class="ident">Item</span> <span class="op">=</span> <span class="ident">char</span><span class="op">></span>, +{ + <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>(<span class="kw-2">mut</span> <span class="ident">input</span>: <span class="ident">I</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Lexer</span><span class="op"><</span><span class="ident">I</span><span class="op">></span> { + <span class="kw">let</span> <span class="ident">last_char</span> <span class="op">=</span> <span class="ident">input</span>.<span class="ident">next</span>(); + <span class="ident">Lexer</span> { <span class="ident">input</span>, <span class="ident">last_char</span> } + } + + <span class="kw">fn</span> <span class="ident">step</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">char</span><span class="op">></span> { + <span class="self">self</span>.<span class="ident">last_char</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">input</span>.<span class="ident">next</span>(); + <span class="self">self</span>.<span class="ident">last_char</span> + } + + <span class="doccomment">/// Lex and return the next token.</span> + <span class="doccomment">///</span> + <span class="doccomment">/// Implement `int gettok();` from the tutorial.</span> + <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">gettok</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Token</span> { + <span class="comment">// Eat up whitespaces.</span> + <span class="kw">while</span> <span class="macro">matches!</span>(<span class="self">self</span>.<span class="ident">last_char</span>, <span class="prelude-val">Some</span>(<span class="ident">c</span>) <span class="kw">if</span> <span class="ident">c</span>.<span class="ident">is_ascii_whitespace</span>()) { + <span class="self">self</span>.<span class="ident">step</span>(); + } + + <span class="comment">// Unpack last char or return EOF.</span> + <span class="kw">let</span> <span class="ident">last_char</span> <span class="op">=</span> <span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">c</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">last_char</span> { + <span class="ident">c</span> + } <span class="kw">else</span> { + <span class="kw">return</span> <span class="ident">Token::Eof</span>; + }; + + <span class="comment">// Identifier: [a-zA-Z][a-zA-Z0-9]*</span> + <span class="kw">if</span> <span class="ident">last_char</span>.<span class="ident">is_ascii_alphabetic</span>() { + <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">ident</span> <span class="op">=</span> <span class="ident">String::new</span>(); + <span class="ident">ident</span>.<span class="ident">push</span>(<span class="ident">last_char</span>); + + <span class="kw">while</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">c</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">step</span>() { + <span class="kw">if</span> <span class="ident">c</span>.<span class="ident">is_ascii_alphanumeric</span>() { + <span class="ident">ident</span>.<span class="ident">push</span>(<span class="ident">c</span>) + } <span class="kw">else</span> { + <span class="kw">break</span>; + } + } + + <span class="kw">match</span> <span class="ident">ident</span>.<span class="ident">as_ref</span>() { + <span class="string">"def"</span> <span class="op">=</span><span class="op">></span> <span class="kw">return</span> <span class="ident">Token::Def</span>, + <span class="string">"extern"</span> <span class="op">=</span><span class="op">></span> <span class="kw">return</span> <span class="ident">Token::Extern</span>, + <span class="kw">_</span> <span class="op">=</span><span class="op">></span> {} + } + + <span class="kw">return</span> <span class="ident">Token::Identifier</span>(<span class="ident">ident</span>); + } + + <span class="comment">// Number: [0-9.]+</span> + <span class="kw">if</span> <span class="ident">last_char</span>.<span class="ident">is_ascii_digit</span>() <span class="op">|</span><span class="op">|</span> <span class="ident">last_char</span> <span class="op">=</span><span class="op">=</span> <span class="string">'.'</span> { + <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">num</span> <span class="op">=</span> <span class="ident">String::new</span>(); + <span class="ident">num</span>.<span class="ident">push</span>(<span class="ident">last_char</span>); + + <span class="kw">while</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">c</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">step</span>() { + <span class="kw">if</span> <span class="ident">c</span>.<span class="ident">is_ascii_digit</span>() <span class="op">|</span><span class="op">|</span> <span class="ident">c</span> <span class="op">=</span><span class="op">=</span> <span class="string">'.'</span> { + <span class="ident">num</span>.<span class="ident">push</span>(<span class="ident">c</span>) + } <span class="kw">else</span> { + <span class="kw">break</span>; + } + } + + <span class="kw">let</span> <span class="ident">num</span>: <span class="ident">f64</span> <span class="op">=</span> <span class="ident">num</span>.<span class="ident">parse</span>().<span class="ident">unwrap_or_default</span>(); + <span class="kw">return</span> <span class="ident">Token::Number</span>(<span class="ident">num</span>); + } + + <span class="comment">// Eat up comment.</span> + <span class="kw">if</span> <span class="ident">last_char</span> <span class="op">=</span><span class="op">=</span> <span class="string">'#'</span> { + <span class="kw">loop</span> { + <span class="kw">match</span> <span class="self">self</span>.<span class="ident">step</span>() { + <span class="prelude-val">Some</span>(<span class="ident">c</span>) <span class="kw">if</span> <span class="ident">c</span> <span class="op">=</span><span class="op">=</span> <span class="string">'\r'</span> <span class="op">|</span><span class="op">|</span> <span class="ident">c</span> <span class="op">=</span><span class="op">=</span> <span class="string">'\n'</span> <span class="op">=</span><span class="op">></span> <span class="kw">return</span> <span class="self">self</span>.<span class="ident">gettok</span>(), + <span class="prelude-val">None</span> <span class="op">=</span><span class="op">></span> <span class="kw">return</span> <span class="ident">Token::Eof</span>, + <span class="kw">_</span> <span class="op">=</span><span class="op">></span> { <span class="comment">/* consume comment */</span> } + } + } + } + + <span class="comment">// Advance last char and return currently last char.</span> + <span class="self">self</span>.<span class="ident">step</span>(); + <span class="ident">Token::Char</span>(<span class="ident">last_char</span>) + } +} + +<span class="attribute">#[<span class="ident">cfg</span>(<span class="ident">test</span>)]</span> +<span class="kw">mod</span> <span class="ident">test</span> { + <span class="kw">use</span> <span class="kw">super</span>::{<span class="ident">Lexer</span>, <span class="ident">Token</span>}; + + <span class="attribute">#[<span class="ident">test</span>]</span> + <span class="kw">fn</span> <span class="ident">test_identifier</span>() { + <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">lex</span> <span class="op">=</span> <span class="ident">Lexer::new</span>(<span class="string">"a b c"</span>.<span class="ident">chars</span>()); + <span class="macro">assert_eq!</span>(<span class="ident">Token::Identifier</span>(<span class="string">"a"</span>.<span class="ident">into</span>()), <span class="ident">lex</span>.<span class="ident">gettok</span>()); + <span class="macro">assert_eq!</span>(<span class="ident">Token::Identifier</span>(<span class="string">"b"</span>.<span class="ident">into</span>()), <span class="ident">lex</span>.<span class="ident">gettok</span>()); + <span class="macro">assert_eq!</span>(<span class="ident">Token::Identifier</span>(<span class="string">"c"</span>.<span class="ident">into</span>()), <span class="ident">lex</span>.<span class="ident">gettok</span>()); + <span class="macro">assert_eq!</span>(<span class="ident">Token::Eof</span>, <span class="ident">lex</span>.<span class="ident">gettok</span>()); + } + + <span class="attribute">#[<span class="ident">test</span>]</span> + <span class="kw">fn</span> <span class="ident">test_keyword</span>() { + <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">lex</span> <span class="op">=</span> <span class="ident">Lexer::new</span>(<span class="string">"def extern"</span>.<span class="ident">chars</span>()); + <span class="macro">assert_eq!</span>(<span class="ident">Token::Def</span>, <span class="ident">lex</span>.<span class="ident">gettok</span>()); + <span class="macro">assert_eq!</span>(<span class="ident">Token::Extern</span>, <span class="ident">lex</span>.<span class="ident">gettok</span>()); + <span class="macro">assert_eq!</span>(<span class="ident">Token::Eof</span>, <span class="ident">lex</span>.<span class="ident">gettok</span>()); + } + + <span class="attribute">#[<span class="ident">test</span>]</span> + <span class="kw">fn</span> <span class="ident">test_number</span>() { + <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">lex</span> <span class="op">=</span> <span class="ident">Lexer::new</span>(<span class="string">"12.34"</span>.<span class="ident">chars</span>()); + <span class="macro">assert_eq!</span>(<span class="ident">Token::Number</span>(<span class="number">12.34f64</span>), <span class="ident">lex</span>.<span class="ident">gettok</span>()); + <span class="macro">assert_eq!</span>(<span class="ident">Token::Eof</span>, <span class="ident">lex</span>.<span class="ident">gettok</span>()); + + <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">lex</span> <span class="op">=</span> <span class="ident">Lexer::new</span>(<span class="string">" 1.0 2.0 3.0"</span>.<span class="ident">chars</span>()); + <span class="macro">assert_eq!</span>(<span class="ident">Token::Number</span>(<span class="number">1.0f64</span>), <span class="ident">lex</span>.<span class="ident">gettok</span>()); + <span class="macro">assert_eq!</span>(<span class="ident">Token::Number</span>(<span class="number">2.0f64</span>), <span class="ident">lex</span>.<span class="ident">gettok</span>()); + <span class="macro">assert_eq!</span>(<span class="ident">Token::Number</span>(<span class="number">3.0f64</span>), <span class="ident">lex</span>.<span class="ident">gettok</span>()); + <span class="macro">assert_eq!</span>(<span class="ident">Token::Eof</span>, <span class="ident">lex</span>.<span class="ident">gettok</span>()); + + <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">lex</span> <span class="op">=</span> <span class="ident">Lexer::new</span>(<span class="string">"12.34.56"</span>.<span class="ident">chars</span>()); + <span class="macro">assert_eq!</span>(<span class="ident">Token::Number</span>(<span class="number">0f64</span>), <span class="ident">lex</span>.<span class="ident">gettok</span>()); + <span class="macro">assert_eq!</span>(<span class="ident">Token::Eof</span>, <span class="ident">lex</span>.<span class="ident">gettok</span>()); + } + + <span class="attribute">#[<span class="ident">test</span>]</span> + <span class="kw">fn</span> <span class="ident">test_comment</span>() { + <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">lex</span> <span class="op">=</span> <span class="ident">Lexer::new</span>(<span class="string">"# some comment"</span>.<span class="ident">chars</span>()); + <span class="macro">assert_eq!</span>(<span class="ident">Token::Eof</span>, <span class="ident">lex</span>.<span class="ident">gettok</span>()); + + <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">lex</span> <span class="op">=</span> <span class="ident">Lexer::new</span>(<span class="string">"abc # some comment \n xyz"</span>.<span class="ident">chars</span>()); + <span class="macro">assert_eq!</span>(<span class="ident">Token::Identifier</span>(<span class="string">"abc"</span>.<span class="ident">into</span>()), <span class="ident">lex</span>.<span class="ident">gettok</span>()); + <span class="macro">assert_eq!</span>(<span class="ident">Token::Identifier</span>(<span class="string">"xyz"</span>.<span class="ident">into</span>()), <span class="ident">lex</span>.<span class="ident">gettok</span>()); + <span class="macro">assert_eq!</span>(<span class="ident">Token::Eof</span>, <span class="ident">lex</span>.<span class="ident">gettok</span>()); + } + + <span class="attribute">#[<span class="ident">test</span>]</span> + <span class="kw">fn</span> <span class="ident">test_chars</span>() { + <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">lex</span> <span class="op">=</span> <span class="ident">Lexer::new</span>(<span class="string">"a+b-c"</span>.<span class="ident">chars</span>()); + <span class="macro">assert_eq!</span>(<span class="ident">Token::Identifier</span>(<span class="string">"a"</span>.<span class="ident">into</span>()), <span class="ident">lex</span>.<span class="ident">gettok</span>()); + <span class="macro">assert_eq!</span>(<span class="ident">Token::Char</span>(<span class="string">'+'</span>), <span class="ident">lex</span>.<span class="ident">gettok</span>()); + <span class="macro">assert_eq!</span>(<span class="ident">Token::Identifier</span>(<span class="string">"b"</span>.<span class="ident">into</span>()), <span class="ident">lex</span>.<span class="ident">gettok</span>()); + <span class="macro">assert_eq!</span>(<span class="ident">Token::Char</span>(<span class="string">'-'</span>), <span class="ident">lex</span>.<span class="ident">gettok</span>()); + <span class="macro">assert_eq!</span>(<span class="ident">Token::Identifier</span>(<span class="string">"c"</span>.<span class="ident">into</span>()), <span class="ident">lex</span>.<span class="ident">gettok</span>()); + <span class="macro">assert_eq!</span>(<span class="ident">Token::Eof</span>, <span class="ident">lex</span>.<span class="ident">gettok</span>()); + } + + <span class="attribute">#[<span class="ident">test</span>]</span> + <span class="kw">fn</span> <span class="ident">test_whitespaces</span>() { + <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">lex</span> <span class="op">=</span> <span class="ident">Lexer::new</span>(<span class="string">" +a b c! "</span>.<span class="ident">chars</span>()); + <span class="macro">assert_eq!</span>(<span class="ident">Token::Char</span>(<span class="string">'+'</span>), <span class="ident">lex</span>.<span class="ident">gettok</span>()); + <span class="macro">assert_eq!</span>(<span class="ident">Token::Identifier</span>(<span class="string">"a"</span>.<span class="ident">into</span>()), <span class="ident">lex</span>.<span class="ident">gettok</span>()); + <span class="macro">assert_eq!</span>(<span class="ident">Token::Identifier</span>(<span class="string">"b"</span>.<span class="ident">into</span>()), <span class="ident">lex</span>.<span class="ident">gettok</span>()); + <span class="macro">assert_eq!</span>(<span class="ident">Token::Identifier</span>(<span class="string">"c"</span>.<span class="ident">into</span>()), <span class="ident">lex</span>.<span class="ident">gettok</span>()); + <span class="macro">assert_eq!</span>(<span class="ident">Token::Char</span>(<span class="string">'!'</span>), <span class="ident">lex</span>.<span class="ident">gettok</span>()); + <span class="macro">assert_eq!</span>(<span class="ident">Token::Eof</span>, <span class="ident">lex</span>.<span class="ident">gettok</span>()); + + <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">lex</span> <span class="op">=</span> <span class="ident">Lexer::new</span>(<span class="string">"\n a \n\r b \r \n c \r\r \n "</span>.<span class="ident">chars</span>()); + <span class="macro">assert_eq!</span>(<span class="ident">Token::Identifier</span>(<span class="string">"a"</span>.<span class="ident">into</span>()), <span class="ident">lex</span>.<span class="ident">gettok</span>()); + <span class="macro">assert_eq!</span>(<span class="ident">Token::Identifier</span>(<span class="string">"b"</span>.<span class="ident">into</span>()), <span class="ident">lex</span>.<span class="ident">gettok</span>()); + <span class="macro">assert_eq!</span>(<span class="ident">Token::Identifier</span>(<span class="string">"c"</span>.<span class="ident">into</span>()), <span class="ident">lex</span>.<span class="ident">gettok</span>()); + <span class="macro">assert_eq!</span>(<span class="ident">Token::Eof</span>, <span class="ident">lex</span>.<span class="ident">gettok</span>()); + } +} +</pre></div> +</section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="llvm_kaleidoscope_rs" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script><script src="../../source-script.js"></script><script src="../../source-files.js"></script></body></html>
\ No newline at end of file diff --git a/src/llvm_kaleidoscope_rs/lib.rs.html b/src/llvm_kaleidoscope_rs/lib.rs.html new file mode 100644 index 0000000..d2fcdb6 --- /dev/null +++ b/src/llvm_kaleidoscope_rs/lib.rs.html @@ -0,0 +1,223 @@ +<!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 `src/lib.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>lib.rs - source</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg"> +<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"> +<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc source"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../llvm_kaleidoscope_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><div class="example-wrap"><pre class="line-numbers"><span id="1"> 1</span> +<span id="2"> 2</span> +<span id="3"> 3</span> +<span id="4"> 4</span> +<span id="5"> 5</span> +<span id="6"> 6</span> +<span id="7"> 7</span> +<span id="8"> 8</span> +<span id="9"> 9</span> +<span id="10"> 10</span> +<span id="11"> 11</span> +<span id="12"> 12</span> +<span id="13"> 13</span> +<span id="14"> 14</span> +<span id="15"> 15</span> +<span id="16"> 16</span> +<span id="17"> 17</span> +<span id="18"> 18</span> +<span id="19"> 19</span> +<span id="20"> 20</span> +<span id="21"> 21</span> +<span id="22"> 22</span> +<span id="23"> 23</span> +<span id="24"> 24</span> +<span id="25"> 25</span> +<span id="26"> 26</span> +<span id="27"> 27</span> +<span id="28"> 28</span> +<span id="29"> 29</span> +<span id="30"> 30</span> +<span id="31"> 31</span> +<span id="32"> 32</span> +<span id="33"> 33</span> +<span id="34"> 34</span> +<span id="35"> 35</span> +<span id="36"> 36</span> +<span id="37"> 37</span> +<span id="38"> 38</span> +<span id="39"> 39</span> +<span id="40"> 40</span> +<span id="41"> 41</span> +<span id="42"> 42</span> +<span id="43"> 43</span> +<span id="44"> 44</span> +<span id="45"> 45</span> +<span id="46"> 46</span> +<span id="47"> 47</span> +<span id="48"> 48</span> +<span id="49"> 49</span> +<span id="50"> 50</span> +<span id="51"> 51</span> +<span id="52"> 52</span> +<span id="53"> 53</span> +<span id="54"> 54</span> +<span id="55"> 55</span> +<span id="56"> 56</span> +<span id="57"> 57</span> +<span id="58"> 58</span> +<span id="59"> 59</span> +<span id="60"> 60</span> +<span id="61"> 61</span> +<span id="62"> 62</span> +<span id="63"> 63</span> +<span id="64"> 64</span> +<span id="65"> 65</span> +<span id="66"> 66</span> +<span id="67"> 67</span> +<span id="68"> 68</span> +<span id="69"> 69</span> +<span id="70"> 70</span> +<span id="71"> 71</span> +<span id="72"> 72</span> +<span id="73"> 73</span> +<span id="74"> 74</span> +<span id="75"> 75</span> +<span id="76"> 76</span> +<span id="77"> 77</span> +<span id="78"> 78</span> +<span id="79"> 79</span> +<span id="80"> 80</span> +<span id="81"> 81</span> +<span id="82"> 82</span> +<span id="83"> 83</span> +<span id="84"> 84</span> +<span id="85"> 85</span> +<span id="86"> 86</span> +<span id="87"> 87</span> +<span id="88"> 88</span> +<span id="89"> 89</span> +<span id="90"> 90</span> +<span id="91"> 91</span> +<span id="92"> 92</span> +<span id="93"> 93</span> +<span id="94"> 94</span> +<span id="95"> 95</span> +<span id="96"> 96</span> +<span id="97"> 97</span> +<span id="98"> 98</span> +<span id="99"> 99</span> +<span id="100">100</span> +<span id="101">101</span> +<span id="102">102</span> +<span id="103">103</span> +<span id="104">104</span> +<span id="105">105</span> +<span id="106">106</span> +<span id="107">107</span> +<span id="108">108</span> +<span id="109">109</span> +</pre><pre class="rust"> +<span class="kw">use</span> <span class="ident">std::convert::TryFrom</span>; + +<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">codegen</span>; +<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">lexer</span>; +<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">llvm</span>; +<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">parser</span>; + +<span class="doccomment">/// Fixed size of [`SmallCStr`] including the trailing `\0` byte.</span> +<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">SMALL_STR_SIZE</span>: <span class="ident">usize</span> <span class="op">=</span> <span class="number">16</span>; + +<span class="doccomment">/// Small C string on the stack with fixed size [`SMALL_STR_SIZE`].</span> +<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Debug</span>, <span class="ident">PartialEq</span>)]</span> +<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">SmallCStr</span>([<span class="ident">u8</span>; <span class="ident">SMALL_STR_SIZE</span>]); + +<span class="kw">impl</span> <span class="ident">SmallCStr</span> { + <span class="doccomment">/// Create a new C string from `src`.</span> + <span class="doccomment">/// Returns [`None`] if `src` exceeds the fixed size or contains any `\0` bytes.</span> + <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span><span class="op"><</span><span class="ident">T</span>: <span class="ident">AsRef</span><span class="op"><</span>[<span class="ident">u8</span>]<span class="op">></span><span class="op">></span>(<span class="ident">src</span>: <span class="kw-2">&</span><span class="ident">T</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">SmallCStr</span><span class="op">></span> { + <span class="kw">let</span> <span class="ident">src</span> <span class="op">=</span> <span class="ident">src</span>.<span class="ident">as_ref</span>(); + <span class="kw">let</span> <span class="ident">len</span> <span class="op">=</span> <span class="ident">src</span>.<span class="ident">len</span>(); + + <span class="comment">// Check for \0 bytes.</span> + <span class="kw">let</span> <span class="ident">contains_null</span> <span class="op">=</span> <span class="kw">unsafe</span> { <span class="op">!</span><span class="ident">libc::memchr</span>(<span class="ident">src</span>.<span class="ident">as_ptr</span>().<span class="ident">cast</span>(), <span class="number">0</span>, <span class="ident">len</span>).<span class="ident">is_null</span>() }; + + <span class="kw">if</span> <span class="ident">contains_null</span> <span class="op">|</span><span class="op">|</span> <span class="ident">len</span> <span class="op">></span> <span class="ident">SMALL_STR_SIZE</span> <span class="op">-</span> <span class="number">1</span> { + <span class="prelude-val">None</span> + } <span class="kw">else</span> { + <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">dest</span> <span class="op">=</span> [<span class="number">0</span>; <span class="ident">SMALL_STR_SIZE</span>]; + <span class="ident">dest</span>[..<span class="ident">len</span>].<span class="ident">copy_from_slice</span>(<span class="ident">src</span>); + <span class="prelude-val">Some</span>(<span class="ident">SmallCStr</span>(<span class="ident">dest</span>)) + } + } + + <span class="doccomment">/// Return pointer to C string.</span> + <span class="kw">pub</span> <span class="kw">const</span> <span class="kw">fn</span> <span class="ident">as_ptr</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="kw-2">*</span><span class="kw">const</span> <span class="ident">libc::c_char</span> { + <span class="self">self</span>.<span class="number">0</span>.<span class="ident">as_ptr</span>().<span class="ident">cast</span>() + } +} + +<span class="kw">impl</span> <span class="ident">TryFrom</span><span class="op"><</span><span class="kw-2">&</span><span class="ident">str</span><span class="op">></span> <span class="kw">for</span> <span class="ident">SmallCStr</span> { + <span class="kw">type</span> <span class="ident">Error</span> <span class="op">=</span> (); + + <span class="kw">fn</span> <span class="ident">try_from</span>(<span class="ident">value</span>: <span class="kw-2">&</span><span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Result</span><span class="op"><</span><span class="self">Self</span>, <span class="self">Self</span><span class="ident">::Error</span><span class="op">></span> { + <span class="ident">SmallCStr::new</span>(<span class="kw-2">&</span><span class="ident">value</span>).<span class="ident">ok_or</span>(()) + } +} + +<span class="doccomment">/// Either type, for APIs accepting two types.</span> +<span class="kw">pub</span> <span class="kw">enum</span> <span class="ident">Either</span><span class="op"><</span><span class="ident">A</span>, <span class="ident">B</span><span class="op">></span> { + <span class="ident">A</span>(<span class="ident">A</span>), + <span class="ident">B</span>(<span class="ident">B</span>), +} + +<span class="attribute">#[<span class="ident">cfg</span>(<span class="ident">test</span>)]</span> +<span class="kw">mod</span> <span class="ident">test</span> { + <span class="kw">use</span> <span class="kw">super</span>::{<span class="ident">SmallCStr</span>, <span class="ident">SMALL_STR_SIZE</span>}; + <span class="kw">use</span> <span class="ident">std::convert::TryInto</span>; + + <span class="attribute">#[<span class="ident">test</span>]</span> + <span class="kw">fn</span> <span class="ident">test_create</span>() { + <span class="kw">let</span> <span class="ident">src</span> <span class="op">=</span> <span class="string">"\x30\x31\x32\x33"</span>; + <span class="kw">let</span> <span class="ident">scs</span> <span class="op">=</span> <span class="ident">SmallCStr::new</span>(<span class="kw-2">&</span><span class="ident">src</span>).<span class="ident">unwrap</span>(); + <span class="macro">assert_eq!</span>(<span class="kw-2">&</span><span class="ident">scs</span>.<span class="number">0</span>[..<span class="number">5</span>], <span class="kw-2">&</span>[<span class="number">0x30</span>, <span class="number">0x31</span>, <span class="number">0x32</span>, <span class="number">0x33</span>, <span class="number">0x00</span>]); + + <span class="kw">let</span> <span class="ident">src</span> <span class="op">=</span> <span class="string">b"abcd1234"</span>; + <span class="kw">let</span> <span class="ident">scs</span> <span class="op">=</span> <span class="ident">SmallCStr::new</span>(<span class="kw-2">&</span><span class="ident">src</span>).<span class="ident">unwrap</span>(); + <span class="macro">assert_eq!</span>( + <span class="kw-2">&</span><span class="ident">scs</span>.<span class="number">0</span>[..<span class="number">9</span>], + <span class="kw-2">&</span>[<span class="number">0x61</span>, <span class="number">0x62</span>, <span class="number">0x63</span>, <span class="number">0x64</span>, <span class="number">0x31</span>, <span class="number">0x32</span>, <span class="number">0x33</span>, <span class="number">0x34</span>, <span class="number">0x00</span>] + ); + } + + <span class="attribute">#[<span class="ident">test</span>]</span> + <span class="kw">fn</span> <span class="ident">test_contain_null</span>() { + <span class="kw">let</span> <span class="ident">src</span> <span class="op">=</span> <span class="string">"\x30\x00\x32\x33"</span>; + <span class="kw">let</span> <span class="ident">scs</span> <span class="op">=</span> <span class="ident">SmallCStr::new</span>(<span class="kw-2">&</span><span class="ident">src</span>); + <span class="macro">assert_eq!</span>(<span class="ident">scs</span>, <span class="prelude-val">None</span>); + + <span class="kw">let</span> <span class="ident">src</span> <span class="op">=</span> <span class="string">"\x30\x31\x32\x33\x00"</span>; + <span class="kw">let</span> <span class="ident">scs</span> <span class="op">=</span> <span class="ident">SmallCStr::new</span>(<span class="kw-2">&</span><span class="ident">src</span>); + <span class="macro">assert_eq!</span>(<span class="ident">scs</span>, <span class="prelude-val">None</span>); + } + + <span class="attribute">#[<span class="ident">test</span>]</span> + <span class="kw">fn</span> <span class="ident">test_too_large</span>() { + <span class="kw">let</span> <span class="ident">src</span> <span class="op">=</span> (<span class="number">0</span>..<span class="ident">SMALL_STR_SIZE</span>).<span class="ident">map</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="string">'a'</span>).<span class="ident">collect</span>::<span class="op"><</span><span class="ident">String</span><span class="op">></span>(); + <span class="kw">let</span> <span class="ident">scs</span> <span class="op">=</span> <span class="ident">SmallCStr::new</span>(<span class="kw-2">&</span><span class="ident">src</span>); + <span class="macro">assert_eq!</span>(<span class="ident">scs</span>, <span class="prelude-val">None</span>); + + <span class="kw">let</span> <span class="ident">src</span> <span class="op">=</span> (<span class="number">0</span>..<span class="ident">SMALL_STR_SIZE</span> <span class="op">+</span> <span class="number">10</span>).<span class="ident">map</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="string">'a'</span>).<span class="ident">collect</span>::<span class="op"><</span><span class="ident">String</span><span class="op">></span>(); + <span class="kw">let</span> <span class="ident">scs</span> <span class="op">=</span> <span class="ident">SmallCStr::new</span>(<span class="kw-2">&</span><span class="ident">src</span>); + <span class="macro">assert_eq!</span>(<span class="ident">scs</span>, <span class="prelude-val">None</span>); + } + + <span class="attribute">#[<span class="ident">test</span>]</span> + <span class="kw">fn</span> <span class="ident">test_try_into</span>() { + <span class="kw">let</span> <span class="ident">src</span> <span class="op">=</span> <span class="string">"\x30\x31\x32\x33"</span>; + <span class="kw">let</span> <span class="ident">scs</span>: <span class="prelude-ty">Result</span><span class="op"><</span><span class="ident">SmallCStr</span>, ()<span class="op">></span> <span class="op">=</span> <span class="ident">src</span>.<span class="ident">try_into</span>(); + <span class="macro">assert!</span>(<span class="ident">scs</span>.<span class="ident">is_ok</span>()); + + <span class="kw">let</span> <span class="ident">src</span> <span class="op">=</span> (<span class="number">0</span>..<span class="ident">SMALL_STR_SIZE</span>).<span class="ident">map</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="string">'a'</span>).<span class="ident">collect</span>::<span class="op"><</span><span class="ident">String</span><span class="op">></span>(); + <span class="kw">let</span> <span class="ident">scs</span>: <span class="prelude-ty">Result</span><span class="op"><</span><span class="ident">SmallCStr</span>, ()<span class="op">></span> <span class="op">=</span> <span class="ident">src</span>.<span class="ident">as_str</span>().<span class="ident">try_into</span>(); + <span class="macro">assert!</span>(<span class="ident">scs</span>.<span class="ident">is_err</span>()); + + <span class="kw">let</span> <span class="ident">src</span> <span class="op">=</span> (<span class="number">0</span>..<span class="ident">SMALL_STR_SIZE</span> <span class="op">+</span> <span class="number">10</span>).<span class="ident">map</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="string">'a'</span>).<span class="ident">collect</span>::<span class="op"><</span><span class="ident">String</span><span class="op">></span>(); + <span class="kw">let</span> <span class="ident">scs</span>: <span class="prelude-ty">Result</span><span class="op"><</span><span class="ident">SmallCStr</span>, ()<span class="op">></span> <span class="op">=</span> <span class="ident">src</span>.<span class="ident">as_str</span>().<span class="ident">try_into</span>(); + <span class="macro">assert!</span>(<span class="ident">scs</span>.<span class="ident">is_err</span>()); + } +} +</pre></div> +</section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="llvm_kaleidoscope_rs" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script><script src="../../source-script.js"></script><script src="../../source-files.js"></script></body></html>
\ No newline at end of file diff --git a/src/llvm_kaleidoscope_rs/llvm.rs.html b/src/llvm_kaleidoscope_rs/llvm.rs.html new file mode 100644 index 0000000..2da418a --- /dev/null +++ b/src/llvm_kaleidoscope_rs/llvm.rs.html @@ -0,0 +1,1073 @@ +<!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 `src/llvm.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>llvm.rs - source</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg"> +<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"> +<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc source"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../llvm_kaleidoscope_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><div class="example-wrap"><pre class="line-numbers"><span id="1"> 1</span> +<span id="2"> 2</span> +<span id="3"> 3</span> +<span id="4"> 4</span> +<span id="5"> 5</span> +<span id="6"> 6</span> +<span id="7"> 7</span> +<span id="8"> 8</span> +<span id="9"> 9</span> +<span id="10"> 10</span> +<span id="11"> 11</span> +<span id="12"> 12</span> +<span id="13"> 13</span> +<span id="14"> 14</span> +<span id="15"> 15</span> +<span id="16"> 16</span> +<span id="17"> 17</span> +<span id="18"> 18</span> +<span id="19"> 19</span> +<span id="20"> 20</span> +<span id="21"> 21</span> +<span id="22"> 22</span> +<span id="23"> 23</span> +<span id="24"> 24</span> +<span id="25"> 25</span> +<span id="26"> 26</span> +<span id="27"> 27</span> +<span id="28"> 28</span> +<span id="29"> 29</span> +<span id="30"> 30</span> +<span id="31"> 31</span> +<span id="32"> 32</span> +<span id="33"> 33</span> +<span id="34"> 34</span> +<span id="35"> 35</span> +<span id="36"> 36</span> +<span id="37"> 37</span> +<span id="38"> 38</span> +<span id="39"> 39</span> +<span id="40"> 40</span> +<span id="41"> 41</span> +<span id="42"> 42</span> +<span id="43"> 43</span> +<span id="44"> 44</span> +<span id="45"> 45</span> +<span id="46"> 46</span> +<span id="47"> 47</span> +<span id="48"> 48</span> +<span id="49"> 49</span> +<span id="50"> 50</span> +<span id="51"> 51</span> +<span id="52"> 52</span> +<span id="53"> 53</span> +<span id="54"> 54</span> +<span id="55"> 55</span> +<span id="56"> 56</span> +<span id="57"> 57</span> +<span id="58"> 58</span> +<span id="59"> 59</span> +<span id="60"> 60</span> +<span id="61"> 61</span> +<span id="62"> 62</span> +<span id="63"> 63</span> +<span id="64"> 64</span> +<span id="65"> 65</span> +<span id="66"> 66</span> +<span id="67"> 67</span> +<span id="68"> 68</span> +<span id="69"> 69</span> +<span id="70"> 70</span> +<span id="71"> 71</span> +<span id="72"> 72</span> +<span id="73"> 73</span> +<span id="74"> 74</span> +<span id="75"> 75</span> +<span id="76"> 76</span> +<span id="77"> 77</span> +<span id="78"> 78</span> +<span id="79"> 79</span> +<span id="80"> 80</span> +<span id="81"> 81</span> +<span id="82"> 82</span> +<span id="83"> 83</span> +<span id="84"> 84</span> +<span id="85"> 85</span> +<span id="86"> 86</span> +<span id="87"> 87</span> +<span id="88"> 88</span> +<span id="89"> 89</span> +<span id="90"> 90</span> +<span id="91"> 91</span> +<span id="92"> 92</span> +<span id="93"> 93</span> +<span id="94"> 94</span> +<span id="95"> 95</span> +<span id="96"> 96</span> +<span id="97"> 97</span> +<span id="98"> 98</span> +<span id="99"> 99</span> +<span id="100">100</span> +<span id="101">101</span> +<span id="102">102</span> +<span id="103">103</span> +<span id="104">104</span> +<span id="105">105</span> +<span id="106">106</span> +<span id="107">107</span> +<span id="108">108</span> +<span id="109">109</span> +<span id="110">110</span> +<span id="111">111</span> +<span id="112">112</span> +<span id="113">113</span> +<span id="114">114</span> +<span id="115">115</span> +<span id="116">116</span> +<span id="117">117</span> +<span id="118">118</span> +<span id="119">119</span> +<span id="120">120</span> +<span id="121">121</span> +<span id="122">122</span> +<span id="123">123</span> +<span id="124">124</span> +<span id="125">125</span> +<span id="126">126</span> +<span id="127">127</span> +<span id="128">128</span> +<span id="129">129</span> +<span id="130">130</span> +<span id="131">131</span> +<span id="132">132</span> +<span id="133">133</span> +<span id="134">134</span> +<span id="135">135</span> +<span id="136">136</span> +<span id="137">137</span> +<span id="138">138</span> +<span id="139">139</span> +<span id="140">140</span> +<span id="141">141</span> +<span id="142">142</span> +<span id="143">143</span> +<span id="144">144</span> +<span id="145">145</span> +<span id="146">146</span> +<span id="147">147</span> +<span id="148">148</span> +<span id="149">149</span> +<span id="150">150</span> +<span id="151">151</span> +<span id="152">152</span> +<span id="153">153</span> +<span id="154">154</span> +<span id="155">155</span> +<span id="156">156</span> +<span id="157">157</span> +<span id="158">158</span> +<span id="159">159</span> +<span id="160">160</span> +<span id="161">161</span> +<span id="162">162</span> +<span id="163">163</span> +<span id="164">164</span> +<span id="165">165</span> +<span id="166">166</span> +<span id="167">167</span> +<span id="168">168</span> +<span id="169">169</span> +<span id="170">170</span> +<span id="171">171</span> +<span id="172">172</span> +<span id="173">173</span> +<span id="174">174</span> +<span id="175">175</span> +<span id="176">176</span> +<span id="177">177</span> +<span id="178">178</span> +<span id="179">179</span> +<span id="180">180</span> +<span id="181">181</span> +<span id="182">182</span> +<span id="183">183</span> +<span id="184">184</span> +<span id="185">185</span> +<span id="186">186</span> +<span id="187">187</span> +<span id="188">188</span> +<span id="189">189</span> +<span id="190">190</span> +<span id="191">191</span> +<span id="192">192</span> +<span id="193">193</span> +<span id="194">194</span> +<span id="195">195</span> +<span id="196">196</span> +<span id="197">197</span> +<span id="198">198</span> +<span id="199">199</span> +<span id="200">200</span> +<span id="201">201</span> +<span id="202">202</span> +<span id="203">203</span> +<span id="204">204</span> +<span id="205">205</span> +<span id="206">206</span> +<span id="207">207</span> +<span id="208">208</span> +<span id="209">209</span> +<span id="210">210</span> +<span id="211">211</span> +<span id="212">212</span> +<span id="213">213</span> +<span id="214">214</span> +<span id="215">215</span> +<span id="216">216</span> +<span id="217">217</span> +<span id="218">218</span> +<span id="219">219</span> +<span id="220">220</span> +<span id="221">221</span> +<span id="222">222</span> +<span id="223">223</span> +<span id="224">224</span> +<span id="225">225</span> +<span id="226">226</span> +<span id="227">227</span> +<span id="228">228</span> +<span id="229">229</span> +<span id="230">230</span> +<span id="231">231</span> +<span id="232">232</span> +<span id="233">233</span> +<span id="234">234</span> +<span id="235">235</span> +<span id="236">236</span> +<span id="237">237</span> +<span id="238">238</span> +<span id="239">239</span> +<span id="240">240</span> +<span id="241">241</span> +<span id="242">242</span> +<span id="243">243</span> +<span id="244">244</span> +<span id="245">245</span> +<span id="246">246</span> +<span id="247">247</span> +<span id="248">248</span> +<span id="249">249</span> +<span id="250">250</span> +<span id="251">251</span> +<span id="252">252</span> +<span id="253">253</span> +<span id="254">254</span> +<span id="255">255</span> +<span id="256">256</span> +<span id="257">257</span> +<span id="258">258</span> +<span id="259">259</span> +<span id="260">260</span> +<span id="261">261</span> +<span id="262">262</span> +<span id="263">263</span> +<span id="264">264</span> +<span id="265">265</span> +<span id="266">266</span> +<span id="267">267</span> +<span id="268">268</span> +<span id="269">269</span> +<span id="270">270</span> +<span id="271">271</span> +<span id="272">272</span> +<span id="273">273</span> +<span id="274">274</span> +<span id="275">275</span> +<span id="276">276</span> +<span id="277">277</span> +<span id="278">278</span> +<span id="279">279</span> +<span id="280">280</span> +<span id="281">281</span> +<span id="282">282</span> +<span id="283">283</span> +<span id="284">284</span> +<span id="285">285</span> +<span id="286">286</span> +<span id="287">287</span> +<span id="288">288</span> +<span id="289">289</span> +<span id="290">290</span> +<span id="291">291</span> +<span id="292">292</span> +<span id="293">293</span> +<span id="294">294</span> +<span id="295">295</span> +<span id="296">296</span> +<span id="297">297</span> +<span id="298">298</span> +<span id="299">299</span> +<span id="300">300</span> +<span id="301">301</span> +<span id="302">302</span> +<span id="303">303</span> +<span id="304">304</span> +<span id="305">305</span> +<span id="306">306</span> +<span id="307">307</span> +<span id="308">308</span> +<span id="309">309</span> +<span id="310">310</span> +<span id="311">311</span> +<span id="312">312</span> +<span id="313">313</span> +<span id="314">314</span> +<span id="315">315</span> +<span id="316">316</span> +<span id="317">317</span> +<span id="318">318</span> +<span id="319">319</span> +<span id="320">320</span> +<span id="321">321</span> +<span id="322">322</span> +<span id="323">323</span> +<span id="324">324</span> +<span id="325">325</span> +<span id="326">326</span> +<span id="327">327</span> +<span id="328">328</span> +<span id="329">329</span> +<span id="330">330</span> +<span id="331">331</span> +<span id="332">332</span> +<span id="333">333</span> +<span id="334">334</span> +<span id="335">335</span> +<span id="336">336</span> +<span id="337">337</span> +<span id="338">338</span> +<span id="339">339</span> +<span id="340">340</span> +<span id="341">341</span> +<span id="342">342</span> +<span id="343">343</span> +<span id="344">344</span> +<span id="345">345</span> +<span id="346">346</span> +<span id="347">347</span> +<span id="348">348</span> +<span id="349">349</span> +<span id="350">350</span> +<span id="351">351</span> +<span id="352">352</span> +<span id="353">353</span> +<span id="354">354</span> +<span id="355">355</span> +<span id="356">356</span> +<span id="357">357</span> +<span id="358">358</span> +<span id="359">359</span> +<span id="360">360</span> +<span id="361">361</span> +<span id="362">362</span> +<span id="363">363</span> +<span id="364">364</span> +<span id="365">365</span> +<span id="366">366</span> +<span id="367">367</span> +<span id="368">368</span> +<span id="369">369</span> +<span id="370">370</span> +<span id="371">371</span> +<span id="372">372</span> +<span id="373">373</span> +<span id="374">374</span> +<span id="375">375</span> +<span id="376">376</span> +<span id="377">377</span> +<span id="378">378</span> +<span id="379">379</span> +<span id="380">380</span> +<span id="381">381</span> +<span id="382">382</span> +<span id="383">383</span> +<span id="384">384</span> +<span id="385">385</span> +<span id="386">386</span> +<span id="387">387</span> +<span id="388">388</span> +<span id="389">389</span> +<span id="390">390</span> +<span id="391">391</span> +<span id="392">392</span> +<span id="393">393</span> +<span id="394">394</span> +<span id="395">395</span> +<span id="396">396</span> +<span id="397">397</span> +<span id="398">398</span> +<span id="399">399</span> +<span id="400">400</span> +<span id="401">401</span> +<span id="402">402</span> +<span id="403">403</span> +<span id="404">404</span> +<span id="405">405</span> +<span id="406">406</span> +<span id="407">407</span> +<span id="408">408</span> +<span id="409">409</span> +<span id="410">410</span> +<span id="411">411</span> +<span id="412">412</span> +<span id="413">413</span> +<span id="414">414</span> +<span id="415">415</span> +<span id="416">416</span> +<span id="417">417</span> +<span id="418">418</span> +<span id="419">419</span> +<span id="420">420</span> +<span id="421">421</span> +<span id="422">422</span> +<span id="423">423</span> +<span id="424">424</span> +<span id="425">425</span> +<span id="426">426</span> +<span id="427">427</span> +<span id="428">428</span> +<span id="429">429</span> +<span id="430">430</span> +<span id="431">431</span> +<span id="432">432</span> +<span id="433">433</span> +<span id="434">434</span> +<span id="435">435</span> +<span id="436">436</span> +<span id="437">437</span> +<span id="438">438</span> +<span id="439">439</span> +<span id="440">440</span> +<span id="441">441</span> +<span id="442">442</span> +<span id="443">443</span> +<span id="444">444</span> +<span id="445">445</span> +<span id="446">446</span> +<span id="447">447</span> +<span id="448">448</span> +<span id="449">449</span> +<span id="450">450</span> +<span id="451">451</span> +<span id="452">452</span> +<span id="453">453</span> +<span id="454">454</span> +<span id="455">455</span> +<span id="456">456</span> +<span id="457">457</span> +<span id="458">458</span> +<span id="459">459</span> +<span id="460">460</span> +<span id="461">461</span> +<span id="462">462</span> +<span id="463">463</span> +<span id="464">464</span> +<span id="465">465</span> +<span id="466">466</span> +<span id="467">467</span> +<span id="468">468</span> +<span id="469">469</span> +<span id="470">470</span> +<span id="471">471</span> +<span id="472">472</span> +<span id="473">473</span> +<span id="474">474</span> +<span id="475">475</span> +<span id="476">476</span> +<span id="477">477</span> +<span id="478">478</span> +<span id="479">479</span> +<span id="480">480</span> +<span id="481">481</span> +<span id="482">482</span> +<span id="483">483</span> +<span id="484">484</span> +<span id="485">485</span> +<span id="486">486</span> +<span id="487">487</span> +<span id="488">488</span> +<span id="489">489</span> +<span id="490">490</span> +<span id="491">491</span> +<span id="492">492</span> +<span id="493">493</span> +<span id="494">494</span> +<span id="495">495</span> +<span id="496">496</span> +<span id="497">497</span> +<span id="498">498</span> +<span id="499">499</span> +<span id="500">500</span> +<span id="501">501</span> +<span id="502">502</span> +<span id="503">503</span> +<span id="504">504</span> +<span id="505">505</span> +<span id="506">506</span> +<span id="507">507</span> +<span id="508">508</span> +<span id="509">509</span> +<span id="510">510</span> +<span id="511">511</span> +<span id="512">512</span> +<span id="513">513</span> +<span id="514">514</span> +<span id="515">515</span> +<span id="516">516</span> +<span id="517">517</span> +<span id="518">518</span> +<span id="519">519</span> +<span id="520">520</span> +<span id="521">521</span> +<span id="522">522</span> +<span id="523">523</span> +<span id="524">524</span> +<span id="525">525</span> +<span id="526">526</span> +<span id="527">527</span> +<span id="528">528</span> +<span id="529">529</span> +<span id="530">530</span> +<span id="531">531</span> +<span id="532">532</span> +<span id="533">533</span> +<span id="534">534</span> +</pre><pre class="rust"> +<span class="doccomment">//! Safe wrapper around the LLVM C API.</span> +<span class="doccomment">//!</span> +<span class="doccomment">//! References returned from the LLVM API are tied to the `'llvm` lifetime which is bound to the</span> +<span class="doccomment">//! context where the objects are created in.</span> +<span class="doccomment">//! We do not offer wrappers to remove or delete any objects in the context and therefore all the</span> +<span class="doccomment">//! references will be valid for the liftime of the context.</span> + +<span class="kw">use</span> <span class="ident">llvm_sys::analysis</span>::{<span class="ident">LLVMVerifierFailureAction</span>, <span class="ident">LLVMVerifyFunction</span>}; +<span class="kw">use</span> <span class="ident">llvm_sys::core</span>::{ + <span class="ident">LLVMAddFunction</span>, <span class="ident">LLVMAppendBasicBlockInContext</span>, <span class="ident">LLVMBuildFAdd</span>, <span class="ident">LLVMBuildFCmp</span>, <span class="ident">LLVMBuildFMul</span>, + <span class="ident">LLVMBuildFSub</span>, <span class="ident">LLVMBuildRet</span>, <span class="ident">LLVMBuildUIToFP</span>, <span class="ident">LLVMConstReal</span>, <span class="ident">LLVMContextCreate</span>, + <span class="ident">LLVMContextDispose</span>, <span class="ident">LLVMCountBasicBlocks</span>, <span class="ident">LLVMCountParams</span>, <span class="ident">LLVMCreateBuilderInContext</span>, + <span class="ident">LLVMDisposeBuilder</span>, <span class="ident">LLVMDisposeModule</span>, <span class="ident">LLVMDoubleTypeInContext</span>, <span class="ident">LLVMDumpModule</span>, <span class="ident">LLVMDumpType</span>, + <span class="ident">LLVMDumpValue</span>, <span class="ident">LLVMGetNamedFunction</span>, <span class="ident">LLVMGetParam</span>, <span class="ident">LLVMGetReturnType</span>, <span class="ident">LLVMGetTypeKind</span>, + <span class="ident">LLVMGetValueKind</span>, <span class="ident">LLVMGetValueName2</span>, <span class="ident">LLVMModuleCreateWithNameInContext</span>, + <span class="ident">LLVMPositionBuilderAtEnd</span>, <span class="ident">LLVMSetValueName2</span>, <span class="ident">LLVMTypeOf</span>, +}; +<span class="kw">use</span> <span class="ident">llvm_sys::prelude</span>::{ + <span class="ident">LLVMBasicBlockRef</span>, <span class="ident">LLVMBool</span>, <span class="ident">LLVMBuilderRef</span>, <span class="ident">LLVMContextRef</span>, <span class="ident">LLVMModuleRef</span>, <span class="ident">LLVMTypeRef</span>, + <span class="ident">LLVMValueRef</span>, +}; +<span class="kw">use</span> <span class="ident">llvm_sys</span>::{<span class="ident">LLVMRealPredicate</span>, <span class="ident">LLVMTypeKind</span>, <span class="ident">LLVMValueKind</span>}; + +<span class="kw">use</span> <span class="ident">std::convert::TryFrom</span>; +<span class="kw">use</span> <span class="ident">std::ffi::CStr</span>; +<span class="kw">use</span> <span class="ident">std::marker::PhantomData</span>; +<span class="kw">use</span> <span class="ident">std::ops::Deref</span>; + +<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::SmallCStr</span>; + +<span class="comment">// Definition of LLVM C API functions using our `repr(transparent)` types.</span> +<span class="kw">extern</span> <span class="string">"C"</span> { + <span class="kw">fn</span> <span class="ident">LLVMFunctionType</span>( + <span class="ident">ReturnType</span>: <span class="ident">Type</span><span class="op"><</span><span class="lifetime">'_</span><span class="op">></span>, + <span class="ident">ParamTypes</span>: <span class="kw-2">*</span><span class="kw-2">mut</span> <span class="ident">Type</span><span class="op"><</span><span class="lifetime">'_</span><span class="op">></span>, + <span class="ident">ParamCount</span>: <span class="ident">::libc::c_uint</span>, + <span class="ident">IsVarArg</span>: <span class="ident">LLVMBool</span>, + ) <span class="op">-</span><span class="op">></span> <span class="ident">LLVMTypeRef</span>; + <span class="kw">fn</span> <span class="ident">LLVMBuildCall2</span>( + <span class="ident">arg1</span>: <span class="ident">LLVMBuilderRef</span>, + <span class="ident">arg2</span>: <span class="ident">Type</span><span class="op"><</span><span class="lifetime">'_</span><span class="op">></span>, + <span class="ident">Fn</span>: <span class="ident">FnValue</span><span class="op"><</span><span class="lifetime">'_</span><span class="op">></span>, + <span class="ident">Args</span>: <span class="kw-2">*</span><span class="kw-2">mut</span> <span class="ident">Value</span><span class="op"><</span><span class="lifetime">'_</span><span class="op">></span>, + <span class="ident">NumArgs</span>: <span class="ident">::libc::c_uint</span>, + <span class="ident">Name</span>: <span class="kw-2">*</span><span class="kw">const</span> <span class="ident">::libc::c_char</span>, + ) <span class="op">-</span><span class="op">></span> <span class="ident">LLVMValueRef</span>; +} + +<span class="comment">// ====================</span> +<span class="comment">// Module / Context</span> +<span class="comment">// ====================</span> + +<span class="doccomment">/// Wrapper for a LLVM Module with its own LLVM Context.</span> +<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">Module</span> { + <span class="ident">ctx</span>: <span class="ident">LLVMContextRef</span>, + <span class="ident">module</span>: <span class="ident">LLVMModuleRef</span>, +} + +<span class="kw">impl</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span> <span class="ident">Module</span> { + <span class="doccomment">/// Create a new Module instance.</span> + <span class="doccomment">///</span> + <span class="doccomment">/// # Panics</span> + <span class="doccomment">///</span> + <span class="doccomment">/// Panics if creating the context or the module fails.</span> + <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>() <span class="op">-</span><span class="op">></span> <span class="self">Self</span> { + <span class="kw">let</span> (<span class="ident">ctx</span>, <span class="ident">module</span>) <span class="op">=</span> <span class="kw">unsafe</span> { + <span class="kw">let</span> <span class="ident">c</span> <span class="op">=</span> <span class="ident">LLVMContextCreate</span>(); + <span class="kw">let</span> <span class="ident">m</span> <span class="op">=</span> <span class="ident">LLVMModuleCreateWithNameInContext</span>(<span class="string">b"module\0"</span>.<span class="ident">as_ptr</span>().<span class="ident">cast</span>(), <span class="ident">c</span>); + <span class="macro">assert!</span>(<span class="op">!</span><span class="ident">c</span>.<span class="ident">is_null</span>() <span class="op">&&</span> <span class="op">!</span><span class="ident">m</span>.<span class="ident">is_null</span>()); + (<span class="ident">c</span>, <span class="ident">m</span>) + }; + + <span class="ident">Module</span> { <span class="ident">ctx</span>, <span class="ident">module</span> } + } + + <span class="doccomment">/// Dump LLVM IR emitted into the Module to stdout.</span> + <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">dump</span>(<span class="kw-2">&</span><span class="self">self</span>) { + <span class="kw">unsafe</span> { <span class="ident">LLVMDumpModule</span>(<span class="self">self</span>.<span class="ident">module</span>) }; + } + + <span class="doccomment">/// Get a type reference representing a `f64` float.</span> + <span class="doccomment">///</span> + <span class="doccomment">/// # Panics</span> + <span class="doccomment">///</span> + <span class="doccomment">/// Panics if LLVM API returns a `null` pointer.</span> + <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">type_f64</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Type</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span> { + <span class="kw">let</span> <span class="ident">type_ref</span> <span class="op">=</span> <span class="kw">unsafe</span> { <span class="ident">LLVMDoubleTypeInContext</span>(<span class="self">self</span>.<span class="ident">ctx</span>) }; + <span class="ident">Type::new</span>(<span class="ident">type_ref</span>) + } + + <span class="doccomment">/// Get a type reference representing a `fn(args) -> ret` function.</span> + <span class="doccomment">///</span> + <span class="doccomment">/// # Panics</span> + <span class="doccomment">///</span> + <span class="doccomment">/// Panics if LLVM API returns a `null` pointer.</span> + <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">type_fn</span>(<span class="kw-2">&</span><span class="lifetime">'llvm</span> <span class="self">self</span>, <span class="ident">args</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> [<span class="ident">Type</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span>], <span class="ident">ret</span>: <span class="ident">Type</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span>) <span class="op">-</span><span class="op">></span> <span class="ident">Type</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span> { + <span class="kw">let</span> <span class="ident">type_ref</span> <span class="op">=</span> <span class="kw">unsafe</span> { + <span class="ident">LLVMFunctionType</span>( + <span class="ident">ret</span>, + <span class="ident">args</span>.<span class="ident">as_mut_ptr</span>(), + <span class="ident">args</span>.<span class="ident">len</span>() <span class="kw">as</span> <span class="ident">libc::c_uint</span>, + <span class="number">0</span>, <span class="comment">/* IsVarArg */</span> + ) + }; + <span class="ident">Type::new</span>(<span class="ident">type_ref</span>) + } + + <span class="doccomment">/// Add a function with the given `name` and `fn_type` to the module and return a value</span> + <span class="doccomment">/// reference representing the function.</span> + <span class="doccomment">///</span> + <span class="doccomment">/// # Panics</span> + <span class="doccomment">///</span> + <span class="doccomment">/// Panics if LLVM API returns a `null` pointer or `name` could not be converted to a</span> + <span class="doccomment">/// [`SmallCStr`].</span> + <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">add_fn</span>(<span class="kw-2">&</span><span class="lifetime">'llvm</span> <span class="self">self</span>, <span class="ident">name</span>: <span class="kw-2">&</span><span class="ident">str</span>, <span class="ident">fn_type</span>: <span class="ident">Type</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span>) <span class="op">-</span><span class="op">></span> <span class="ident">FnValue</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span> { + <span class="macro">debug_assert_eq!</span>( + <span class="ident">fn_type</span>.<span class="ident">kind</span>(), + <span class="ident">LLVMTypeKind::LLVMFunctionTypeKind</span>, + <span class="string">"Expected a function type when adding a function!"</span> + ); + + <span class="kw">let</span> <span class="ident">name</span> <span class="op">=</span> <span class="ident">SmallCStr::try_from</span>(<span class="ident">name</span>) + .<span class="ident">expect</span>(<span class="string">"Failed to convert 'name' argument to small C string!"</span>); + + <span class="kw">let</span> <span class="ident">value_ref</span> <span class="op">=</span> <span class="kw">unsafe</span> { <span class="ident">LLVMAddFunction</span>(<span class="self">self</span>.<span class="ident">module</span>, <span class="ident">name</span>.<span class="ident">as_ptr</span>(), <span class="ident">fn_type</span>.<span class="number">0</span>) }; + <span class="ident">FnValue::new</span>(<span class="ident">value_ref</span>) + } + + <span class="doccomment">/// Get a function value reference to the function with the given `name` if it was previously</span> + <span class="doccomment">/// added to the module with [`add_fn`][Module::add_fn].</span> + <span class="doccomment">///</span> + <span class="doccomment">/// # Panics</span> + <span class="doccomment">///</span> + <span class="doccomment">/// Panics if `name` could not be converted to a [`SmallCStr`].</span> + <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">get_fn</span>(<span class="kw-2">&</span><span class="lifetime">'llvm</span> <span class="self">self</span>, <span class="ident">name</span>: <span class="kw-2">&</span><span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">FnValue</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span><span class="op">></span> { + <span class="kw">let</span> <span class="ident">name</span> <span class="op">=</span> <span class="ident">SmallCStr::try_from</span>(<span class="ident">name</span>) + .<span class="ident">expect</span>(<span class="string">"Failed to convert 'name' argument to small C string!"</span>); + + <span class="kw">let</span> <span class="ident">value_ref</span> <span class="op">=</span> <span class="kw">unsafe</span> { <span class="ident">LLVMGetNamedFunction</span>(<span class="self">self</span>.<span class="ident">module</span>, <span class="ident">name</span>.<span class="ident">as_ptr</span>()) }; + + (<span class="op">!</span><span class="ident">value_ref</span>.<span class="ident">is_null</span>()).<span class="ident">then</span>(<span class="op">|</span><span class="op">|</span> <span class="ident">FnValue::new</span>(<span class="ident">value_ref</span>)) + } + + <span class="doccomment">/// Append a Basic Block to the end of the function referenced by the value reference</span> + <span class="doccomment">/// `fn_value`.</span> + <span class="doccomment">///</span> + <span class="doccomment">/// # Panics</span> + <span class="doccomment">///</span> + <span class="doccomment">/// Panics if LLVM API returns a `null` pointer.</span> + <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">append_basic_block</span>(<span class="kw-2">&</span><span class="lifetime">'llvm</span> <span class="self">self</span>, <span class="ident">fn_value</span>: <span class="ident">FnValue</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span>) <span class="op">-</span><span class="op">></span> <span class="ident">BasicBlock</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span> { + <span class="kw">let</span> <span class="ident">block</span> <span class="op">=</span> <span class="kw">unsafe</span> { + <span class="ident">LLVMAppendBasicBlockInContext</span>( + <span class="self">self</span>.<span class="ident">ctx</span>, + <span class="ident">fn_value</span>.<span class="ident">value_ref</span>(), + <span class="string">b"block\0"</span>.<span class="ident">as_ptr</span>().<span class="ident">cast</span>(), + ) + }; + <span class="macro">assert!</span>(<span class="op">!</span><span class="ident">block</span>.<span class="ident">is_null</span>()); + + <span class="ident">BasicBlock</span>(<span class="ident">block</span>, <span class="ident">PhantomData</span>) + } +} + +<span class="kw">impl</span> <span class="ident">Drop</span> <span class="kw">for</span> <span class="ident">Module</span> { + <span class="kw">fn</span> <span class="ident">drop</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>) { + <span class="kw">unsafe</span> { + <span class="ident">LLVMDisposeModule</span>(<span class="self">self</span>.<span class="ident">module</span>); + <span class="ident">LLVMContextDispose</span>(<span class="self">self</span>.<span class="ident">ctx</span>); + } + } +} + +<span class="comment">// ===========</span> +<span class="comment">// Builder</span> +<span class="comment">// ===========</span> + +<span class="doccomment">/// Wrapper for a LLVM IR Builder.</span> +<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">Builder</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span> { + <span class="ident">builder</span>: <span class="ident">LLVMBuilderRef</span>, + <span class="ident">_ctx</span>: <span class="ident">PhantomData</span><span class="op"><</span><span class="kw-2">&</span><span class="lifetime">'llvm</span> ()<span class="op">></span>, +} + +<span class="kw">impl</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span> <span class="ident">Builder</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span> { + <span class="doccomment">/// Create a new LLVM IR Builder with the `module`s context.</span> + <span class="doccomment">///</span> + <span class="doccomment">/// # Panics</span> + <span class="doccomment">///</span> + <span class="doccomment">/// Panics if creating the IR Builder fails.</span> + <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">with_ctx</span>(<span class="ident">module</span>: <span class="kw-2">&</span><span class="lifetime">'llvm</span> <span class="ident">Module</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Builder</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span> { + <span class="kw">let</span> <span class="ident">builder</span> <span class="op">=</span> <span class="kw">unsafe</span> { <span class="ident">LLVMCreateBuilderInContext</span>(<span class="ident">module</span>.<span class="ident">ctx</span>) }; + <span class="macro">assert!</span>(<span class="op">!</span><span class="ident">builder</span>.<span class="ident">is_null</span>()); + + <span class="ident">Builder</span> { + <span class="ident">builder</span>, + <span class="ident">_ctx</span>: <span class="ident">PhantomData</span>, + } + } + + <span class="doccomment">/// Position the IR Builder at the end of the given Basic Block.</span> + <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">pos_at_end</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">bb</span>: <span class="ident">BasicBlock</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span>) { + <span class="kw">unsafe</span> { + <span class="ident">LLVMPositionBuilderAtEnd</span>(<span class="self">self</span>.<span class="ident">builder</span>, <span class="ident">bb</span>.<span class="number">0</span>); + } + } + + <span class="doccomment">/// Emit a [fadd](https://llvm.org/docs/LangRef.html#fadd-instruction) instruction.</span> + <span class="doccomment">///</span> + <span class="doccomment">/// # Panics</span> + <span class="doccomment">///</span> + <span class="doccomment">/// Panics if LLVM API returns a `null` pointer.</span> + <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">fadd</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">lhs</span>: <span class="ident">Value</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span>, <span class="ident">rhs</span>: <span class="ident">Value</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span>) <span class="op">-</span><span class="op">></span> <span class="ident">Value</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span> { + <span class="macro">debug_assert!</span>(<span class="ident">lhs</span>.<span class="ident">is_f64</span>(), <span class="string">"fadd: Expected f64 as lhs operand!"</span>); + <span class="macro">debug_assert!</span>(<span class="ident">rhs</span>.<span class="ident">is_f64</span>(), <span class="string">"fadd: Expected f64 as rhs operand!"</span>); + + <span class="kw">let</span> <span class="ident">value_ref</span> <span class="op">=</span> <span class="kw">unsafe</span> { + <span class="ident">LLVMBuildFAdd</span>( + <span class="self">self</span>.<span class="ident">builder</span>, + <span class="ident">lhs</span>.<span class="ident">value_ref</span>(), + <span class="ident">rhs</span>.<span class="ident">value_ref</span>(), + <span class="string">b"fadd\0"</span>.<span class="ident">as_ptr</span>().<span class="ident">cast</span>(), + ) + }; + <span class="ident">Value::new</span>(<span class="ident">value_ref</span>) + } + + <span class="doccomment">/// Emit a [fsub](https://llvm.org/docs/LangRef.html#fsub-instruction) instruction.</span> + <span class="doccomment">///</span> + <span class="doccomment">/// # Panics</span> + <span class="doccomment">///</span> + <span class="doccomment">/// Panics if LLVM API returns a `null` pointer.</span> + <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">fsub</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">lhs</span>: <span class="ident">Value</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span>, <span class="ident">rhs</span>: <span class="ident">Value</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span>) <span class="op">-</span><span class="op">></span> <span class="ident">Value</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span> { + <span class="macro">debug_assert!</span>(<span class="ident">lhs</span>.<span class="ident">is_f64</span>(), <span class="string">"fsub: Expected f64 as lhs operand!"</span>); + <span class="macro">debug_assert!</span>(<span class="ident">rhs</span>.<span class="ident">is_f64</span>(), <span class="string">"fsub: Expected f64 as rhs operand!"</span>); + + <span class="kw">let</span> <span class="ident">value_ref</span> <span class="op">=</span> <span class="kw">unsafe</span> { + <span class="ident">LLVMBuildFSub</span>( + <span class="self">self</span>.<span class="ident">builder</span>, + <span class="ident">lhs</span>.<span class="ident">value_ref</span>(), + <span class="ident">rhs</span>.<span class="ident">value_ref</span>(), + <span class="string">b"fsub\0"</span>.<span class="ident">as_ptr</span>().<span class="ident">cast</span>(), + ) + }; + <span class="ident">Value::new</span>(<span class="ident">value_ref</span>) + } + + <span class="doccomment">/// Emit a [fmul](https://llvm.org/docs/LangRef.html#fmul-instruction) instruction.</span> + <span class="doccomment">///</span> + <span class="doccomment">/// # Panics</span> + <span class="doccomment">///</span> + <span class="doccomment">/// Panics if LLVM API returns a `null` pointer.</span> + <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">fmul</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">lhs</span>: <span class="ident">Value</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span>, <span class="ident">rhs</span>: <span class="ident">Value</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span>) <span class="op">-</span><span class="op">></span> <span class="ident">Value</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span> { + <span class="macro">debug_assert!</span>(<span class="ident">lhs</span>.<span class="ident">is_f64</span>(), <span class="string">"fmul: Expected f64 as lhs operand!"</span>); + <span class="macro">debug_assert!</span>(<span class="ident">rhs</span>.<span class="ident">is_f64</span>(), <span class="string">"fmul: Expected f64 as rhs operand!"</span>); + + <span class="kw">let</span> <span class="ident">value_ref</span> <span class="op">=</span> <span class="kw">unsafe</span> { + <span class="ident">LLVMBuildFMul</span>( + <span class="self">self</span>.<span class="ident">builder</span>, + <span class="ident">lhs</span>.<span class="ident">value_ref</span>(), + <span class="ident">rhs</span>.<span class="ident">value_ref</span>(), + <span class="string">b"fmul\0"</span>.<span class="ident">as_ptr</span>().<span class="ident">cast</span>(), + ) + }; + <span class="ident">Value::new</span>(<span class="ident">value_ref</span>) + } + + <span class="doccomment">/// Emit a [fcmult](https://llvm.org/docs/LangRef.html#fcmp-instruction) instruction.</span> + <span class="doccomment">///</span> + <span class="doccomment">/// # Panics</span> + <span class="doccomment">///</span> + <span class="doccomment">/// Panics if LLVM API returns a `null` pointer.</span> + <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">fcmpult</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">lhs</span>: <span class="ident">Value</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span>, <span class="ident">rhs</span>: <span class="ident">Value</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span>) <span class="op">-</span><span class="op">></span> <span class="ident">Value</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span> { + <span class="macro">debug_assert!</span>(<span class="ident">lhs</span>.<span class="ident">is_f64</span>(), <span class="string">"fcmplt: Expected f64 as lhs operand!"</span>); + <span class="macro">debug_assert!</span>(<span class="ident">rhs</span>.<span class="ident">is_f64</span>(), <span class="string">"fcmplt: Expected f64 as rhs operand!"</span>); + + <span class="kw">let</span> <span class="ident">value_ref</span> <span class="op">=</span> <span class="kw">unsafe</span> { + <span class="ident">LLVMBuildFCmp</span>( + <span class="self">self</span>.<span class="ident">builder</span>, + <span class="ident">LLVMRealPredicate::LLVMRealULT</span>, + <span class="ident">lhs</span>.<span class="ident">value_ref</span>(), + <span class="ident">rhs</span>.<span class="ident">value_ref</span>(), + <span class="string">b"fcmplt\0"</span>.<span class="ident">as_ptr</span>().<span class="ident">cast</span>(), + ) + }; + <span class="ident">Value::new</span>(<span class="ident">value_ref</span>) + } + + <span class="doccomment">/// Emit a [uitofp](https://llvm.org/docs/LangRef.html#uitofp-to-instruction) instruction.</span> + <span class="doccomment">///</span> + <span class="doccomment">/// # Panics</span> + <span class="doccomment">///</span> + <span class="doccomment">/// Panics if LLVM API returns a `null` pointer.</span> + <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">uitofp</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">val</span>: <span class="ident">Value</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span>, <span class="ident">dest_type</span>: <span class="ident">Type</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span>) <span class="op">-</span><span class="op">></span> <span class="ident">Value</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span> { + <span class="macro">debug_assert!</span>(<span class="ident">val</span>.<span class="ident">is_int</span>(), <span class="string">"uitofp: Expected integer operand!"</span>); + + <span class="kw">let</span> <span class="ident">value_ref</span> <span class="op">=</span> <span class="kw">unsafe</span> { + <span class="ident">LLVMBuildUIToFP</span>( + <span class="self">self</span>.<span class="ident">builder</span>, + <span class="ident">val</span>.<span class="ident">value_ref</span>(), + <span class="ident">dest_type</span>.<span class="number">0</span>, + <span class="string">b"uitofp\0"</span>.<span class="ident">as_ptr</span>().<span class="ident">cast</span>(), + ) + }; + <span class="ident">Value::new</span>(<span class="ident">value_ref</span>) + } + + <span class="doccomment">/// Emit a [call](https://llvm.org/docs/LangRef.html#call-instruction) instruction.</span> + <span class="doccomment">///</span> + <span class="doccomment">/// # Panics</span> + <span class="doccomment">///</span> + <span class="doccomment">/// Panics if LLVM API returns a `null` pointer.</span> + <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">call</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">fn_value</span>: <span class="ident">FnValue</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span>, <span class="ident">args</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> [<span class="ident">Value</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span>]) <span class="op">-</span><span class="op">></span> <span class="ident">Value</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span> { + <span class="kw">let</span> <span class="ident">value_ref</span> <span class="op">=</span> <span class="kw">unsafe</span> { + <span class="ident">LLVMBuildCall2</span>( + <span class="self">self</span>.<span class="ident">builder</span>, + <span class="ident">fn_value</span>.<span class="ident">ret_type</span>(), + <span class="ident">fn_value</span>, + <span class="ident">args</span>.<span class="ident">as_mut_ptr</span>(), + <span class="ident">args</span>.<span class="ident">len</span>() <span class="kw">as</span> <span class="ident">libc::c_uint</span>, + <span class="string">b"call\0"</span>.<span class="ident">as_ptr</span>().<span class="ident">cast</span>(), + ) + }; + <span class="ident">Value::new</span>(<span class="ident">value_ref</span>) + } + + <span class="doccomment">/// Emit a [ret](https://llvm.org/docs/LangRef.html#ret-instruction) instruction.</span> + <span class="doccomment">///</span> + <span class="doccomment">/// # Panics</span> + <span class="doccomment">///</span> + <span class="doccomment">/// Panics if LLVM API returns a `null` pointer.</span> + <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">ret</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">ret</span>: <span class="ident">Value</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span>) { + <span class="kw">let</span> <span class="ident">ret</span> <span class="op">=</span> <span class="kw">unsafe</span> { <span class="ident">LLVMBuildRet</span>(<span class="self">self</span>.<span class="ident">builder</span>, <span class="ident">ret</span>.<span class="ident">value_ref</span>()) }; + <span class="macro">assert!</span>(<span class="op">!</span><span class="ident">ret</span>.<span class="ident">is_null</span>()); + } +} + +<span class="kw">impl</span> <span class="ident">Drop</span> <span class="kw">for</span> <span class="ident">Builder</span><span class="op"><</span><span class="lifetime">'_</span><span class="op">></span> { + <span class="kw">fn</span> <span class="ident">drop</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>) { + <span class="kw">unsafe</span> { <span class="ident">LLVMDisposeBuilder</span>(<span class="self">self</span>.<span class="ident">builder</span>) } + } +} + +<span class="comment">// ==============</span> +<span class="comment">// BasicBlock</span> +<span class="comment">// ==============</span> + +<span class="doccomment">/// Wrapper for a LLVM Basic Block.</span> +<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Copy</span>, <span class="ident">Clone</span>)]</span> +<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">BasicBlock</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span>(<span class="ident">LLVMBasicBlockRef</span>, <span class="ident">PhantomData</span><span class="op"><</span><span class="kw-2">&</span><span class="lifetime">'llvm</span> ()<span class="op">></span>); + +<span class="comment">// ========</span> +<span class="comment">// Type</span> +<span class="comment">// ========</span> + +<span class="doccomment">/// Wrapper for a LLVM Type Reference.</span> +<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Copy</span>, <span class="ident">Clone</span>)]</span> +<span class="attribute">#[<span class="ident">repr</span>(<span class="ident">transparent</span>)]</span> +<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">Type</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span>(<span class="ident">LLVMTypeRef</span>, <span class="ident">PhantomData</span><span class="op"><</span><span class="kw-2">&</span><span class="lifetime">'llvm</span> ()<span class="op">></span>); + +<span class="kw">impl</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span> <span class="ident">Type</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span> { + <span class="kw">fn</span> <span class="ident">new</span>(<span class="ident">type_ref</span>: <span class="ident">LLVMTypeRef</span>) <span class="op">-</span><span class="op">></span> <span class="self">Self</span> { + <span class="macro">assert!</span>(<span class="op">!</span><span class="ident">type_ref</span>.<span class="ident">is_null</span>()); + <span class="ident">Type</span>(<span class="ident">type_ref</span>, <span class="ident">PhantomData</span>) + } + + <span class="kw">fn</span> <span class="ident">kind</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">LLVMTypeKind</span> { + <span class="kw">unsafe</span> { <span class="ident">LLVMGetTypeKind</span>(<span class="self">self</span>.<span class="number">0</span>) } + } + + <span class="doccomment">/// Dump the LLVM Type to stdout.</span> + <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">dump</span>(<span class="kw-2">&</span><span class="self">self</span>) { + <span class="kw">unsafe</span> { <span class="ident">LLVMDumpType</span>(<span class="self">self</span>.<span class="number">0</span>) }; + } + + <span class="doccomment">/// Get a value reference representing the const `f64` value.</span> + <span class="doccomment">///</span> + <span class="doccomment">/// # Panics</span> + <span class="doccomment">///</span> + <span class="doccomment">/// Panics if LLVM API returns a `null` pointer.</span> + <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">const_f64</span>(<span class="self">self</span>, <span class="ident">n</span>: <span class="ident">f64</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Value</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span> { + <span class="macro">debug_assert_eq!</span>( + <span class="self">self</span>.<span class="ident">kind</span>(), + <span class="ident">LLVMTypeKind::LLVMDoubleTypeKind</span>, + <span class="string">"Expected a double type when creating const f64 value!"</span> + ); + + <span class="kw">let</span> <span class="ident">value_ref</span> <span class="op">=</span> <span class="kw">unsafe</span> { <span class="ident">LLVMConstReal</span>(<span class="self">self</span>.<span class="number">0</span>, <span class="ident">n</span>) }; + <span class="ident">Value::new</span>(<span class="ident">value_ref</span>) + } +} + +<span class="comment">// =========</span> +<span class="comment">// Value</span> +<span class="comment">// =========</span> + +<span class="doccomment">/// Wrapper for a LLVM Value Reference.</span> +<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Copy</span>, <span class="ident">Clone</span>)]</span> +<span class="attribute">#[<span class="ident">repr</span>(<span class="ident">transparent</span>)]</span> +<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">Value</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span>(<span class="ident">LLVMValueRef</span>, <span class="ident">PhantomData</span><span class="op"><</span><span class="kw-2">&</span><span class="lifetime">'llvm</span> ()<span class="op">></span>); + +<span class="kw">impl</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span> <span class="ident">Value</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span> { + <span class="kw">fn</span> <span class="ident">new</span>(<span class="ident">value_ref</span>: <span class="ident">LLVMValueRef</span>) <span class="op">-</span><span class="op">></span> <span class="self">Self</span> { + <span class="macro">assert!</span>(<span class="op">!</span><span class="ident">value_ref</span>.<span class="ident">is_null</span>()); + <span class="ident">Value</span>(<span class="ident">value_ref</span>, <span class="ident">PhantomData</span>) + } + + <span class="attribute">#[<span class="ident">inline</span>]</span> + <span class="kw">fn</span> <span class="ident">value_ref</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">LLVMValueRef</span> { + <span class="self">self</span>.<span class="number">0</span> + } + + <span class="kw">fn</span> <span class="ident">kind</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">LLVMValueKind</span> { + <span class="kw">unsafe</span> { <span class="ident">LLVMGetValueKind</span>(<span class="self">self</span>.<span class="ident">value_ref</span>()) } + } + + <span class="doccomment">/// Dump the LLVM Value to stdout.</span> + <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">dump</span>(<span class="kw-2">&</span><span class="self">self</span>) { + <span class="kw">unsafe</span> { <span class="ident">LLVMDumpValue</span>(<span class="self">self</span>.<span class="ident">value_ref</span>()) }; + } + + <span class="doccomment">/// Get a type reference representing for the given value reference.</span> + <span class="doccomment">///</span> + <span class="doccomment">/// # Panics</span> + <span class="doccomment">///</span> + <span class="doccomment">/// Panics if LLVM API returns a `null` pointer.</span> + <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">type_of</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Type</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span> { + <span class="kw">let</span> <span class="ident">type_ref</span> <span class="op">=</span> <span class="kw">unsafe</span> { <span class="ident">LLVMTypeOf</span>(<span class="self">self</span>.<span class="ident">value_ref</span>()) }; + <span class="ident">Type::new</span>(<span class="ident">type_ref</span>) + } + + <span class="doccomment">/// Set the name for the given value reference.</span> + <span class="doccomment">///</span> + <span class="doccomment">/// # Panics</span> + <span class="doccomment">///</span> + <span class="doccomment">/// Panics if LLVM API returns a `null` pointer.</span> + <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">set_name</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">name</span>: <span class="kw-2">&</span><span class="ident">str</span>) { + <span class="kw">unsafe</span> { <span class="ident">LLVMSetValueName2</span>(<span class="self">self</span>.<span class="ident">value_ref</span>(), <span class="ident">name</span>.<span class="ident">as_ptr</span>().<span class="ident">cast</span>(), <span class="ident">name</span>.<span class="ident">len</span>()) }; + } + + <span class="doccomment">/// Get the name for the given value reference.</span> + <span class="doccomment">///</span> + <span class="doccomment">/// # Panics</span> + <span class="doccomment">///</span> + <span class="doccomment">/// Panics if LLVM API returns a `null` pointer.</span> + <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">get_name</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="kw-2">&</span><span class="lifetime">'llvm</span> <span class="ident">str</span> { + <span class="kw">let</span> <span class="ident">name</span> <span class="op">=</span> <span class="kw">unsafe</span> { + <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">len</span>: <span class="ident">libc::size_t</span> <span class="op">=</span> <span class="number">0</span>; + <span class="kw">let</span> <span class="ident">name</span> <span class="op">=</span> <span class="ident">LLVMGetValueName2</span>(<span class="self">self</span>.<span class="number">0</span>, <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">len</span> <span class="kw">as</span> <span class="kw">_</span>); + <span class="macro">assert!</span>(<span class="op">!</span><span class="ident">name</span>.<span class="ident">is_null</span>()); + + <span class="ident">CStr::from_ptr</span>(<span class="ident">name</span>) + }; + + <span class="comment">// TODO: Does this string live for the time of the LLVM context?!</span> + <span class="ident">name</span>.<span class="ident">to_str</span>() + .<span class="ident">expect</span>(<span class="string">"Expected valid UTF8 string from LLVM API"</span>) + } + + <span class="doccomment">/// Check if value is of `f64` type.</span> + <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">is_f64</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">bool</span> { + <span class="self">self</span>.<span class="ident">type_of</span>().<span class="ident">kind</span>() <span class="op">=</span><span class="op">=</span> <span class="ident">LLVMTypeKind::LLVMDoubleTypeKind</span> + } + + <span class="doccomment">/// Check if value is of integer type.</span> + <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">is_int</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">bool</span> { + <span class="self">self</span>.<span class="ident">type_of</span>().<span class="ident">kind</span>() <span class="op">=</span><span class="op">=</span> <span class="ident">LLVMTypeKind::LLVMIntegerTypeKind</span> + } +} + +<span class="doccomment">/// Wrapper for a LLVM Value Reference specialized for contexts where function values are needed.</span> +<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Copy</span>, <span class="ident">Clone</span>)]</span> +<span class="attribute">#[<span class="ident">repr</span>(<span class="ident">transparent</span>)]</span> +<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">FnValue</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span>(<span class="ident">Value</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span>); + +<span class="kw">impl</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span> <span class="ident">Deref</span> <span class="kw">for</span> <span class="ident">FnValue</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span> { + <span class="kw">type</span> <span class="ident">Target</span> <span class="op">=</span> <span class="ident">Value</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span>; + <span class="kw">fn</span> <span class="ident">deref</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="kw-2">&</span><span class="self">Self</span><span class="ident">::Target</span> { + <span class="kw-2">&</span><span class="self">self</span>.<span class="number">0</span> + } +} + +<span class="kw">impl</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span> <span class="ident">FnValue</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span> { + <span class="kw">fn</span> <span class="ident">new</span>(<span class="ident">value_ref</span>: <span class="ident">LLVMValueRef</span>) <span class="op">-</span><span class="op">></span> <span class="self">Self</span> { + <span class="kw">let</span> <span class="ident">value</span> <span class="op">=</span> <span class="ident">Value::new</span>(<span class="ident">value_ref</span>); + <span class="macro">debug_assert_eq!</span>( + <span class="ident">value</span>.<span class="ident">kind</span>(), + <span class="ident">LLVMValueKind::LLVMFunctionValueKind</span>, + <span class="string">"Expected a fn value when constructing FnValue!"</span> + ); + + <span class="ident">FnValue</span>(<span class="ident">value</span>) + } + + <span class="doccomment">/// Get a type reference representing the return value of the given function value.</span> + <span class="doccomment">///</span> + <span class="doccomment">/// # Panics</span> + <span class="doccomment">///</span> + <span class="doccomment">/// Panics if LLVM API returns a `null` pointer.</span> + <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">ret_type</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Type</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span> { + <span class="kw">let</span> <span class="ident">type_ref</span> <span class="op">=</span> <span class="kw">unsafe</span> { <span class="ident">LLVMGetReturnType</span>(<span class="ident">LLVMTypeOf</span>(<span class="self">self</span>.<span class="ident">value_ref</span>())) }; + <span class="ident">Type::new</span>(<span class="ident">type_ref</span>) + } + + <span class="doccomment">/// Get the number of function arguments for the given function value.</span> + <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">args</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">usize</span> { + <span class="kw">unsafe</span> { <span class="ident">LLVMCountParams</span>(<span class="self">self</span>.<span class="ident">value_ref</span>()) <span class="kw">as</span> <span class="ident">usize</span> } + } + + <span class="doccomment">/// Get a value reference for the function argument at index `idx`.</span> + <span class="doccomment">///</span> + <span class="doccomment">/// # Panics</span> + <span class="doccomment">///</span> + <span class="doccomment">/// Panics if LLVM API returns a `null` pointer or indexed out of bounds.</span> + <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">arg</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">idx</span>: <span class="ident">usize</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Value</span><span class="op"><</span><span class="lifetime">'llvm</span><span class="op">></span> { + <span class="macro">assert!</span>(<span class="ident">idx</span> <span class="op"><</span> <span class="self">self</span>.<span class="ident">args</span>()); + + <span class="kw">let</span> <span class="ident">value_ref</span> <span class="op">=</span> <span class="kw">unsafe</span> { <span class="ident">LLVMGetParam</span>(<span class="self">self</span>.<span class="ident">value_ref</span>(), <span class="ident">idx</span> <span class="kw">as</span> <span class="ident">libc::c_uint</span>) }; + <span class="ident">Value::new</span>(<span class="ident">value_ref</span>) + } + + <span class="doccomment">/// Get the number of Basic Blocks for the given function value.</span> + <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">basic_blocks</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">usize</span> { + <span class="kw">unsafe</span> { <span class="ident">LLVMCountBasicBlocks</span>(<span class="self">self</span>.<span class="ident">value_ref</span>()) <span class="kw">as</span> <span class="ident">usize</span> } + } + + <span class="doccomment">/// Verify that the given function is valid.</span> + <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">verify</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">bool</span> { + <span class="kw">unsafe</span> { + <span class="ident">LLVMVerifyFunction</span>( + <span class="self">self</span>.<span class="ident">value_ref</span>(), + <span class="ident">LLVMVerifierFailureAction::LLVMPrintMessageAction</span>, + ) <span class="op">=</span><span class="op">=</span> <span class="number">0</span> + } + } +} +</pre></div> +</section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="llvm_kaleidoscope_rs" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script><script src="../../source-script.js"></script><script src="../../source-files.js"></script></body></html>
\ No newline at end of file diff --git a/src/llvm_kaleidoscope_rs/parser.rs.html b/src/llvm_kaleidoscope_rs/parser.rs.html new file mode 100644 index 0000000..3bd0dc8 --- /dev/null +++ b/src/llvm_kaleidoscope_rs/parser.rs.html @@ -0,0 +1,925 @@ +<!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 `src/parser.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>parser.rs - source</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg"> +<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"> +<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc source"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../llvm_kaleidoscope_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><div class="example-wrap"><pre class="line-numbers"><span id="1"> 1</span> +<span id="2"> 2</span> +<span id="3"> 3</span> +<span id="4"> 4</span> +<span id="5"> 5</span> +<span id="6"> 6</span> +<span id="7"> 7</span> +<span id="8"> 8</span> +<span id="9"> 9</span> +<span id="10"> 10</span> +<span id="11"> 11</span> +<span id="12"> 12</span> +<span id="13"> 13</span> +<span id="14"> 14</span> +<span id="15"> 15</span> +<span id="16"> 16</span> +<span id="17"> 17</span> +<span id="18"> 18</span> +<span id="19"> 19</span> +<span id="20"> 20</span> +<span id="21"> 21</span> +<span id="22"> 22</span> +<span id="23"> 23</span> +<span id="24"> 24</span> +<span id="25"> 25</span> +<span id="26"> 26</span> +<span id="27"> 27</span> +<span id="28"> 28</span> +<span id="29"> 29</span> +<span id="30"> 30</span> +<span id="31"> 31</span> +<span id="32"> 32</span> +<span id="33"> 33</span> +<span id="34"> 34</span> +<span id="35"> 35</span> +<span id="36"> 36</span> +<span id="37"> 37</span> +<span id="38"> 38</span> +<span id="39"> 39</span> +<span id="40"> 40</span> +<span id="41"> 41</span> +<span id="42"> 42</span> +<span id="43"> 43</span> +<span id="44"> 44</span> +<span id="45"> 45</span> +<span id="46"> 46</span> +<span id="47"> 47</span> +<span id="48"> 48</span> +<span id="49"> 49</span> +<span id="50"> 50</span> +<span id="51"> 51</span> +<span id="52"> 52</span> +<span id="53"> 53</span> +<span id="54"> 54</span> +<span id="55"> 55</span> +<span id="56"> 56</span> +<span id="57"> 57</span> +<span id="58"> 58</span> +<span id="59"> 59</span> +<span id="60"> 60</span> +<span id="61"> 61</span> +<span id="62"> 62</span> +<span id="63"> 63</span> +<span id="64"> 64</span> +<span id="65"> 65</span> +<span id="66"> 66</span> +<span id="67"> 67</span> +<span id="68"> 68</span> +<span id="69"> 69</span> +<span id="70"> 70</span> +<span id="71"> 71</span> +<span id="72"> 72</span> +<span id="73"> 73</span> +<span id="74"> 74</span> +<span id="75"> 75</span> +<span id="76"> 76</span> +<span id="77"> 77</span> +<span id="78"> 78</span> +<span id="79"> 79</span> +<span id="80"> 80</span> +<span id="81"> 81</span> +<span id="82"> 82</span> +<span id="83"> 83</span> +<span id="84"> 84</span> +<span id="85"> 85</span> +<span id="86"> 86</span> +<span id="87"> 87</span> +<span id="88"> 88</span> +<span id="89"> 89</span> +<span id="90"> 90</span> +<span id="91"> 91</span> +<span id="92"> 92</span> +<span id="93"> 93</span> +<span id="94"> 94</span> +<span id="95"> 95</span> +<span id="96"> 96</span> +<span id="97"> 97</span> +<span id="98"> 98</span> +<span id="99"> 99</span> +<span id="100">100</span> +<span id="101">101</span> +<span id="102">102</span> +<span id="103">103</span> +<span id="104">104</span> +<span id="105">105</span> +<span id="106">106</span> +<span id="107">107</span> +<span id="108">108</span> +<span id="109">109</span> +<span id="110">110</span> +<span id="111">111</span> +<span id="112">112</span> +<span id="113">113</span> +<span id="114">114</span> +<span id="115">115</span> +<span id="116">116</span> +<span id="117">117</span> +<span id="118">118</span> +<span id="119">119</span> +<span id="120">120</span> +<span id="121">121</span> +<span id="122">122</span> +<span id="123">123</span> +<span id="124">124</span> +<span id="125">125</span> +<span id="126">126</span> +<span id="127">127</span> +<span id="128">128</span> +<span id="129">129</span> +<span id="130">130</span> +<span id="131">131</span> +<span id="132">132</span> +<span id="133">133</span> +<span id="134">134</span> +<span id="135">135</span> +<span id="136">136</span> +<span id="137">137</span> +<span id="138">138</span> +<span id="139">139</span> +<span id="140">140</span> +<span id="141">141</span> +<span id="142">142</span> +<span id="143">143</span> +<span id="144">144</span> +<span id="145">145</span> +<span id="146">146</span> +<span id="147">147</span> +<span id="148">148</span> +<span id="149">149</span> +<span id="150">150</span> +<span id="151">151</span> +<span id="152">152</span> +<span id="153">153</span> +<span id="154">154</span> +<span id="155">155</span> +<span id="156">156</span> +<span id="157">157</span> +<span id="158">158</span> +<span id="159">159</span> +<span id="160">160</span> +<span id="161">161</span> +<span id="162">162</span> +<span id="163">163</span> +<span id="164">164</span> +<span id="165">165</span> +<span id="166">166</span> +<span id="167">167</span> +<span id="168">168</span> +<span id="169">169</span> +<span id="170">170</span> +<span id="171">171</span> +<span id="172">172</span> +<span id="173">173</span> +<span id="174">174</span> +<span id="175">175</span> +<span id="176">176</span> +<span id="177">177</span> +<span id="178">178</span> +<span id="179">179</span> +<span id="180">180</span> +<span id="181">181</span> +<span id="182">182</span> +<span id="183">183</span> +<span id="184">184</span> +<span id="185">185</span> +<span id="186">186</span> +<span id="187">187</span> +<span id="188">188</span> +<span id="189">189</span> +<span id="190">190</span> +<span id="191">191</span> +<span id="192">192</span> +<span id="193">193</span> +<span id="194">194</span> +<span id="195">195</span> +<span id="196">196</span> +<span id="197">197</span> +<span id="198">198</span> +<span id="199">199</span> +<span id="200">200</span> +<span id="201">201</span> +<span id="202">202</span> +<span id="203">203</span> +<span id="204">204</span> +<span id="205">205</span> +<span id="206">206</span> +<span id="207">207</span> +<span id="208">208</span> +<span id="209">209</span> +<span id="210">210</span> +<span id="211">211</span> +<span id="212">212</span> +<span id="213">213</span> +<span id="214">214</span> +<span id="215">215</span> +<span id="216">216</span> +<span id="217">217</span> +<span id="218">218</span> +<span id="219">219</span> +<span id="220">220</span> +<span id="221">221</span> +<span id="222">222</span> +<span id="223">223</span> +<span id="224">224</span> +<span id="225">225</span> +<span id="226">226</span> +<span id="227">227</span> +<span id="228">228</span> +<span id="229">229</span> +<span id="230">230</span> +<span id="231">231</span> +<span id="232">232</span> +<span id="233">233</span> +<span id="234">234</span> +<span id="235">235</span> +<span id="236">236</span> +<span id="237">237</span> +<span id="238">238</span> +<span id="239">239</span> +<span id="240">240</span> +<span id="241">241</span> +<span id="242">242</span> +<span id="243">243</span> +<span id="244">244</span> +<span id="245">245</span> +<span id="246">246</span> +<span id="247">247</span> +<span id="248">248</span> +<span id="249">249</span> +<span id="250">250</span> +<span id="251">251</span> +<span id="252">252</span> +<span id="253">253</span> +<span id="254">254</span> +<span id="255">255</span> +<span id="256">256</span> +<span id="257">257</span> +<span id="258">258</span> +<span id="259">259</span> +<span id="260">260</span> +<span id="261">261</span> +<span id="262">262</span> +<span id="263">263</span> +<span id="264">264</span> +<span id="265">265</span> +<span id="266">266</span> +<span id="267">267</span> +<span id="268">268</span> +<span id="269">269</span> +<span id="270">270</span> +<span id="271">271</span> +<span id="272">272</span> +<span id="273">273</span> +<span id="274">274</span> +<span id="275">275</span> +<span id="276">276</span> +<span id="277">277</span> +<span id="278">278</span> +<span id="279">279</span> +<span id="280">280</span> +<span id="281">281</span> +<span id="282">282</span> +<span id="283">283</span> +<span id="284">284</span> +<span id="285">285</span> +<span id="286">286</span> +<span id="287">287</span> +<span id="288">288</span> +<span id="289">289</span> +<span id="290">290</span> +<span id="291">291</span> +<span id="292">292</span> +<span id="293">293</span> +<span id="294">294</span> +<span id="295">295</span> +<span id="296">296</span> +<span id="297">297</span> +<span id="298">298</span> +<span id="299">299</span> +<span id="300">300</span> +<span id="301">301</span> +<span id="302">302</span> +<span id="303">303</span> +<span id="304">304</span> +<span id="305">305</span> +<span id="306">306</span> +<span id="307">307</span> +<span id="308">308</span> +<span id="309">309</span> +<span id="310">310</span> +<span id="311">311</span> +<span id="312">312</span> +<span id="313">313</span> +<span id="314">314</span> +<span id="315">315</span> +<span id="316">316</span> +<span id="317">317</span> +<span id="318">318</span> +<span id="319">319</span> +<span id="320">320</span> +<span id="321">321</span> +<span id="322">322</span> +<span id="323">323</span> +<span id="324">324</span> +<span id="325">325</span> +<span id="326">326</span> +<span id="327">327</span> +<span id="328">328</span> +<span id="329">329</span> +<span id="330">330</span> +<span id="331">331</span> +<span id="332">332</span> +<span id="333">333</span> +<span id="334">334</span> +<span id="335">335</span> +<span id="336">336</span> +<span id="337">337</span> +<span id="338">338</span> +<span id="339">339</span> +<span id="340">340</span> +<span id="341">341</span> +<span id="342">342</span> +<span id="343">343</span> +<span id="344">344</span> +<span id="345">345</span> +<span id="346">346</span> +<span id="347">347</span> +<span id="348">348</span> +<span id="349">349</span> +<span id="350">350</span> +<span id="351">351</span> +<span id="352">352</span> +<span id="353">353</span> +<span id="354">354</span> +<span id="355">355</span> +<span id="356">356</span> +<span id="357">357</span> +<span id="358">358</span> +<span id="359">359</span> +<span id="360">360</span> +<span id="361">361</span> +<span id="362">362</span> +<span id="363">363</span> +<span id="364">364</span> +<span id="365">365</span> +<span id="366">366</span> +<span id="367">367</span> +<span id="368">368</span> +<span id="369">369</span> +<span id="370">370</span> +<span id="371">371</span> +<span id="372">372</span> +<span id="373">373</span> +<span id="374">374</span> +<span id="375">375</span> +<span id="376">376</span> +<span id="377">377</span> +<span id="378">378</span> +<span id="379">379</span> +<span id="380">380</span> +<span id="381">381</span> +<span id="382">382</span> +<span id="383">383</span> +<span id="384">384</span> +<span id="385">385</span> +<span id="386">386</span> +<span id="387">387</span> +<span id="388">388</span> +<span id="389">389</span> +<span id="390">390</span> +<span id="391">391</span> +<span id="392">392</span> +<span id="393">393</span> +<span id="394">394</span> +<span id="395">395</span> +<span id="396">396</span> +<span id="397">397</span> +<span id="398">398</span> +<span id="399">399</span> +<span id="400">400</span> +<span id="401">401</span> +<span id="402">402</span> +<span id="403">403</span> +<span id="404">404</span> +<span id="405">405</span> +<span id="406">406</span> +<span id="407">407</span> +<span id="408">408</span> +<span id="409">409</span> +<span id="410">410</span> +<span id="411">411</span> +<span id="412">412</span> +<span id="413">413</span> +<span id="414">414</span> +<span id="415">415</span> +<span id="416">416</span> +<span id="417">417</span> +<span id="418">418</span> +<span id="419">419</span> +<span id="420">420</span> +<span id="421">421</span> +<span id="422">422</span> +<span id="423">423</span> +<span id="424">424</span> +<span id="425">425</span> +<span id="426">426</span> +<span id="427">427</span> +<span id="428">428</span> +<span id="429">429</span> +<span id="430">430</span> +<span id="431">431</span> +<span id="432">432</span> +<span id="433">433</span> +<span id="434">434</span> +<span id="435">435</span> +<span id="436">436</span> +<span id="437">437</span> +<span id="438">438</span> +<span id="439">439</span> +<span id="440">440</span> +<span id="441">441</span> +<span id="442">442</span> +<span id="443">443</span> +<span id="444">444</span> +<span id="445">445</span> +<span id="446">446</span> +<span id="447">447</span> +<span id="448">448</span> +<span id="449">449</span> +<span id="450">450</span> +<span id="451">451</span> +<span id="452">452</span> +<span id="453">453</span> +<span id="454">454</span> +<span id="455">455</span> +<span id="456">456</span> +<span id="457">457</span> +<span id="458">458</span> +<span id="459">459</span> +<span id="460">460</span> +</pre><pre class="rust"> +<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::lexer</span>::{<span class="ident">Lexer</span>, <span class="ident">Token</span>}; + +<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Debug</span>, <span class="ident">PartialEq</span>)]</span> +<span class="kw">pub</span> <span class="kw">enum</span> <span class="ident">ExprAST</span> { + <span class="doccomment">/// Number - Expression class for numeric literals like "1.0".</span> + <span class="ident">Number</span>(<span class="ident">f64</span>), + + <span class="doccomment">/// Variable - Expression class for referencing a variable, like "a".</span> + <span class="ident">Variable</span>(<span class="ident">String</span>), + + <span class="doccomment">/// Binary - Expression class for a binary operator.</span> + <span class="ident">Binary</span>(<span class="ident">char</span>, <span class="ident">Box</span><span class="op"><</span><span class="ident">ExprAST</span><span class="op">></span>, <span class="ident">Box</span><span class="op"><</span><span class="ident">ExprAST</span><span class="op">></span>), + + <span class="doccomment">/// Call - Expression class for function calls.</span> + <span class="ident">Call</span>(<span class="ident">String</span>, <span class="ident">Vec</span><span class="op"><</span><span class="ident">ExprAST</span><span class="op">></span>), +} + +<span class="doccomment">/// PrototypeAST - This class represents the "prototype" for a function,</span> +<span class="doccomment">/// which captures its name, and its argument names (thus implicitly the number</span> +<span class="doccomment">/// of arguments the function takes).</span> +<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Debug</span>, <span class="ident">PartialEq</span>)]</span> +<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">PrototypeAST</span>(<span class="kw">pub</span> <span class="ident">String</span>, <span class="kw">pub</span> <span class="ident">Vec</span><span class="op"><</span><span class="ident">String</span><span class="op">></span>); + +<span class="doccomment">/// FunctionAST - This class represents a function definition itself.</span> +<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Debug</span>, <span class="ident">PartialEq</span>)]</span> +<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">FunctionAST</span>(<span class="kw">pub</span> <span class="ident">PrototypeAST</span>, <span class="kw">pub</span> <span class="ident">ExprAST</span>); + +<span class="doccomment">/// Parse result with String as Error type (to be compliant with tutorial).</span> +<span class="kw">type</span> <span class="ident">ParseResult</span><span class="op"><</span><span class="ident">T</span><span class="op">></span> <span class="op">=</span> <span class="prelude-ty">Result</span><span class="op"><</span><span class="ident">T</span>, <span class="ident">String</span><span class="op">></span>; + +<span class="doccomment">/// Parser for the `kaleidoscope` language.</span> +<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">Parser</span><span class="op"><</span><span class="ident">I</span><span class="op">></span> +<span class="kw">where</span> + <span class="ident">I</span>: <span class="ident">Iterator</span><span class="op"><</span><span class="ident">Item</span> <span class="op">=</span> <span class="ident">char</span><span class="op">></span>, +{ + <span class="ident">lexer</span>: <span class="ident">Lexer</span><span class="op"><</span><span class="ident">I</span><span class="op">></span>, + <span class="ident">cur_tok</span>: <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">Token</span><span class="op">></span>, +} + +<span class="kw">impl</span><span class="op"><</span><span class="ident">I</span><span class="op">></span> <span class="ident">Parser</span><span class="op"><</span><span class="ident">I</span><span class="op">></span> +<span class="kw">where</span> + <span class="ident">I</span>: <span class="ident">Iterator</span><span class="op"><</span><span class="ident">Item</span> <span class="op">=</span> <span class="ident">char</span><span class="op">></span>, +{ + <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>(<span class="ident">lexer</span>: <span class="ident">Lexer</span><span class="op"><</span><span class="ident">I</span><span class="op">></span>) <span class="op">-</span><span class="op">></span> <span class="self">Self</span> { + <span class="ident">Parser</span> { + <span class="ident">lexer</span>, + <span class="ident">cur_tok</span>: <span class="prelude-val">None</span>, + } + } + + <span class="comment">// -----------------------</span> + <span class="comment">// Simple Token Buffer</span> + <span class="comment">// -----------------------</span> + + <span class="doccomment">/// Implement the global variable `int CurTok;` from the tutorial.</span> + <span class="doccomment">///</span> + <span class="doccomment">/// # Panics</span> + <span class="doccomment">/// Panics if the parser doesn't have a current token.</span> + <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">cur_tok</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="kw-2">&</span><span class="ident">Token</span> { + <span class="self">self</span>.<span class="ident">cur_tok</span>.<span class="ident">as_ref</span>().<span class="ident">expect</span>(<span class="string">"Parser: Expected cur_token!"</span>) + } + + <span class="doccomment">/// Advance the `cur_tok` by getting the next token from the lexer.</span> + <span class="doccomment">///</span> + <span class="doccomment">/// Implement the fucntion `int getNextToken();` from the tutorial.</span> + <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">get_next_token</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>) { + <span class="self">self</span>.<span class="ident">cur_tok</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="self">self</span>.<span class="ident">lexer</span>.<span class="ident">gettok</span>()); + } + + <span class="comment">// ----------------------------</span> + <span class="comment">// Basic Expression Parsing</span> + <span class="comment">// ----------------------------</span> + + <span class="doccomment">/// numberexpr ::= number</span> + <span class="doccomment">///</span> + <span class="doccomment">/// Implement `std::unique_ptr<ExprAST> ParseNumberExpr();` from the tutorial.</span> + <span class="kw">fn</span> <span class="ident">parse_num_expr</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ParseResult</span><span class="op"><</span><span class="ident">ExprAST</span><span class="op">></span> { + <span class="kw">match</span> <span class="kw-2">*</span><span class="self">self</span>.<span class="ident">cur_tok</span>() { + <span class="ident">Token::Number</span>(<span class="ident">num</span>) <span class="op">=</span><span class="op">></span> { + <span class="comment">// Consume the number token.</span> + <span class="self">self</span>.<span class="ident">get_next_token</span>(); + <span class="prelude-val">Ok</span>(<span class="ident">ExprAST::Number</span>(<span class="ident">num</span>)) + } + <span class="kw">_</span> <span class="op">=</span><span class="op">></span> <span class="macro">unreachable!</span>(), + } + } + + <span class="doccomment">/// parenexpr ::= '(' expression ')'</span> + <span class="doccomment">///</span> + <span class="doccomment">/// Implement `std::unique_ptr<ExprAST> ParseParenExpr();` from the tutorial.</span> + <span class="kw">fn</span> <span class="ident">parse_paren_expr</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ParseResult</span><span class="op"><</span><span class="ident">ExprAST</span><span class="op">></span> { + <span class="comment">// Eat '(' token.</span> + <span class="macro">assert_eq!</span>(<span class="kw-2">*</span><span class="self">self</span>.<span class="ident">cur_tok</span>(), <span class="ident">Token::Char</span>(<span class="string">'('</span>)); + <span class="self">self</span>.<span class="ident">get_next_token</span>(); + + <span class="kw">let</span> <span class="ident">v</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">parse_expression</span>()<span class="question-mark">?</span>; + + <span class="kw">if</span> <span class="kw-2">*</span><span class="self">self</span>.<span class="ident">cur_tok</span>() <span class="op">=</span><span class="op">=</span> <span class="ident">Token::Char</span>(<span class="string">')'</span>) { + <span class="comment">// Eat ')' token.</span> + <span class="self">self</span>.<span class="ident">get_next_token</span>(); + <span class="prelude-val">Ok</span>(<span class="ident">v</span>) + } <span class="kw">else</span> { + <span class="prelude-val">Err</span>(<span class="string">"expected ')'"</span>.<span class="ident">into</span>()) + } + } + + <span class="doccomment">/// identifierexpr</span> + <span class="doccomment">/// ::= identifier</span> + <span class="doccomment">/// ::= identifier '(' expression* ')'</span> + <span class="doccomment">///</span> + <span class="doccomment">/// Implement `std::unique_ptr<ExprAST> ParseIdentifierExpr();` from the tutorial.</span> + <span class="kw">fn</span> <span class="ident">parse_identifier_expr</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ParseResult</span><span class="op"><</span><span class="ident">ExprAST</span><span class="op">></span> { + <span class="kw">let</span> <span class="ident">id_name</span> <span class="op">=</span> <span class="kw">match</span> <span class="self">self</span>.<span class="ident">cur_tok</span>.<span class="ident">take</span>() { + <span class="prelude-val">Some</span>(<span class="ident">Token::Identifier</span>(<span class="ident">id</span>)) <span class="op">=</span><span class="op">></span> { + <span class="comment">// Consume identifier.</span> + <span class="self">self</span>.<span class="ident">get_next_token</span>(); + <span class="ident">id</span> + } + <span class="kw">_</span> <span class="op">=</span><span class="op">></span> <span class="macro">unreachable!</span>(), + }; + + <span class="kw">if</span> <span class="kw-2">*</span><span class="self">self</span>.<span class="ident">cur_tok</span>() <span class="op">!</span><span class="op">=</span> <span class="ident">Token::Char</span>(<span class="string">'('</span>) { + <span class="comment">// Simple variable reference.</span> + <span class="prelude-val">Ok</span>(<span class="ident">ExprAST::Variable</span>(<span class="ident">id_name</span>)) + } <span class="kw">else</span> { + <span class="comment">// Call.</span> + + <span class="comment">// Eat '(' token.</span> + <span class="self">self</span>.<span class="ident">get_next_token</span>(); + + <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">args</span>: <span class="ident">Vec</span><span class="op"><</span><span class="ident">ExprAST</span><span class="op">></span> <span class="op">=</span> <span class="ident">Vec::new</span>(); + + <span class="comment">// If there are arguments collect them.</span> + <span class="kw">if</span> <span class="kw-2">*</span><span class="self">self</span>.<span class="ident">cur_tok</span>() <span class="op">!</span><span class="op">=</span> <span class="ident">Token::Char</span>(<span class="string">')'</span>) { + <span class="kw">loop</span> { + <span class="kw">let</span> <span class="ident">arg</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">parse_expression</span>()<span class="question-mark">?</span>; + <span class="ident">args</span>.<span class="ident">push</span>(<span class="ident">arg</span>); + + <span class="kw">if</span> <span class="kw-2">*</span><span class="self">self</span>.<span class="ident">cur_tok</span>() <span class="op">=</span><span class="op">=</span> <span class="ident">Token::Char</span>(<span class="string">')'</span>) { + <span class="comment">// Eat ')' token.</span> + <span class="self">self</span>.<span class="ident">get_next_token</span>(); + <span class="kw">break</span>; + } + + <span class="kw">if</span> <span class="kw-2">*</span><span class="self">self</span>.<span class="ident">cur_tok</span>() <span class="op">!</span><span class="op">=</span> <span class="ident">Token::Char</span>(<span class="string">','</span>) { + <span class="kw">return</span> <span class="prelude-val">Err</span>(<span class="string">"Expected ')' or ',' in argument list"</span>.<span class="ident">into</span>()); + } + + <span class="self">self</span>.<span class="ident">get_next_token</span>(); + } + } + + <span class="prelude-val">Ok</span>(<span class="ident">ExprAST::Call</span>(<span class="ident">id_name</span>, <span class="ident">args</span>)) + } + } + + <span class="doccomment">/// primary</span> + <span class="doccomment">/// ::= identifierexpr</span> + <span class="doccomment">/// ::= numberexpr</span> + <span class="doccomment">/// ::= parenexpr</span> + <span class="doccomment">///</span> + <span class="doccomment">/// Implement `std::unique_ptr<ExprAST> ParsePrimary();` from the tutorial.</span> + <span class="kw">fn</span> <span class="ident">parse_primary</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ParseResult</span><span class="op"><</span><span class="ident">ExprAST</span><span class="op">></span> { + <span class="kw">match</span> <span class="kw-2">*</span><span class="self">self</span>.<span class="ident">cur_tok</span>() { + <span class="ident">Token::Identifier</span>(<span class="kw">_</span>) <span class="op">=</span><span class="op">></span> <span class="self">self</span>.<span class="ident">parse_identifier_expr</span>(), + <span class="ident">Token::Number</span>(<span class="kw">_</span>) <span class="op">=</span><span class="op">></span> <span class="self">self</span>.<span class="ident">parse_num_expr</span>(), + <span class="ident">Token::Char</span>(<span class="string">'('</span>) <span class="op">=</span><span class="op">></span> <span class="self">self</span>.<span class="ident">parse_paren_expr</span>(), + <span class="kw">_</span> <span class="op">=</span><span class="op">></span> <span class="prelude-val">Err</span>(<span class="string">"unknown token when expecting an expression"</span>.<span class="ident">into</span>()), + } + } + + <span class="comment">// -----------------------------</span> + <span class="comment">// Binary Expression Parsing</span> + <span class="comment">// -----------------------------</span> + + <span class="doccomment">/// /// expression</span> + <span class="doccomment">/// ::= primary binoprhs</span> + <span class="doccomment">///</span> + <span class="doccomment">/// Implement `std::unique_ptr<ExprAST> ParseExpression();` from the tutorial.</span> + <span class="kw">fn</span> <span class="ident">parse_expression</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ParseResult</span><span class="op"><</span><span class="ident">ExprAST</span><span class="op">></span> { + <span class="kw">let</span> <span class="ident">lhs</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">parse_primary</span>()<span class="question-mark">?</span>; + <span class="self">self</span>.<span class="ident">parse_bin_op_rhs</span>(<span class="number">0</span>, <span class="ident">lhs</span>) + } + + <span class="doccomment">/// binoprhs</span> + <span class="doccomment">/// ::= ('+' primary)*</span> + <span class="doccomment">///</span> + <span class="doccomment">/// Implement `std::unique_ptr<ExprAST> ParseBinOpRHS(int ExprPrec, std::unique_ptr<ExprAST> LHS);` from the tutorial.</span> + <span class="kw">fn</span> <span class="ident">parse_bin_op_rhs</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">expr_prec</span>: <span class="ident">isize</span>, <span class="kw-2">mut</span> <span class="ident">lhs</span>: <span class="ident">ExprAST</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ParseResult</span><span class="op"><</span><span class="ident">ExprAST</span><span class="op">></span> { + <span class="kw">loop</span> { + <span class="kw">let</span> <span class="ident">tok_prec</span> <span class="op">=</span> <span class="ident">get_tok_precedence</span>(<span class="self">self</span>.<span class="ident">cur_tok</span>()); + + <span class="comment">// Not a binary operator or precedence is too small.</span> + <span class="kw">if</span> <span class="ident">tok_prec</span> <span class="op"><</span> <span class="ident">expr_prec</span> { + <span class="kw">return</span> <span class="prelude-val">Ok</span>(<span class="ident">lhs</span>); + } + + <span class="kw">let</span> <span class="ident">binop</span> <span class="op">=</span> <span class="kw">match</span> <span class="self">self</span>.<span class="ident">cur_tok</span>.<span class="ident">take</span>() { + <span class="prelude-val">Some</span>(<span class="ident">Token::Char</span>(<span class="ident">c</span>)) <span class="op">=</span><span class="op">></span> { + <span class="comment">// Eat binary operator.</span> + <span class="self">self</span>.<span class="ident">get_next_token</span>(); + <span class="ident">c</span> + } + <span class="kw">_</span> <span class="op">=</span><span class="op">></span> <span class="macro">unreachable!</span>(), + }; + + <span class="comment">// lhs BINOP1 rhs BINOP2 remrhs</span> + <span class="comment">// ^^^^^^ ^^^^^^</span> + <span class="comment">// tok_prec next_prec</span> + <span class="comment">//</span> + <span class="comment">// In case BINOP1 has higher precedence, we are done here and can build a 'Binary' AST</span> + <span class="comment">// node between 'lhs' and 'rhs'.</span> + <span class="comment">//</span> + <span class="comment">// In case BINOP2 has higher precedence, we take 'rhs' as 'lhs' and recurse into the</span> + <span class="comment">// 'remrhs' expression first.</span> + + <span class="comment">// Parse primary expression after binary operator.</span> + <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">rhs</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">parse_primary</span>()<span class="question-mark">?</span>; + + <span class="kw">let</span> <span class="ident">next_prec</span> <span class="op">=</span> <span class="ident">get_tok_precedence</span>(<span class="self">self</span>.<span class="ident">cur_tok</span>()); + <span class="kw">if</span> <span class="ident">tok_prec</span> <span class="op"><</span> <span class="ident">next_prec</span> { + <span class="comment">// BINOP2 has higher precedence thatn BINOP1, recurse into 'remhs'.</span> + <span class="ident">rhs</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">parse_bin_op_rhs</span>(<span class="ident">tok_prec</span> <span class="op">+</span> <span class="number">1</span>, <span class="ident">rhs</span>)<span class="question-mark">?</span> + } + + <span class="ident">lhs</span> <span class="op">=</span> <span class="ident">ExprAST::Binary</span>(<span class="ident">binop</span>, <span class="ident">Box::new</span>(<span class="ident">lhs</span>), <span class="ident">Box::new</span>(<span class="ident">rhs</span>)); + } + } + + <span class="comment">// --------------------</span> + <span class="comment">// Parsing the Rest</span> + <span class="comment">// --------------------</span> + + <span class="doccomment">/// prototype</span> + <span class="doccomment">/// ::= id '(' id* ')'</span> + <span class="doccomment">///</span> + <span class="doccomment">/// Implement `std::unique_ptr<PrototypeAST> ParsePrototype();` from the tutorial.</span> + <span class="kw">fn</span> <span class="ident">parse_prototype</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ParseResult</span><span class="op"><</span><span class="ident">PrototypeAST</span><span class="op">></span> { + <span class="kw">let</span> <span class="ident">id_name</span> <span class="op">=</span> <span class="kw">match</span> <span class="self">self</span>.<span class="ident">cur_tok</span>.<span class="ident">take</span>() { + <span class="prelude-val">Some</span>(<span class="ident">Token::Identifier</span>(<span class="ident">id</span>)) <span class="op">=</span><span class="op">></span> { + <span class="comment">// Consume the identifier.</span> + <span class="self">self</span>.<span class="ident">get_next_token</span>(); + <span class="ident">id</span> + } + <span class="ident">other</span> <span class="op">=</span><span class="op">></span> { + <span class="comment">// Plug back current token.</span> + <span class="self">self</span>.<span class="ident">cur_tok</span> <span class="op">=</span> <span class="ident">other</span>; + <span class="kw">return</span> <span class="prelude-val">Err</span>(<span class="string">"Expected function name in prototype"</span>.<span class="ident">into</span>()); + } + }; + + <span class="kw">if</span> <span class="kw-2">*</span><span class="self">self</span>.<span class="ident">cur_tok</span>() <span class="op">!</span><span class="op">=</span> <span class="ident">Token::Char</span>(<span class="string">'('</span>) { + <span class="kw">return</span> <span class="prelude-val">Err</span>(<span class="string">"Expected '(' in prototype"</span>.<span class="ident">into</span>()); + } + + <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">args</span>: <span class="ident">Vec</span><span class="op"><</span><span class="ident">String</span><span class="op">></span> <span class="op">=</span> <span class="ident">Vec::new</span>(); + <span class="kw">loop</span> { + <span class="self">self</span>.<span class="ident">get_next_token</span>(); + + <span class="kw">match</span> <span class="self">self</span>.<span class="ident">cur_tok</span>.<span class="ident">take</span>() { + <span class="prelude-val">Some</span>(<span class="ident">Token::Identifier</span>(<span class="ident">arg</span>)) <span class="op">=</span><span class="op">></span> <span class="ident">args</span>.<span class="ident">push</span>(<span class="ident">arg</span>), + <span class="prelude-val">Some</span>(<span class="ident">Token::Char</span>(<span class="string">','</span>)) <span class="op">=</span><span class="op">></span> {} + <span class="ident">other</span> <span class="op">=</span><span class="op">></span> { + <span class="self">self</span>.<span class="ident">cur_tok</span> <span class="op">=</span> <span class="ident">other</span>; + <span class="kw">break</span>; + } + } + } + + <span class="kw">if</span> <span class="kw-2">*</span><span class="self">self</span>.<span class="ident">cur_tok</span>() <span class="op">!</span><span class="op">=</span> <span class="ident">Token::Char</span>(<span class="string">')'</span>) { + <span class="kw">return</span> <span class="prelude-val">Err</span>(<span class="string">"Expected ')' in prototype"</span>.<span class="ident">into</span>()); + } + + <span class="comment">// Consume ')'.</span> + <span class="self">self</span>.<span class="ident">get_next_token</span>(); + + <span class="prelude-val">Ok</span>(<span class="ident">PrototypeAST</span>(<span class="ident">id_name</span>, <span class="ident">args</span>)) + } + + <span class="doccomment">/// definition ::= 'def' prototype expression</span> + <span class="doccomment">///</span> + <span class="doccomment">/// Implement `std::unique_ptr<FunctionAST> ParseDefinition();` from the tutorial.</span> + <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">parse_definition</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ParseResult</span><span class="op"><</span><span class="ident">FunctionAST</span><span class="op">></span> { + <span class="comment">// Consume 'def' token.</span> + <span class="macro">assert_eq!</span>(<span class="kw-2">*</span><span class="self">self</span>.<span class="ident">cur_tok</span>(), <span class="ident">Token::Def</span>); + <span class="self">self</span>.<span class="ident">get_next_token</span>(); + + <span class="kw">let</span> <span class="ident">proto</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">parse_prototype</span>()<span class="question-mark">?</span>; + <span class="kw">let</span> <span class="ident">expr</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">parse_expression</span>()<span class="question-mark">?</span>; + + <span class="prelude-val">Ok</span>(<span class="ident">FunctionAST</span>(<span class="ident">proto</span>, <span class="ident">expr</span>)) + } + + <span class="doccomment">/// external ::= 'extern' prototype</span> + <span class="doccomment">///</span> + <span class="doccomment">/// Implement `std::unique_ptr<PrototypeAST> ParseExtern();` from the tutorial.</span> + <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">parse_extern</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ParseResult</span><span class="op"><</span><span class="ident">PrototypeAST</span><span class="op">></span> { + <span class="comment">// Consume 'extern' token.</span> + <span class="macro">assert_eq!</span>(<span class="kw-2">*</span><span class="self">self</span>.<span class="ident">cur_tok</span>(), <span class="ident">Token::Extern</span>); + <span class="self">self</span>.<span class="ident">get_next_token</span>(); + + <span class="self">self</span>.<span class="ident">parse_prototype</span>() + } + + <span class="doccomment">/// toplevelexpr ::= expression</span> + <span class="doccomment">///</span> + <span class="doccomment">/// Implement `std::unique_ptr<FunctionAST> ParseTopLevelExpr();` from the tutorial.</span> + <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">parse_top_level_expr</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">ParseResult</span><span class="op"><</span><span class="ident">FunctionAST</span><span class="op">></span> { + <span class="kw">let</span> <span class="ident">e</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">parse_expression</span>()<span class="question-mark">?</span>; + <span class="kw">let</span> <span class="ident">proto</span> <span class="op">=</span> <span class="ident">PrototypeAST</span>(<span class="string">""</span>.<span class="ident">into</span>(), <span class="ident">Vec::new</span>()); + <span class="prelude-val">Ok</span>(<span class="ident">FunctionAST</span>(<span class="ident">proto</span>, <span class="ident">e</span>)) + } +} + +<span class="doccomment">/// Get the binary operator precedence.</span> +<span class="doccomment">///</span> +<span class="doccomment">/// Implement `int GetTokPrecedence();` from the tutorial.</span> +<span class="kw">fn</span> <span class="ident">get_tok_precedence</span>(<span class="ident">tok</span>: <span class="kw-2">&</span><span class="ident">Token</span>) <span class="op">-</span><span class="op">></span> <span class="ident">isize</span> { + <span class="kw">match</span> <span class="ident">tok</span> { + <span class="ident">Token::Char</span>(<span class="string">'<'</span>) <span class="op">=</span><span class="op">></span> <span class="number">10</span>, + <span class="ident">Token::Char</span>(<span class="string">'+'</span>) <span class="op">=</span><span class="op">></span> <span class="number">20</span>, + <span class="ident">Token::Char</span>(<span class="string">'-'</span>) <span class="op">=</span><span class="op">></span> <span class="number">20</span>, + <span class="ident">Token::Char</span>(<span class="string">'*'</span>) <span class="op">=</span><span class="op">></span> <span class="number">40</span>, + <span class="kw">_</span> <span class="op">=</span><span class="op">></span> <span class="op">-</span><span class="number">1</span>, + } +} + +<span class="attribute">#[<span class="ident">cfg</span>(<span class="ident">test</span>)]</span> +<span class="kw">mod</span> <span class="ident">test</span> { + <span class="kw">use</span> <span class="kw">super</span>::{<span class="ident">ExprAST</span>, <span class="ident">FunctionAST</span>, <span class="ident">Parser</span>, <span class="ident">PrototypeAST</span>}; + <span class="kw">use</span> <span class="kw">crate</span><span class="ident">::lexer::Lexer</span>; + + <span class="kw">fn</span> <span class="ident">parser</span>(<span class="ident">input</span>: <span class="kw-2">&</span><span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Parser</span><span class="op"><</span><span class="ident">std::str::Chars</span><span class="op">></span> { + <span class="kw">let</span> <span class="ident">l</span> <span class="op">=</span> <span class="ident">Lexer::new</span>(<span class="ident">input</span>.<span class="ident">chars</span>()); + <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">p</span> <span class="op">=</span> <span class="ident">Parser::new</span>(<span class="ident">l</span>); + + <span class="comment">// Drop initial coin, initialize cur_tok.</span> + <span class="ident">p</span>.<span class="ident">get_next_token</span>(); + + <span class="ident">p</span> + } + + <span class="attribute">#[<span class="ident">test</span>]</span> + <span class="kw">fn</span> <span class="ident">parse_number</span>() { + <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">p</span> <span class="op">=</span> <span class="ident">parser</span>(<span class="string">"13.37"</span>); + + <span class="macro">assert_eq!</span>(<span class="ident">p</span>.<span class="ident">parse_num_expr</span>(), <span class="prelude-val">Ok</span>(<span class="ident">ExprAST::Number</span>(<span class="number">13.37f64</span>))); + } + + <span class="attribute">#[<span class="ident">test</span>]</span> + <span class="kw">fn</span> <span class="ident">parse_variable</span>() { + <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">p</span> <span class="op">=</span> <span class="ident">parser</span>(<span class="string">"foop"</span>); + + <span class="macro">assert_eq!</span>( + <span class="ident">p</span>.<span class="ident">parse_identifier_expr</span>(), + <span class="prelude-val">Ok</span>(<span class="ident">ExprAST::Variable</span>(<span class="string">"foop"</span>.<span class="ident">into</span>())) + ); + } + + <span class="attribute">#[<span class="ident">test</span>]</span> + <span class="kw">fn</span> <span class="ident">parse_primary</span>() { + <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">p</span> <span class="op">=</span> <span class="ident">parser</span>(<span class="string">"1337 foop \n bla(123)"</span>); + + <span class="macro">assert_eq!</span>(<span class="ident">p</span>.<span class="ident">parse_primary</span>(), <span class="prelude-val">Ok</span>(<span class="ident">ExprAST::Number</span>(<span class="number">1337f64</span>))); + + <span class="macro">assert_eq!</span>(<span class="ident">p</span>.<span class="ident">parse_primary</span>(), <span class="prelude-val">Ok</span>(<span class="ident">ExprAST::Variable</span>(<span class="string">"foop"</span>.<span class="ident">into</span>()))); + + <span class="macro">assert_eq!</span>( + <span class="ident">p</span>.<span class="ident">parse_primary</span>(), + <span class="prelude-val">Ok</span>(<span class="ident">ExprAST::Call</span>(<span class="string">"bla"</span>.<span class="ident">into</span>(), <span class="macro">vec!</span>[<span class="ident">ExprAST::Number</span>(<span class="number">123f64</span>)])) + ); + } + + <span class="attribute">#[<span class="ident">test</span>]</span> + <span class="kw">fn</span> <span class="ident">parse_binary_op</span>() { + <span class="comment">// Operator before RHS has higher precedence, expected AST</span> + <span class="comment">//</span> + <span class="comment">// -</span> + <span class="comment">// / \</span> + <span class="comment">// + c</span> + <span class="comment">// / \</span> + <span class="comment">// a b</span> + <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">p</span> <span class="op">=</span> <span class="ident">parser</span>(<span class="string">"a + b - c"</span>); + + <span class="kw">let</span> <span class="ident">binexpr_ab</span> <span class="op">=</span> <span class="ident">ExprAST::Binary</span>( + <span class="string">'+'</span>, + <span class="ident">Box::new</span>(<span class="ident">ExprAST::Variable</span>(<span class="string">"a"</span>.<span class="ident">into</span>())), + <span class="ident">Box::new</span>(<span class="ident">ExprAST::Variable</span>(<span class="string">"b"</span>.<span class="ident">into</span>())), + ); + + <span class="kw">let</span> <span class="ident">binexpr_abc</span> <span class="op">=</span> <span class="ident">ExprAST::Binary</span>( + <span class="string">'-'</span>, + <span class="ident">Box::new</span>(<span class="ident">binexpr_ab</span>), + <span class="ident">Box::new</span>(<span class="ident">ExprAST::Variable</span>(<span class="string">"c"</span>.<span class="ident">into</span>())), + ); + + <span class="macro">assert_eq!</span>(<span class="ident">p</span>.<span class="ident">parse_expression</span>(), <span class="prelude-val">Ok</span>(<span class="ident">binexpr_abc</span>)); + } + + <span class="attribute">#[<span class="ident">test</span>]</span> + <span class="kw">fn</span> <span class="ident">parse_binary_op2</span>() { + <span class="comment">// Operator after RHS has higher precedence, expected AST</span> + <span class="comment">//</span> + <span class="comment">// +</span> + <span class="comment">// / \</span> + <span class="comment">// a *</span> + <span class="comment">// / \</span> + <span class="comment">// b c</span> + <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">p</span> <span class="op">=</span> <span class="ident">parser</span>(<span class="string">"a + b * c"</span>); + + <span class="kw">let</span> <span class="ident">binexpr_bc</span> <span class="op">=</span> <span class="ident">ExprAST::Binary</span>( + <span class="string">'*'</span>, + <span class="ident">Box::new</span>(<span class="ident">ExprAST::Variable</span>(<span class="string">"b"</span>.<span class="ident">into</span>())), + <span class="ident">Box::new</span>(<span class="ident">ExprAST::Variable</span>(<span class="string">"c"</span>.<span class="ident">into</span>())), + ); + + <span class="kw">let</span> <span class="ident">binexpr_abc</span> <span class="op">=</span> <span class="ident">ExprAST::Binary</span>( + <span class="string">'+'</span>, + <span class="ident">Box::new</span>(<span class="ident">ExprAST::Variable</span>(<span class="string">"a"</span>.<span class="ident">into</span>())), + <span class="ident">Box::new</span>(<span class="ident">binexpr_bc</span>), + ); + + <span class="macro">assert_eq!</span>(<span class="ident">p</span>.<span class="ident">parse_expression</span>(), <span class="prelude-val">Ok</span>(<span class="ident">binexpr_abc</span>)); + } + + <span class="attribute">#[<span class="ident">test</span>]</span> + <span class="kw">fn</span> <span class="ident">parse_prototype</span>() { + <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">p</span> <span class="op">=</span> <span class="ident">parser</span>(<span class="string">"foo(a,b)"</span>); + + <span class="kw">let</span> <span class="ident">proto</span> <span class="op">=</span> <span class="ident">PrototypeAST</span>(<span class="string">"foo"</span>.<span class="ident">into</span>(), <span class="macro">vec!</span>[<span class="string">"a"</span>.<span class="ident">into</span>(), <span class="string">"b"</span>.<span class="ident">into</span>()]); + + <span class="macro">assert_eq!</span>(<span class="ident">p</span>.<span class="ident">parse_prototype</span>(), <span class="prelude-val">Ok</span>(<span class="ident">proto</span>)); + } + + <span class="attribute">#[<span class="ident">test</span>]</span> + <span class="kw">fn</span> <span class="ident">parse_definition</span>() { + <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">p</span> <span class="op">=</span> <span class="ident">parser</span>(<span class="string">"def bar( arg0 , arg1 ) arg0 + arg1"</span>); + + <span class="kw">let</span> <span class="ident">proto</span> <span class="op">=</span> <span class="ident">PrototypeAST</span>(<span class="string">"bar"</span>.<span class="ident">into</span>(), <span class="macro">vec!</span>[<span class="string">"arg0"</span>.<span class="ident">into</span>(), <span class="string">"arg1"</span>.<span class="ident">into</span>()]); + + <span class="kw">let</span> <span class="ident">body</span> <span class="op">=</span> <span class="ident">ExprAST::Binary</span>( + <span class="string">'+'</span>, + <span class="ident">Box::new</span>(<span class="ident">ExprAST::Variable</span>(<span class="string">"arg0"</span>.<span class="ident">into</span>())), + <span class="ident">Box::new</span>(<span class="ident">ExprAST::Variable</span>(<span class="string">"arg1"</span>.<span class="ident">into</span>())), + ); + + <span class="kw">let</span> <span class="ident">func</span> <span class="op">=</span> <span class="ident">FunctionAST</span>(<span class="ident">proto</span>, <span class="ident">body</span>); + + <span class="macro">assert_eq!</span>(<span class="ident">p</span>.<span class="ident">parse_definition</span>(), <span class="prelude-val">Ok</span>(<span class="ident">func</span>)); + } + + <span class="attribute">#[<span class="ident">test</span>]</span> + <span class="kw">fn</span> <span class="ident">parse_extern</span>() { + <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">p</span> <span class="op">=</span> <span class="ident">parser</span>(<span class="string">"extern baz()"</span>); + + <span class="kw">let</span> <span class="ident">proto</span> <span class="op">=</span> <span class="ident">PrototypeAST</span>(<span class="string">"baz"</span>.<span class="ident">into</span>(), <span class="macro">vec!</span>[]); + + <span class="macro">assert_eq!</span>(<span class="ident">p</span>.<span class="ident">parse_extern</span>(), <span class="prelude-val">Ok</span>(<span class="ident">proto</span>)); + } +} +</pre></div> +</section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="llvm_kaleidoscope_rs" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script><script src="../../source-script.js"></script><script src="../../source-files.js"></script></body></html>
\ No newline at end of file diff --git a/storage.js b/storage.js new file mode 100644 index 0000000..6b16cbd --- /dev/null +++ b/storage.js @@ -0,0 +1 @@ +var resourcesSuffix="";var darkThemes=["dark","ayu"];window.currentTheme=document.getElementById("themeStyle");window.mainTheme=document.getElementById("mainThemeStyle");var settingsDataset=(function(){var settingsElement=document.getElementById("default-settings");if(settingsElement===null){return null}var dataset=settingsElement.dataset;if(dataset===undefined){return null}return dataset})();function getSettingValue(settingName){var current=getCurrentValue('rustdoc-'+settingName);if(current!==null){return current}if(settingsDataset!==null){var def=settingsDataset[settingName.replace(/-/g,'_')];if(def!==undefined){return def}}return null}var localStoredTheme=getSettingValue("theme");var savedHref=[];function hasClass(elem,className){return elem&&elem.classList&&elem.classList.contains(className)}function addClass(elem,className){if(!elem||!elem.classList){return}elem.classList.add(className)}function removeClass(elem,className){if(!elem||!elem.classList){return}elem.classList.remove(className)}function onEach(arr,func,reversed){if(arr&&arr.length>0&&func){var length=arr.length;var i;if(reversed){for(i=length-1;i>=0;--i){if(func(arr[i])){return true}}}else{for(i=0;i<length;++i){if(func(arr[i])){return true}}}}return false}function onEachLazy(lazyArray,func,reversed){return onEach(Array.prototype.slice.call(lazyArray),func,reversed)}function hasOwnPropertyRustdoc(obj,property){return Object.prototype.hasOwnProperty.call(obj,property)}function updateLocalStorage(name,value){try{window.localStorage.setItem(name,value)}catch(e){}}function getCurrentValue(name){try{return window.localStorage.getItem(name)}catch(e){return null}}function switchTheme(styleElem,mainStyleElem,newTheme,saveTheme){var fullBasicCss="rustdoc"+resourcesSuffix+".css";var fullNewTheme=newTheme+resourcesSuffix+".css";var newHref=mainStyleElem.href.replace(fullBasicCss,fullNewTheme);if(saveTheme){updateLocalStorage("rustdoc-theme",newTheme)}if(styleElem.href===newHref){return}var found=false;if(savedHref.length===0){onEachLazy(document.getElementsByTagName("link"),function(el){savedHref.push(el.href)})}onEach(savedHref,function(el){if(el===newHref){found=true;return true}});if(found){styleElem.href=newHref}}function useSystemTheme(value){if(value===undefined){value=true}updateLocalStorage("rustdoc-use-system-theme",value);var toggle=document.getElementById("use-system-theme");if(toggle&&toggle instanceof HTMLInputElement){toggle.checked=value}}var updateSystemTheme=(function(){if(!window.matchMedia){return function(){var cssTheme=getComputedStyle(document.documentElement).getPropertyValue('content');switchTheme(window.currentTheme,window.mainTheme,JSON.parse(cssTheme)||"light",true)}}var mql=window.matchMedia("(prefers-color-scheme: dark)");function handlePreferenceChange(mql){if(getSettingValue("use-system-theme")!=="false"){var lightTheme=getSettingValue("preferred-light-theme")||"light";var darkTheme=getSettingValue("preferred-dark-theme")||"dark";if(mql.matches){switchTheme(window.currentTheme,window.mainTheme,darkTheme,true)}else{switchTheme(window.currentTheme,window.mainTheme,lightTheme,true)}}}mql.addListener(handlePreferenceChange);return function(){handlePreferenceChange(mql)}})();if(getSettingValue("use-system-theme")!=="false"&&window.matchMedia){if(getSettingValue("use-system-theme")===null&&getSettingValue("preferred-dark-theme")===null&&darkThemes.indexOf(localStoredTheme)>=0){updateLocalStorage("rustdoc-preferred-dark-theme",localStoredTheme)}updateSystemTheme()}else{switchTheme(window.currentTheme,window.mainTheme,getSettingValue("theme")||"light",false)}
\ No newline at end of file diff --git a/wheel.svg b/wheel.svg new file mode 100644 index 0000000..01da3b2 --- /dev/null +++ b/wheel.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="Capa_1" width="27.434" height="29.5" enable-background="new 0 0 27.434 29.5" version="1.1" viewBox="0 0 27.434 29.5" xml:space="preserve"><g><path d="M27.315,18.389c-0.165-0.604-0.509-1.113-0.981-1.459c-0.042-0.144-0.083-0.429-0.015-0.761l0.037-0.177v-0.182V14.8 c0-1.247-0.006-1.277-0.048-1.472c-0.076-0.354-0.035-0.653,0.007-0.803c0.477-0.346,0.828-0.861,0.996-1.476 c0.261-0.956,0.076-2.091-0.508-3.114l-0.591-1.032c-0.746-1.307-1.965-2.119-3.182-2.119c-0.378,0-0.75,0.081-1.085,0.235 c-0.198-0.025-0.554-0.15-0.855-0.389l-0.103-0.082l-0.114-0.065l-1.857-1.067L18.92,3.36l-0.105-0.044 c-0.376-0.154-0.658-0.41-0.768-0.556C17.918,1.172,16.349,0,14.296,0H13.14c-2.043,0-3.608,1.154-3.749,2.721 C9.277,2.862,8.999,3.104,8.633,3.25l-0.1,0.039L8.439,3.341L6.495,4.406L6.363,4.479L6.245,4.573 C5.936,4.82,5.596,4.944,5.416,4.977c-0.314-0.139-0.66-0.21-1.011-0.21c-1.198,0-2.411,0.819-3.165,2.139L0.65,7.938 c-0.412,0.72-0.642,1.521-0.644,2.258c-0.003,0.952,0.362,1.756,1.013,2.256c0.034,0.155,0.061,0.448-0.016,0.786 c-0.038,0.168-0.062,0.28-0.062,1.563c0,1.148,0,1.148,0.015,1.262l0.009,0.073l0.017,0.073c0.073,0.346,0.045,0.643,0.011,0.802 C0.348,17.512-0.01,18.314,0,19.268c0.008,0.729,0.238,1.523,0.648,2.242l0.589,1.031c0.761,1.331,1.967,2.159,3.15,2.159 c0.324,0,0.645-0.064,0.938-0.187c0.167,0.038,0.492,0.156,0.813,0.416l0.11,0.088l0.124,0.07l2.045,1.156l0.102,0.057l0.107,0.043 c0.364,0.147,0.646,0.381,0.766,0.521c0.164,1.52,1.719,2.634,3.745,2.634h1.155c2.037,0,3.598-1.134,3.747-2.675 c0.117-0.145,0.401-0.393,0.774-0.549l0.111-0.047l0.105-0.062l1.96-1.159l0.105-0.062l0.097-0.075 c0.309-0.246,0.651-0.371,0.832-0.402c0.313,0.138,0.662,0.212,1.016,0.212c1.199,0,2.412-0.82,3.166-2.139l0.59-1.032 C27.387,20.48,27.575,19.342,27.315,18.389z M25.274,20.635l-0.59,1.032c-0.438,0.765-1.104,1.251-1.639,1.251 c-0.133,0-0.258-0.029-0.369-0.094c-0.15-0.086-0.346-0.127-0.566-0.127c-0.596,0-1.383,0.295-2.01,0.796l-1.96,1.157 c-1.016,0.425-1.846,1.291-1.846,1.929s-0.898,1.159-1.998,1.159H13.14c-1.1,0-1.998-0.514-1.998-1.141s-0.834-1.477-1.854-1.888 l-2.046-1.157c-0.636-0.511-1.425-0.814-2.006-0.814c-0.202,0-0.379,0.037-0.516,0.115c-0.101,0.057-0.214,0.084-0.333,0.084 c-0.518,0-1.179-0.498-1.62-1.271l-0.591-1.032c-0.545-0.954-0.556-1.983-0.024-2.286c0.532-0.305,0.78-1.432,0.551-2.506 c0,0,0-0.003,0-1.042c0-1.088,0.021-1.18,0.021-1.18c0.238-1.072-0.01-2.203-0.552-2.513C1.631,10.8,1.634,9.765,2.18,8.812 L2.769,7.78c0.438-0.766,1.103-1.251,1.636-1.251c0.131,0,0.255,0.029,0.365,0.092C4.92,6.707,5.114,6.747,5.334,6.747 c0.596,0,1.38-0.296,2.007-0.795l1.944-1.065c1.021-0.407,1.856-1.277,1.856-1.933c0-0.656,0.898-1.192,1.998-1.192h1.156V1.761 c1.1,0,1.998,0.545,1.998,1.211c0,0.667,0.832,1.554,1.849,1.973L20,6.013c0.618,0.489,1.401,0.775,2.012,0.775 c0.24,0,0.454-0.045,0.62-0.139c0.122-0.069,0.259-0.102,0.403-0.102c0.551,0,1.221,0.476,1.653,1.231l0.59,1.032 c0.544,0.953,0.518,2.004-0.062,2.334c-0.577,0.331-0.859,1.48-0.627,2.554c0,0,0.01,0.042,0.01,1.103c0,1.012,0,1.012,0,1.012 c-0.218,1.049,0.068,2.174,0.636,2.498C25.802,18.635,25.819,19.68,25.274,20.635z"/><path d="M13.61,7.611c-3.913,0-7.084,3.173-7.084,7.085c0,3.914,3.171,7.085,7.084,7.085s7.085-3.172,7.085-7.085 C20.695,10.784,17.523,7.611,13.61,7.611z M13.61,20.02c-2.936,0-5.323-2.388-5.323-5.323c0-2.935,2.388-5.323,5.323-5.323 s5.324,2.388,5.324,5.323C18.934,17.632,16.546,20.02,13.61,20.02z"/><path d="M13.682,9.908c-2.602,0-4.718,2.116-4.718,4.718c0,2.601,2.116,4.716,4.718,4.716c2.601,0,4.717-2.115,4.717-4.716 C18.399,12.024,16.283,9.908,13.682,9.908z M13.682,17.581c-1.633,0-2.956-1.323-2.956-2.955s1.323-2.956,2.956-2.956 c1.632,0,2.956,1.324,2.956,2.956S15.314,17.581,13.682,17.581z"/></g></svg>
\ No newline at end of file |