Skip to content

Commit 0a99177

Browse files
committed
Move unescape to it's own crate
1 parent 9ef750b commit 0a99177

File tree

7 files changed

+16
-3
lines changed

7 files changed

+16
-3
lines changed

Cargo.lock

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[workspace]
22
resolver = "3"
3-
members = [ "zenlang" , "zenlang-cli"]
3+
members = [ "unescape", "zenlang" , "zenlang-cli"]

unescape/Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[package]
2+
name = "unescape"
3+
version = "0.1.0"
4+
edition = "2024"
5+
6+
[dependencies]
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
//! unescape
22
//!
33
//! Port of unescape-rs to no_std
4+
#![no_std]
5+
extern crate alloc;
46
use alloc::collections::VecDeque;
57
use alloc::string::*;
68

zenlang/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ edition = "2024"
77
libm = "0.2.15"
88
serde = { version = "1.0.225", default-features = false, features = ["derive", "alloc"] }
99
bincode = { version = "2.0", default-features = false, features = ["alloc", "serde", "derive"] }
10+
unescape = { path = "../unescape" }
1011

1112
[features]
1213
default = ["std"]

zenlang/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ pub mod scope;
1818
pub mod stdlib;
1919
pub mod strong_u64;
2020
pub mod tokenizer;
21-
pub mod unescape;
2221
pub mod value;
2322
pub mod vm;
2423

zenlang/src/tokenizer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
//!
55
//! ### Example
66
//! `fn main {}` -> `Fn, Identifier(main), Lbrace, Rbrace`
7-
use crate::unescape;
87
use alloc::string::*;
98
use libm::pow;
9+
use unescape;
1010

1111
#[derive(Debug, Clone)]
1212
pub enum Token {

0 commit comments

Comments
 (0)