Skip to content

Commit

Permalink
update resast to 0.6.0-alpha.5
Browse files Browse the repository at this point in the history
  • Loading branch information
FreeMasen committed Jun 11, 2023
1 parent 2e99270 commit df9d297
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
9 changes: 4 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
[package]
name = "resw"
version = "0.7.0-alpha.1"
authors = ["Robert Masen <r@robertmasen.pizza>"]
version = "0.7.0-alpha.2"
authors = ["Robert Masen <r[email protected]>"]
edition = "2018"
description = "A library for writing RESSA AST parts to a file"
license = "MIT"
readme = "./README.md"
repository = "https://github.com/rusty-ecma/RESW"

[dependencies]
resast = "0.6.0-alpha.3"
resast = "0.6.0-alpha.5"
log = "0.4"
ress = "0.11"

[dev-dependencies]
rayon = { version = "1"}
# ressa = "0.9.0-alpha.1"
ressa = { git = "https://github.com/rusty-ecma/RESSA", branch = "feat/smaller-ast" }
ressa = "0.9.0-alpha.3"
pretty_env_logger = "0.4"
thiserror = "1"

Expand Down
10 changes: 5 additions & 5 deletions examples/insert_logging.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use resast::{prelude::*, SourceText};
use resast::prelude::*;
use ressa::Parser;
use resw::Writer;
use std::{
Expand Down Expand Up @@ -154,9 +154,9 @@ fn map_class_prop<'a>(
args.push(Expr::Lit(l.clone()))
}
Lit::Null => {
args.push(Expr::Lit(Lit::String(StringLit::Single(SourceText(
args.push(Expr::Lit(Lit::String(StringLit::Single(
::std::borrow::Cow::Owned(String::from("null")),
)))));
))));
}
_ => (),
},
Expand Down Expand Up @@ -257,9 +257,9 @@ fn extract_idents_from_pat<'a>(pat: &Pat<Cow<'a, str>>) -> Vec<Option<Expr<Cow<'

fn expr_to_string_lit<'a>(e: &Expr<Cow<'a, str>>) -> Option<Expr<Cow<'a, str>>> {
let inner = expr_to_string(e)?;
Some(Expr::Lit(Lit::String(StringLit::Single(SourceText(
Some(Expr::Lit(Lit::String(StringLit::Single(
::std::borrow::Cow::Owned(inner),
)))))
))))
}

fn expr_to_string<'a>(expr: &Expr<Cow<'a, str>>) -> Option<String> {
Expand Down

0 comments on commit df9d297

Please sign in to comment.