Class: Antlr4Native::ContextMethodArg
- Inherits:
-
Object
- Object
- Antlr4Native::ContextMethodArg
- Defined in:
- lib/antlr4-native/context_method_arg.rb
Instance Attribute Summary collapse
-
#raw_arg ⇒ Object
readonly
Returns the value of attribute raw_arg.
Instance Method Summary collapse
-
#initialize(raw_arg) ⇒ ContextMethodArg
constructor
A new instance of ContextMethodArg.
- #name ⇒ Object
- #pointer? ⇒ Boolean
- #type ⇒ Object
Constructor Details
#initialize(raw_arg) ⇒ ContextMethodArg
Returns a new instance of ContextMethodArg.
5 6 7 |
# File 'lib/antlr4-native/context_method_arg.rb', line 5 def initialize(raw_arg) @raw_arg = raw_arg end |
Instance Attribute Details
#raw_arg ⇒ Object (readonly)
Returns the value of attribute raw_arg.
3 4 5 |
# File 'lib/antlr4-native/context_method_arg.rb', line 3 def raw_arg @raw_arg end |
Instance Method Details
#name ⇒ Object
9 10 11 |
# File 'lib/antlr4-native/context_method_arg.rb', line 9 def name @name ||= parts[1] end |
#pointer? ⇒ Boolean
17 18 19 |
# File 'lib/antlr4-native/context_method_arg.rb', line 17 def pointer? type.end_with?('*') end |
#type ⇒ Object
13 14 15 |
# File 'lib/antlr4-native/context_method_arg.rb', line 13 def type @type ||= parts[0].gsub(' ', '') end |