Class: ApiDiff::SwiftInterfaceParser
- Defined in:
- lib/api_diff/swift_interface_parser.rb
Instance Attribute Summary
Attributes inherited from Parser
Instance Method Summary collapse
Methods inherited from Parser
Constructor Details
This class inherits a constructor from ApiDiff::Parser
Instance Method Details
#parse(content) ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/api_diff/swift_interface_parser.rb', line 3 def parse(content) Interface.type_name = "protocol" unless @options[:normalize] module_name_match = content.match(/@_exported import (\w+)/) container_types = module_name_match ? module_name_match[1] : [] parse_blocks(content, container_types) parse_one_line_extensions(content) end |