Class: HDL::Parser
- Inherits:
-
Object
- Object
- HDL::Parser
- Defined in:
- lib/hdl/parser.rb
Defined Under Namespace
Classes: Validator
Class Method Summary collapse
Class Method Details
.parse(definition) ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/hdl/parser.rb', line 2 def self.parse(definition) parser = HDLParser.new ast = parser.parse(definition) if ast.nil? raise ParseError, parser.failure_reason end structured_data = ast.structured Validator.validate!(structured_data) structured_data end |