mirror of
https://github.com/exoticorn/curlywas.git
synced 2026-01-20 11:46:43 +01:00
update dependencies
This commit is contained in:
12
Cargo.lock
generated
12
Cargo.lock
generated
@@ -34,9 +34,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
||||
|
||||
[[package]]
|
||||
name = "chumsky"
|
||||
version = "0.5.0"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c2d3efff85e8572b1c3fa0127706af58c4fff8458f8d9436d54b1e97573c7a3f"
|
||||
checksum = "8d02796e4586c6c41aeb68eae9bfb4558a522c35f1430c14b40136c3706e09e4"
|
||||
dependencies = [
|
||||
"ahash",
|
||||
]
|
||||
@@ -139,18 +139,18 @@ checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6"
|
||||
|
||||
[[package]]
|
||||
name = "wasm-encoder"
|
||||
version = "0.8.0"
|
||||
version = "0.10.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "db0c351632e46cc06a58a696a6c11e4cf90cad4b9f8f07a0b59128d616c29bb0"
|
||||
checksum = "aa9d9bf45fc46f71c407837c9b30b1e874197f2dc357588430b21e5017d290ab"
|
||||
dependencies = [
|
||||
"leb128",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasmparser"
|
||||
version = "0.81.0"
|
||||
version = "0.83.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "98930446519f63d00a836efdc22f67766ceae8dbcc1571379f2bcabc6b2b9abc"
|
||||
checksum = "718ed7c55c2add6548cca3ddd6383d738cd73b892df400e96b9aa876f0141d7a"
|
||||
|
||||
[[package]]
|
||||
name = "yansi"
|
||||
|
||||
@@ -7,9 +7,9 @@ license = "MIT"
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
wasmparser = "0.81"
|
||||
wasm-encoder = "0.8"
|
||||
wasmparser = "0.83"
|
||||
wasm-encoder = "0.10"
|
||||
anyhow = "1"
|
||||
chumsky = "0.5"
|
||||
chumsky = "0.8"
|
||||
ariadne = "0.1"
|
||||
pico-args = "0.4"
|
||||
|
||||
@@ -464,7 +464,7 @@ fn emit_expression<'a>(ctx: &mut FunctionContext<'a>, expr: &'a ast::Expression)
|
||||
(I32, Or) => Instruction::I32Or,
|
||||
(I32, Xor) => Instruction::I32Xor,
|
||||
(I32, Eq) => Instruction::I32Eq,
|
||||
(I32, Ne) => Instruction::I32Neq,
|
||||
(I32, Ne) => Instruction::I32Ne,
|
||||
(I32, Lt) => Instruction::I32LtS,
|
||||
(I32, LtU) => Instruction::I32LtU,
|
||||
(I32, Le) => Instruction::I32LeS,
|
||||
@@ -488,7 +488,7 @@ fn emit_expression<'a>(ctx: &mut FunctionContext<'a>, expr: &'a ast::Expression)
|
||||
(I64, Or) => Instruction::I64Or,
|
||||
(I64, Xor) => Instruction::I64Xor,
|
||||
(I64, Eq) => Instruction::I64Eq,
|
||||
(I64, Ne) => Instruction::I64Neq,
|
||||
(I64, Ne) => Instruction::I64Ne,
|
||||
(I64, Lt) => Instruction::I64LtS,
|
||||
(I64, LtU) => Instruction::I64LtU,
|
||||
(I64, Le) => Instruction::I64LeS,
|
||||
@@ -510,7 +510,7 @@ fn emit_expression<'a>(ctx: &mut FunctionContext<'a>, expr: &'a ast::Expression)
|
||||
DivU | Rem | RemU | And | Or | Xor | Shl | ShrU | ShrS | LtU | LeU | GtU | GeU,
|
||||
) => unreachable!(),
|
||||
(F32, Eq) => Instruction::F32Eq,
|
||||
(F32, Ne) => Instruction::F32Neq,
|
||||
(F32, Ne) => Instruction::F32Ne,
|
||||
(F32, Lt) => Instruction::F32Lt,
|
||||
(F32, Le) => Instruction::F32Le,
|
||||
(F32, Gt) => Instruction::F32Gt,
|
||||
@@ -525,7 +525,7 @@ fn emit_expression<'a>(ctx: &mut FunctionContext<'a>, expr: &'a ast::Expression)
|
||||
DivU | Rem | RemU | And | Or | Xor | Shl | ShrU | ShrS | LtU | LeU | GtU | GeU,
|
||||
) => unreachable!(),
|
||||
(F64, Eq) => Instruction::F64Eq,
|
||||
(F64, Ne) => Instruction::F64Neq,
|
||||
(F64, Ne) => Instruction::F64Ne,
|
||||
(F64, Lt) => Instruction::F64Lt,
|
||||
(F64, Le) => Instruction::F64Le,
|
||||
(F64, Gt) => Instruction::F64Gt,
|
||||
|
||||
@@ -138,7 +138,7 @@ fn report_errors(errors: Vec<Simple<String>>, source: &str) {
|
||||
} else {
|
||||
error
|
||||
.expected()
|
||||
.map(|x| x.to_string())
|
||||
.map(|x| x.as_deref().unwrap_or("EOF"))
|
||||
.collect::<Vec<_>>()
|
||||
.join(", ")
|
||||
}
|
||||
@@ -168,7 +168,7 @@ fn report_errors(errors: Vec<Simple<String>>, source: &str) {
|
||||
fn lexer() -> impl Parser<char, Vec<(Token, Span)>, Error = Simple<char>> {
|
||||
let float64 = text::int(10)
|
||||
.chain::<char, _, _>(just('.').chain(text::digits(10)))
|
||||
.then_ignore(seq::<_, _, Simple<char>>("f64".chars()))
|
||||
.then_ignore(just("f64"))
|
||||
.collect::<String>()
|
||||
.map(Token::Float64);
|
||||
|
||||
@@ -177,7 +177,7 @@ fn lexer() -> impl Parser<char, Vec<(Token, Span)>, Error = Simple<char>> {
|
||||
.collect::<String>()
|
||||
.map(Token::Float);
|
||||
|
||||
let integer = seq::<_, _, Simple<char>>("0x".chars())
|
||||
let integer = just::<_, _, Simple<char>>("0x")
|
||||
.ignore_then(text::int(16))
|
||||
.try_map(|n, span| {
|
||||
u64::from_str_radix(&n, 16).map_err(|err| Simple::custom(span, err.to_string()))
|
||||
@@ -190,7 +190,7 @@ fn lexer() -> impl Parser<char, Vec<(Token, Span)>, Error = Simple<char>> {
|
||||
|
||||
let int64 = integer
|
||||
.clone()
|
||||
.then_ignore(seq::<_, _, Simple<char>>("i64".chars()))
|
||||
.then_ignore(just("i64"))
|
||||
.map(|n| Token::Int64(n as i64));
|
||||
|
||||
let int = integer.try_map(|n, span| {
|
||||
@@ -205,14 +205,14 @@ fn lexer() -> impl Parser<char, Vec<(Token, Span)>, Error = Simple<char>> {
|
||||
.collect::<String>()
|
||||
.map(Token::Str);
|
||||
|
||||
let op = one_of("+-*/%&^|<=>#".chars())
|
||||
let op = one_of("+-*/%&^|<=>#")
|
||||
.repeated()
|
||||
.at_least(1)
|
||||
.or(just(':').chain(just('=')))
|
||||
.collect::<String>()
|
||||
.map(Token::Op);
|
||||
|
||||
let ctrl = one_of("(){};,:?!$".chars()).map(Token::Ctrl);
|
||||
let ctrl = one_of("(){};,:?!$").map(Token::Ctrl);
|
||||
|
||||
fn ident() -> impl Parser<char, String, Error = Simple<char>> + Copy + Clone {
|
||||
filter(|c: &char| c.is_ascii_alphabetic() || *c == '_')
|
||||
@@ -242,11 +242,9 @@ fn lexer() -> impl Parser<char, Vec<(Token, Span)>, Error = Simple<char>> {
|
||||
_ => Token::Ident(ident),
|
||||
});
|
||||
|
||||
let single_line =
|
||||
seq::<_, _, Simple<char>>("//".chars()).then_ignore(take_until(text::newline()));
|
||||
let single_line = just("//").then_ignore(take_until(text::newline()));
|
||||
|
||||
let multi_line =
|
||||
seq::<_, _, Simple<char>>("/*".chars()).then_ignore(take_until(seq("*/".chars())));
|
||||
let multi_line = just("/*").then_ignore(take_until(just("*/")));
|
||||
|
||||
let comment = single_line.or(multi_line);
|
||||
|
||||
@@ -412,7 +410,7 @@ fn script_parser() -> impl Parser<Token, ast::Script, Error = Simple<Token>> + C
|
||||
.then(expression.clone())
|
||||
.then_ignore(just(Token::Ctrl(',')))
|
||||
.then(expression.clone())
|
||||
.delimited_by(Token::Ctrl('('), Token::Ctrl(')')),
|
||||
.delimited_by(just(Token::Ctrl('(')), just(Token::Ctrl(')'))),
|
||||
)
|
||||
.map(|((condition, if_true), if_false)| ast::Expr::Select {
|
||||
condition: Box::new(condition),
|
||||
@@ -426,7 +424,7 @@ fn script_parser() -> impl Parser<Token, ast::Script, Error = Simple<Token>> + C
|
||||
expression
|
||||
.clone()
|
||||
.separated_by(just(Token::Ctrl(',')))
|
||||
.delimited_by(Token::Ctrl('('), Token::Ctrl(')')),
|
||||
.delimited_by(just(Token::Ctrl('(')), just(Token::Ctrl(')'))),
|
||||
)
|
||||
.map(|(name, params)| ast::Expr::FuncCall { name, params })
|
||||
.boxed();
|
||||
@@ -451,7 +449,7 @@ fn script_parser() -> impl Parser<Token, ast::Script, Error = Simple<Token>> + C
|
||||
.map_with_span(|expr, span| expr.with_span(span))
|
||||
.or(expression
|
||||
.clone()
|
||||
.delimited_by(Token::Ctrl('('), Token::Ctrl(')')))
|
||||
.delimited_by(just(Token::Ctrl('(')), just(Token::Ctrl(')'))))
|
||||
.or(block)
|
||||
.recover_with(nested_delimiters(
|
||||
Token::Ctrl('('),
|
||||
@@ -720,7 +718,7 @@ fn script_parser() -> impl Parser<Token, ast::Script, Error = Simple<Token>> + C
|
||||
}
|
||||
.with_span(span)
|
||||
})
|
||||
.delimited_by(Token::Ctrl('{'), Token::Ctrl('}'))
|
||||
.delimited_by(just(Token::Ctrl('{')), just(Token::Ctrl('}')))
|
||||
.boxed()
|
||||
});
|
||||
|
||||
@@ -731,7 +729,7 @@ fn script_parser() -> impl Parser<Token, ast::Script, Error = Simple<Token>> + C
|
||||
.ignore_then(
|
||||
integer
|
||||
.clone()
|
||||
.delimited_by(Token::Ctrl('('), Token::Ctrl(')')),
|
||||
.delimited_by(just(Token::Ctrl('(')), just(Token::Ctrl(')'))),
|
||||
)
|
||||
.map(|min_size| ast::ImportType::Memory(min_size as u32))
|
||||
.boxed();
|
||||
@@ -753,7 +751,7 @@ fn script_parser() -> impl Parser<Token, ast::Script, Error = Simple<Token>> + C
|
||||
.then(
|
||||
type_parser()
|
||||
.separated_by(just(Token::Ctrl(',')))
|
||||
.delimited_by(Token::Ctrl('('), Token::Ctrl(')')),
|
||||
.delimited_by(just(Token::Ctrl('(')), just(Token::Ctrl(')'))),
|
||||
)
|
||||
.then(
|
||||
just(Token::Op("->".to_string()))
|
||||
@@ -793,7 +791,7 @@ fn script_parser() -> impl Parser<Token, ast::Script, Error = Simple<Token>> + C
|
||||
.then(
|
||||
parameter
|
||||
.separated_by(just(Token::Ctrl(',')))
|
||||
.delimited_by(Token::Ctrl('('), Token::Ctrl(')')),
|
||||
.delimited_by(just(Token::Ctrl('(')), just(Token::Ctrl(')'))),
|
||||
)
|
||||
.then(
|
||||
just(Token::Op("->".to_string()))
|
||||
@@ -843,7 +841,7 @@ fn script_parser() -> impl Parser<Token, ast::Script, Error = Simple<Token>> + C
|
||||
expression
|
||||
.clone()
|
||||
.separated_by(just(Token::Ctrl(',')))
|
||||
.delimited_by(Token::Ctrl('('), Token::Ctrl(')')),
|
||||
.delimited_by(just(Token::Ctrl('(')), just(Token::Ctrl(')'))),
|
||||
)
|
||||
.map(|(type_, values)| ast::DataValues::Array { type_, values });
|
||||
|
||||
@@ -853,7 +851,7 @@ fn script_parser() -> impl Parser<Token, ast::Script, Error = Simple<Token>> + C
|
||||
.ignore_then(
|
||||
string
|
||||
.clone()
|
||||
.delimited_by(Token::Ctrl('('), Token::Ctrl(')')),
|
||||
.delimited_by(just(Token::Ctrl('(')), just(Token::Ctrl(')'))),
|
||||
)
|
||||
.map(|s| ast::DataValues::File {
|
||||
path: s.into(),
|
||||
@@ -867,7 +865,7 @@ fn script_parser() -> impl Parser<Token, ast::Script, Error = Simple<Token>> + C
|
||||
.or(data_string)
|
||||
.or(data_file)
|
||||
.repeated()
|
||||
.delimited_by(Token::Ctrl('{'), Token::Ctrl('}')),
|
||||
.delimited_by(just(Token::Ctrl('{')), just(Token::Ctrl('}'))),
|
||||
)
|
||||
.map(|(offset, data)| {
|
||||
ast::TopLevelItem::Data(ast::Data {
|
||||
@@ -908,10 +906,10 @@ fn type_parser() -> impl Parser<Token, ast::Type, Error = Simple<Token>> + Clone
|
||||
_ => Err(Simple::expected_input_found(
|
||||
span,
|
||||
vec![
|
||||
Token::Ident("i32".into()),
|
||||
Token::Ident("i64".into()),
|
||||
Token::Ident("f32".into()),
|
||||
Token::Ident("f64".into()),
|
||||
Some(Token::Ident("i32".into())),
|
||||
Some(Token::Ident("i64".into())),
|
||||
Some(Token::Ident("f32".into())),
|
||||
Some(Token::Ident("f64".into())),
|
||||
],
|
||||
Some(tok),
|
||||
)),
|
||||
|
||||
Reference in New Issue
Block a user