Skip to content

Commit 464cd14

Browse files
committed
Handle BlockTypeNode types
1 parent 000ed18 commit 464cd14

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

rust/ruby-rbs/build.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,15 @@ fn generate(config: &Config) -> Result<(), Box<dyn Error>> {
226226
)?;
227227
writeln!(file, " }}")?;
228228
}
229+
"rbs_types_block" => {
230+
writeln!(file, " pub fn {}(&self) -> BlockTypeNode {{", field.name)?;
231+
writeln!(
232+
file,
233+
" BlockTypeNode {{ parser: self.parser, pointer: unsafe {{ (*self.pointer).{} }} }}",
234+
field.name
235+
)?;
236+
writeln!(file, " }}")?;
237+
}
229238
_ => eprintln!("Unknown field type: {}", field.c_type),
230239
}
231240
}

0 commit comments

Comments
 (0)