mirror of
https://github.com/fluencelabs/interface-types
synced 2024-12-04 15:20:20 +00:00
improve byte_array parsing
This commit is contained in:
parent
bb9e4dbdfc
commit
b65b34b0f6
@ -325,6 +325,18 @@ impl<'a> Parse<'a> for Instruction {
|
||||
parser.parse::<keyword::string_size>()?;
|
||||
|
||||
Ok(Instruction::StringSize)
|
||||
} else if lookahead.peek::<keyword::byte_array_lift_memory>() {
|
||||
parser.parse::<keyword::byte_array_lift_memory>()?;
|
||||
|
||||
Ok(Instruction::ByteArrayLiftMemory)
|
||||
} else if lookahead.peek::<keyword::byte_array_lower_memory>() {
|
||||
parser.parse::<keyword::byte_array_lower_memory>()?;
|
||||
|
||||
Ok(Instruction::ByteArrayLowerMemory)
|
||||
} else if lookahead.peek::<keyword::byte_array_size>() {
|
||||
parser.parse::<keyword::byte_array_size>()?;
|
||||
|
||||
Ok(Instruction::ByteArraySize)
|
||||
} else if lookahead.peek::<keyword::record_lift>() {
|
||||
parser.parse::<keyword::record_lift>()?;
|
||||
|
||||
|
@ -73,7 +73,7 @@ impl ToString for &InterfaceType {
|
||||
InterfaceType::F32 => "f32".to_string(),
|
||||
InterfaceType::F64 => "f64".to_string(),
|
||||
InterfaceType::String => "string".to_string(),
|
||||
InterfaceType::ByteArray => "byteArray".to_string(),
|
||||
InterfaceType::ByteArray => "byte_array".to_string(),
|
||||
InterfaceType::Anyref => "anyref".to_string(),
|
||||
InterfaceType::I32 => "i32".to_string(),
|
||||
InterfaceType::I64 => "i64".to_string(),
|
||||
|
Loading…
Reference in New Issue
Block a user