Remove dependency on nightly Rust
This commit is contained in:
parent
45b8fa5c8b
commit
d4c5005d8a
@ -1,7 +1,6 @@
|
|||||||
// This example contains information adapted from the MSPGCC project's documentation.
|
// This example contains information adapted from the MSPGCC project's documentation.
|
||||||
// As such, it is licensed under the GPL, to the extent that such a thing is possible.
|
// As such, it is licensed under the GPL, to the extent that such a thing is possible.
|
||||||
// https://mspgcc.sourceforge.net/manual/ln16.html
|
// https://mspgcc.sourceforge.net/manual/ln16.html
|
||||||
#![feature(decl_macro)]
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
println!("Hello, world!")
|
println!("Hello, world!")
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
// © 2023-2024 John Breaux
|
// © 2023-2024 John Breaux
|
||||||
//See LICENSE.md for license
|
//See LICENSE.md for license
|
||||||
//! Simple frontend for the assembler
|
//! Simple frontend for the assembler
|
||||||
#![feature(decl_macro)]
|
|
||||||
use argp::parse_args_or_exit;
|
use argp::parse_args_or_exit;
|
||||||
use libmsp430::{
|
use libmsp430::{
|
||||||
assembler::Assemble,
|
assembler::Assemble,
|
||||||
@ -66,14 +65,16 @@ mod repl {
|
|||||||
use std::io::{stderr, Write};
|
use std::io::{stderr, Write};
|
||||||
|
|
||||||
/// Formats the line number
|
/// Formats the line number
|
||||||
macro linenr($n: expr) {
|
macro_rules! linenr {
|
||||||
|
($n: expr) => {
|
||||||
format_args!("{:4}: ", $n)
|
format_args!("{:4}: ", $n)
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/// [println], but without the newline
|
/// [println], but without the newline
|
||||||
macro printfl ($($x: expr),+) {
|
macro_rules! printfl {($($x: expr),+) => {
|
||||||
{print!($($x),+); let _ = ::std::io::stdout().flush();}
|
{print!($($x),+); let _ = ::std::io::stdout().flush();}
|
||||||
}
|
}}
|
||||||
|
|
||||||
/// Runs the read-evaluate-print loop
|
/// Runs the read-evaluate-print loop
|
||||||
pub fn repl(buf: &mut String) -> Result<(), Box<dyn Error>> {
|
pub fn repl(buf: &mut String) -> Result<(), Box<dyn Error>> {
|
||||||
|
Loading…
Reference in New Issue
Block a user