Merge pull request #36 from axodotdev/console

feat(deps): ansi-term -> console
This commit is contained in:
ashley williams 2023-03-29 15:19:04 -05:00 committed by GitHub
commit 2b6b7cff64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -17,9 +17,9 @@ proc-macro = true
[dependencies]
lalrpop-util = "0.19"
ansi_term = "0.12.1"
proc-macro2 = "1.0.54"
quote = "1.0.26"
console = "0.15.5"
[build-dependencies]
lalrpop = "0.19.9"

View File

@ -1,5 +1,5 @@
use crate::lexer::Token;
use ansi_term::Style;
use console::style;
use lalrpop_util::ParseError::*;
use proc_macro2::{Ident, TokenStream};
use quote::{quote, quote_spanned};
@ -71,7 +71,7 @@ pub fn parse_error(input: &[Token], error: &ParseError) -> TokenStream {
// special case: you probably meant to quote that text
let help_msg = format!(
"text nodes need to be quoted, eg. {}",
Style::new().bold().paint("<p>\"Hello Joe!\"</p>")
style("<p>\"Hello Joe!\"</p>").bold(),
);
Some(quote_spanned! {span=>
compile_error! { #help_msg }