Module: Qrb::Syntax::TypeRef
- Defined in:
- lib/qrb/syntax/type_ref.rb
Instance Method Summary collapse
Instance Method Details
#compile(factory) ⇒ Object
5 6 7 8 9 |
# File 'lib/qrb/syntax/type_ref.rb', line 5 def compile(factory) factory.fetch(type_name.to_s) do |n| raise Error, "Unknown type `#{n}`" end end |
#to_ast ⇒ Object
11 12 13 |
# File 'lib/qrb/syntax/type_ref.rb', line 11 def to_ast [:type_ref, type_name.to_s] end |