Fix module docs
This commit is contained in:
parent
9710d17e00
commit
a907fec967
@ -1,5 +1,6 @@
|
|||||||
/// This module contains simply [`Builder`] and it's related utility Values.
|
//! This module contains simply [`Builder`] and it's related utility Values.
|
||||||
/// Builder is the actual struct being modified when building the LLIR.
|
//! Builder is the actual struct being modified when building the LLIR.
|
||||||
|
|
||||||
use std::{cell::RefCell, rc::Rc};
|
use std::{cell::RefCell, rc::Rc};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/// This module contains all of the relevant code that is needed to compile the
|
//! This module contains all of the relevant code that is needed to compile the
|
||||||
/// LLIR ([`Context`]) into LLVM IR. This module is the only one that interfaces
|
//! LLIR ([`Context`]) into LLVM IR. This module is the only one that interfaces
|
||||||
/// with the LLVM API.
|
//! with the LLVM API.
|
||||||
|
|
||||||
use std::{collections::HashMap, ffi::CString, ptr::null_mut};
|
use std::{collections::HashMap, ffi::CString, ptr::null_mut};
|
||||||
|
|
||||||
use llvm_sys::{
|
use llvm_sys::{
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
/// Debug implementations for relevant types
|
//! Debug implementations for relevant types
|
||||||
|
|
||||||
use std::fmt::{Debug, Write};
|
use std::fmt::{Debug, Write};
|
||||||
|
|
||||||
use crate::{CmpPredicate, InstructionData, InstructionKind, TerminatorKind, builder::*};
|
use crate::{CmpPredicate, InstructionData, InstructionKind, TerminatorKind, builder::*};
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/// Reid LLVM Lib is an ergonomic Rust'y API which is used to produce a
|
//! Reid LLVM Lib is an ergonomic Rust'y API which is used to produce a
|
||||||
/// Low-Level IR (LLIR) using [`Context`] and [`Builder`]. This Builder can then
|
//! Low-Level IR (LLIR) using [`Context`] and [`Builder`]. This Builder can then
|
||||||
/// be used at the end to compile said LLIR into LLVM IR.
|
//! be used at the end to compile said LLIR into LLVM IR.
|
||||||
|
|
||||||
use std::marker::PhantomData;
|
use std::marker::PhantomData;
|
||||||
|
|
||||||
use builder::{BlockValue, Builder, FunctionValue, InstructionValue, ModuleValue};
|
use builder::{BlockValue, Builder, FunctionValue, InstructionValue, ModuleValue};
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
/// In this module are defined structs that are used for performing passes on
|
//! In this module are defined structs that are used for performing passes on
|
||||||
/// Reid. It contains a simplified version of Reid which can be e.g. typechecked.
|
//! Reid. It contains a simplified version of Reid which can be e.g.
|
||||||
|
//! typechecked.
|
||||||
|
|
||||||
use crate::token_stream::TokenRange;
|
use crate::token_stream::TokenRange;
|
||||||
|
|
||||||
mod display;
|
mod display;
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
/// This module contains relevant code for [`Pass`] and shared code between
|
//! This module contains relevant code for [`Pass`] and shared code between
|
||||||
/// passes. Passes can be performed on Reid MIR to e.g. typecheck the code.
|
//! passes. Passes can be performed on Reid MIR to e.g. typecheck the code.
|
||||||
|
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::error::Error as STDError;
|
use std::error::Error as STDError;
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/// This module contains code relevant to doing a type checking pass on the MIR.
|
//! This module contains code relevant to doing a type checking pass on the MIR.
|
||||||
/// During typechecking relevant types are also coerced if possible.
|
//! During typechecking relevant types are also coerced if possible.
|
||||||
use std::{convert::Infallible, iter};
|
use std::{convert::Infallible, iter};
|
||||||
|
|
||||||
use crate::{mir::*, util::try_all};
|
use crate::{mir::*, util::try_all};
|
||||||
|
@ -1,25 +1,26 @@
|
|||||||
/// Copied from
|
//! Copied from
|
||||||
/// https://github.com/rust-lang/rust/blob/6b3ae3f6e45a33c2d95fa0362c9b2593e567fd34/library/core/src/fmt/builders.rs#L102
|
//! https://github.com/rust-lang/rust/blob/6b3ae3f6e45a33c2d95fa0362c9b2593e567fd34/library/core/src/fmt/builders.rs#L102
|
||||||
///
|
|
||||||
/// Copyright (c) The Rust Project Contributors
|
// Copyright (c) The Rust Project Contributors
|
||||||
///
|
//
|
||||||
/// Permission is hereby granted, free of charge, to any person obtaining a copy
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
/// of this software and associated documentation files (the "Software"), to
|
// of this software and associated documentation files (the "Software"), to deal
|
||||||
/// deal in the Software without restriction, including without limitation the
|
// in the Software without restriction, including without limitation the rights
|
||||||
/// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
/// sell copies of the Software, and to permit persons to whom the Software is
|
// copies of the Software, and to permit persons to whom the Software is
|
||||||
/// furnished to do so, subject to the following conditions:
|
// furnished to do so, subject to the following conditions:
|
||||||
///
|
//
|
||||||
/// The above copyright notice and this permission notice shall be included in
|
// The above copyright notice and this permission notice shall be included in
|
||||||
/// all copies or substantial portions of the Software.
|
// all copies or substantial portions of the Software.
|
||||||
///
|
//
|
||||||
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
/// IN THE SOFTWARE.
|
// SOFTWARE.
|
||||||
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
|
||||||
pub struct PadAdapter<'buf, 'state> {
|
pub struct PadAdapter<'buf, 'state> {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
/// Contains relevant code for parsing tokens received from
|
//! Contains relevant code for parsing tokens received from
|
||||||
/// Lexing/Tokenizing-stage.
|
//! Lexing/Tokenizing-stage.
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
ast::parse::Parse,
|
ast::parse::Parse,
|
||||||
lexer::{FullToken, Position, Token},
|
lexer::{FullToken, Position, Token},
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/// Take a list of Results, and try to unwrap all of them. Returns a Result
|
//! Take a list of Results, and try to unwrap all of them. Returns a Result
|
||||||
/// which either contains every Result unwrapped, or every error that exists
|
//! which either contains every Result unwrapped, or every error that exists
|
||||||
/// within the array.
|
//! within the array.
|
||||||
|
|
||||||
pub fn try_all<U, E>(list: Vec<Result<U, E>>) -> Result<Vec<U>, Vec<E>> {
|
pub fn try_all<U, E>(list: Vec<Result<U, E>>) -> Result<Vec<U>, Vec<E>> {
|
||||||
let mut successes = Vec::with_capacity(list.len());
|
let mut successes = Vec::with_capacity(list.len());
|
||||||
let mut failures = Vec::with_capacity(list.len());
|
let mut failures = Vec::with_capacity(list.len());
|
||||||
|
Loading…
Reference in New Issue
Block a user