v0.3.0 #1

Merged
j merged 12 commits from v0.3.0 into main 2024-02-01 20:11:02 +00:00
9 changed files with 14 additions and 1 deletions
Showing only changes of commit e8fbae9837 - Show all commits

View File

@ -1,3 +1,5 @@
// © 2023-2024 John Breaux
//See LICENSE.md for license
//! Simple frontend for the assembler //! Simple frontend for the assembler
#![feature(decl_macro)] #![feature(decl_macro)]
use argp::parse_args_or_exit; use argp::parse_args_or_exit;

View File

@ -1,3 +1,5 @@
// © 2023-2024 John Breaux
//See LICENSE.md for license
//! Assembles a binary using the given [AST](crate::parser::ast) //! Assembles a binary using the given [AST](crate::parser::ast)
use error::{AResult, ErrorKind::*}; use error::{AResult, ErrorKind::*};

View File

@ -1,4 +1,5 @@
// © 2023-2024 John Breaux // © 2023-2024 John Breaux
//See LICENSE.md for license
//! The [Lexer] turns a [sequence of characters](str) into a stream of //! The [Lexer] turns a [sequence of characters](str) into a stream of
//! [lexically-tagged tokens](token) //! [lexically-tagged tokens](token)

View File

@ -1,4 +1,5 @@
// © 2023-2024 John Breaux // © 2023-2024 John Breaux
//See LICENSE.md for license
//! A [Token] is a [semantically-tagged](TokenKind) [sequence of characters](str) and a [Span] //! A [Token] is a [semantically-tagged](TokenKind) [sequence of characters](str) and a [Span]
//! //!
//! [Tokens](Token) are a borrowed, and cannot outlive their source slice (lifetime `'t`) //! [Tokens](Token) are a borrowed, and cannot outlive their source slice (lifetime `'t`)

View File

@ -1,4 +1,5 @@
// © 2023 John Breaux // © 2023-2024 John Breaux
//See LICENSE.md for license
//! A bare-bones toy assembler for the TI MSP430, for use in MicroCorruption //! A bare-bones toy assembler for the TI MSP430, for use in MicroCorruption
//! //!
//! This project aims to assemble any valid msp430 instructions, while including important quality //! This project aims to assemble any valid msp430 instructions, while including important quality

View File

@ -1,4 +1,5 @@
// © 2023-2024 John Breaux // © 2023-2024 John Breaux
//See LICENSE.md for license
//! Parses [`Tokens`](crate::lexer::token::Token) into an [abstract syntax tree](ast) //! Parses [`Tokens`](crate::lexer::token::Token) into an [abstract syntax tree](ast)
pub mod ast; pub mod ast;

View File

@ -1,4 +1,5 @@
// © 2023-2024 John Breaux // © 2023-2024 John Breaux
//See LICENSE.md for license
/// Represents MSP430 instructions, /// Represents MSP430 instructions,
use crate::{ use crate::{
lexer::token::{self, Reg, Token}, lexer::token::{self, Reg, Token},

View File

@ -1,4 +1,6 @@
// © 2023-2024 John Breaux // © 2023-2024 John Breaux
//See LICENSE.md for license
//! Preprocesses a token stream by removing and replacing tokens according to `.define` directives
use crate::{ use crate::{
lexer::{ lexer::{

View File

@ -1,3 +1,5 @@
// © 2023-2024 John Breaux
//See LICENSE.md for license
//! A [Span] is a [Range] that does not implement [Iterator]. It is a [Copy] type. //! A [Span] is a [Range] that does not implement [Iterator]. It is a [Copy] type.
use std::{ use std::{
fmt::{Debug, Display}, fmt::{Debug, Display},