mirror of
https://github.com/Noratrieb/haesli.git
synced 2026-01-14 19:55:03 +01:00
fixed class and method index
This commit is contained in:
parent
217a419ef1
commit
2903ba108e
8 changed files with 1208 additions and 1226 deletions
|
|
@ -79,7 +79,7 @@ struct Field {
|
|||
}
|
||||
|
||||
fn main() {
|
||||
let content = fs::read_to_string("./amqp-0-9-1.xml").unwrap();
|
||||
let content = fs::read_to_string("./amqp-0-9-1-bsd.xml").unwrap();
|
||||
|
||||
let amqp = Amqp::from_str(&content).unwrap();
|
||||
codegen(&amqp);
|
||||
|
|
|
|||
|
|
@ -25,7 +25,9 @@ pub fn write_method<W: Write>(class: Class, mut writer: W) -> Result<(), TransEr
|
|||
println!(" {field_name},");
|
||||
}
|
||||
println!(" }}) => {{");
|
||||
println!(" writer.write_all(&[{class_index}, {method_index}])?;");
|
||||
let [ci0, ci1] = class_index.to_be_bytes();
|
||||
let [mi0, mi1] = method_index.to_be_bytes();
|
||||
println!(" writer.write_all(&[{ci0}, {ci1}, {mi0}, {mi1}])?;");
|
||||
let mut iter = method.fields.iter().peekable();
|
||||
|
||||
while let Some(field) = iter.next() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue