class
Bindgen::Parser::Document
- Bindgen::Parser::Document
- Reference
- Object
Overview
Document as returned by the clang tool.
Included Modules
- JSON::Serializable
Defined in:
bindgen/parser/document.crConstant Summary
-
FORMAT_VERSION =
12 -
Version of the format this bindgen understands. Has to match
BG_FORMAT_VERSIONof the clang tool.
Constructors
- .new(pull : JSON::PullParser)
-
.new(enums : Hash(String, Bindgen::Parser::Enum) = Enum::Collection.new, classes : Hash(String, Bindgen::Parser::Class) = Class::Collection.new, macros : Array(Bindgen::Parser::Macro) = Macro::Collection.new, functions : Array(Bindgen::Parser::Method) = Method::Collection.new, format_version : Int32 = FORMAT_VERSION)
For testing purposes.
-
.parse(json : String) : self
Parses the output of the clang tool.
Class Method Summary
-
.check_format_version!(version) : Nil
Raises if version isn't the one this bindgen understands.
Instance Method Summary
- #classes : Class::Collection
- #enums : Enum::Collection
-
#format_version : Int32
Version of the format the document was written in.
- #functions : Method::Collection
- #macros : Macro::Collection
Constructor Detail
def self.new(enums : Hash(String, Bindgen::Parser::Enum) = Enum::Collection.new, classes : Hash(String, Bindgen::Parser::Class) = Class::Collection.new, macros : Array(Bindgen::Parser::Macro) = Macro::Collection.new, functions : Array(Bindgen::Parser::Method) = Method::Collection.new, format_version : Int32 = FORMAT_VERSION)
#
For testing purposes.
def self.parse(json : String) : self
#
Parses the output of the clang tool. Raises if it was written in another format version: Its fields may not match, so this is checked before parsing the rest.
Class Method Detail
def self.check_format_version!(version) : Nil
#
Raises if version isn't the one this bindgen understands.