Class: Frepl::DerivedType
Instance Attribute Summary
#lines
Instance Method Summary
collapse
#complete?, #incomplete?, #initialize, #output
Methods inherited from Statement
#incomplete?, #output
Instance Method Details
#==(other) ⇒ Object
15
16
17
18
19
20
21
|
# File 'lib/frepl/statements/derived_type.rb', line 15
def ==(other)
if other.is_a?(DerivedType)
self.name == other.name
else
super(other)
end
end
|
#accept(visitor) ⇒ Object
7
8
9
|
# File 'lib/frepl/statements/derived_type.rb', line 7
def accept(visitor)
visitor.visit_derived_type(self)
end
|
#name ⇒ Object
11
12
13
|
# File 'lib/frepl/statements/derived_type.rb', line 11
def name
@name ||= lines.first.match(Frepl::Classifier::DERIVED_TYPE_REGEX)[1]
end
|
#terminal_regex ⇒ Object
3
4
5
|
# File 'lib/frepl/statements/derived_type.rb', line 3
def terminal_regex
/end type\s*#{Frepl::Classifier::VARIABLE_NAME_REGEX}/i
end
|