docs: Don't link to private components

This commit is contained in:
John 2023-08-23 02:25:43 -05:00
parent 8ba781bf69
commit 53f1f765f1
5 changed files with 12 additions and 14 deletions

View File

@ -30,32 +30,32 @@ pub enum Error {
got: OwnedToken, got: OwnedToken,
}, },
/// Produced by /// Produced by
/// [Number](parser::instruction::encoding::number::Number)[::parse()](parser::parsable::Parsable::parse()) /// [Number](parser::preamble::Number)[::parse()](parser::parsable::Parsable::parse())
/// when the parsed number contains digits too high for the specified radix /// when the parsed number contains digits too high for the specified radix
UnexpectedDigits(String, u32), UnexpectedDigits(String, u32),
/// Produced by /// Produced by
/// [Opcode](parser::instruction::opcode::Opcode)[::parse()](parser::parsable::Parsable::parse()) /// [Opcode](parser::preamble::Opcode)[::parse()](parser::parsable::Parsable::parse())
/// when the opcode passed lexing but did not match recognized opcodes. /// when the opcode passed lexing but did not match recognized opcodes.
/// ///
/// This should be interpreted as a failure in lexing. /// This should be interpreted as a failure in lexing.
UnrecognizedOpcode(String), UnrecognizedOpcode(String),
/// Produced by [Register](parser::instruction::encoding::register::Register) /// Produced by [Register](parser::preamble::Register)
/// when attempting to convert from a [str] that isn't a register (pc, sp, sr, cg, or r{number}) /// when attempting to convert from a [str] that isn't a register (pc, sp, sr, cg, or r{number})
NotARegister(String), NotARegister(String),
/// Produced by [Register](parser::instruction::encoding::register) /// Produced by [Register](parser::preamble::Register)
/// when attempting to convert from a [u16] that isn't in the range 0-15 /// when attempting to convert from a [u16] that isn't in the range 0-15
RegisterTooHigh(u16), RegisterTooHigh(u16),
/// Produced by /// Produced by
/// [SecondaryOperand](parser::instruction::encoding::secondary_operand) /// [SecondaryOperand](parser::preamble::SecondaryOperand)
/// when the joke "secondary immediate" form is out of range 0..=1 /// when the joke "secondary immediate" form is out of range 0..=1
FatSecondaryImmediate(isize), FatSecondaryImmediate(isize),
/// Produced by [Number](parser::instruction::encoding::number) when the number is too /// Produced by [Number](parser::preamble::Number) when the number is too
/// wide to fit in 16 bits (outside the range `(-2^15) .. (2^16-1)` ) /// wide to fit in 16 bits (outside the range `(-2^15) .. (2^16-1)` )
NumberTooWide(isize), NumberTooWide(isize),
/// Produced by [JumpTarget](parser::instruction::encoding::jump_target) /// Produced by [JumpTarget](parser::preamble::JumpTarget)
/// when the jump offset is outside the range (-0x3ff..0x3fc) /// when the jump offset is outside the range (-0x3ff..0x3fc)
JumpedTooFar(isize), JumpedTooFar(isize),
/// Produced by [JumpTarget](parser::instruction::encoding::jump_target) /// Produced by [JumpTarget](parser::preamble::JumpTarget)
JumpedOdd(isize), JumpedOdd(isize),
EndOfFile, EndOfFile,
} }

View File

@ -14,7 +14,7 @@ use super::*;
pub mod encoding; pub mod encoding;
pub mod opcode; pub mod opcode;
/// Represents an entire MSP430 instruction /// Contains the [Opcode] and [Encoding] information for a single msp430 instruction
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] #[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct Instruction(Opcode, Encoding); pub struct Instruction(Opcode, Encoding);

View File

@ -4,7 +4,7 @@
use super::*; use super::*;
/// Contains the [pc-relative offset](Number) or [label](Identifier) /// Contains the [pc-relative offset](Number) or [label](Identifier)
/// for a [Jump](Encoding::Jump) [instruction] /// for a [Jump](Encoding::Jump) [Instruction]
// TODO: Allow identifiers in JumpTarget // TODO: Allow identifiers in JumpTarget
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] #[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct JumpTarget(Number); pub struct JumpTarget(Number);

View File

@ -1,10 +1,10 @@
// © 2023 John Breaux // © 2023 John Breaux
//! A [PrimaryOperand] contains the first [Register], addressing mode, and Extension //! A [PrimaryOperand] contains the first [Register], addressing mode, and Extension
//! Word for a [one-operand](Encoding::Single) or [two-operand](Encoding::Double) [instruction] //! Word for a [one-operand](Encoding::Single) or [two-operand](Encoding::Double) [Instruction]
use super::*; use super::*;
/// Contains the first [Register], addressing mode, and Extension Word for a /// Contains the first [Register], addressing mode, and Extension Word for a
/// [one-operand](Encoding::Single) or [two-operand](Encoding::Double) [instruction] /// [one-operand](Encoding::Single) or [two-operand](Encoding::Double) [Instruction]
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] #[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum PrimaryOperand { pub enum PrimaryOperand {
Direct(Register), Direct(Register),

View File

@ -1,6 +1,4 @@
// © 2023 John Breaux // © 2023 John Breaux
//! Defines the [Token]
//!
//! A [Token] is a [semantically tagged](Type) sequence of characters //! A [Token] is a [semantically tagged](Type) sequence of characters
use crate::Error; use crate::Error;