add net and http to static stdlib
This commit is contained in:
parent
1e68b5340c
commit
cdc05259b8
5 changed files with 8 additions and 2 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -16,7 +16,7 @@ checksum = "b03f7fbd470aa8b3ad163c85cce8bccfc11cc9c44ef12da0a4eddd98bd307352"
|
|||
|
||||
[[package]]
|
||||
name = "spl"
|
||||
version = "0.0.3"
|
||||
version = "0.0.4"
|
||||
dependencies = [
|
||||
"once_cell",
|
||||
"readformat",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "spl"
|
||||
version = "0.0.3"
|
||||
version = "0.0.4"
|
||||
edition = "2021"
|
||||
description = "Stack Pogramming Language: A simple, concise scripting language."
|
||||
license = "MIT"
|
||||
|
|
|
@ -1060,7 +1060,9 @@ pub fn find_in_splpath(path: &str) -> Result<String, String> {
|
|||
} else {
|
||||
match path {
|
||||
"std.spl" => Err(stdlib::STD.to_owned()),
|
||||
"net.spl" => Err(stdlib::NET.to_owned()),
|
||||
"iter.spl" => Err(stdlib::ITER.to_owned()),
|
||||
"http.spl" => Err(stdlib::HTTP.to_owned()),
|
||||
"stream.spl" => Err(stdlib::STREAM.to_owned()),
|
||||
_ => Ok(path.to_owned()),
|
||||
}
|
||||
|
|
|
@ -592,7 +592,9 @@ pub fn import(stack: &mut Stack) -> OError {
|
|||
.unwrap_or(s.as_str())
|
||||
{
|
||||
"std.spl" => Some(stdlib::STD),
|
||||
"net.spl" => Some(stdlib::NET),
|
||||
"iter.spl" => Some(stdlib::ITER),
|
||||
"http.spl" => Some(stdlib::HTTP),
|
||||
"stream.spl" => Some(stdlib::STREAM),
|
||||
_ => None,
|
||||
};
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
pub const STD: &str = include_str!("../std.spl");
|
||||
pub const NET: &str = include_str!("../net.spl");
|
||||
pub const ITER: &str = include_str!("../iter.spl");
|
||||
pub const HTTP: &str = include_str!("../http.spl");
|
||||
pub const STREAM: &str = include_str!("../stream.spl");
|
||||
|
|
Loading…
Reference in a new issue