mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 16:44:33 +00:00
wasm_interp: pass arguments from CLI
This commit is contained in:
parent
fa1e0a8614
commit
a09fd95fd7
6 changed files with 92 additions and 36 deletions
|
@ -659,6 +659,17 @@ impl From<u8> for ValueType {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<Value> for ValueType {
|
||||
fn from(x: Value) -> Self {
|
||||
match x {
|
||||
Value::I32(_) => Self::I32,
|
||||
Value::I64(_) => Self::I64,
|
||||
Value::F32(_) => Self::F32,
|
||||
Value::F64(_) => Self::F64,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Parse<()> for ValueType {
|
||||
fn parse(_: (), bytes: &[u8], cursor: &mut usize) -> Result<Self, ParseError> {
|
||||
let byte = u8::parse((), bytes, cursor)?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue