Skip to content

Commit f77e096

Browse files
committed
Handle BlockTypeNode types
1 parent 3b44f4a commit f77e096

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
@@ -227,6 +227,15 @@ fn generate(config: &Config) -> Result<(), Box<dyn Error>> {
227227
)?;
228228
writeln!(file, " }}")?;
229229
}
230+
"rbs_types_block" => {
231+
writeln!(file, " pub fn {}(&self) -> BlockTypeNode {{", field.name)?;
232+
writeln!(
233+
file,
234+
" BlockTypeNode {{ parser: self.parser, pointer: unsafe {{ (*self.pointer).{} }} }}",
235+
field.name
236+
)?;
237+
writeln!(file, " }}")?;
238+
}
230239
_ => eprintln!("Unknown field type: {}", field.c_type),
231240
}
232241
}

0 commit comments

Comments
 (0)