Class: LibRubyParser::Nodes::UnlessGuard
- Inherits:
-
LibRubyParser::Node
- Object
- LibRubyParser::Node
- LibRubyParser::Nodes::UnlessGuard
- Defined in:
- lib/lib-ruby-parser/nodes.rb
Overview
Represents an unless guard used in pattern matching (i.e. ‘in pattern unless guard`)
Instance Attribute Summary collapse
-
#cond ⇒ Node
readonly
Condition of the guard, ‘Lvar(“foo”)` in `in pattern unless guard`.
-
#expression_l ⇒ Loc
readonly
Location of the full expression.
-
#keyword_l ⇒ Loc
readonly
Location of the
unlesskeyword.
Instance Attribute Details
#cond ⇒ Node (readonly)
Condition of the guard, ‘Lvar(“foo”)` in `in pattern unless guard`
4050 4051 4052 |
# File 'lib/lib-ruby-parser/nodes.rb', line 4050 def cond @cond end |
#expression_l ⇒ Loc (readonly)
Location of the full expression
“‘text case foo; in pattern unless cond; end
~~~~~~~~~~~
“‘
4068 4069 4070 |
# File 'lib/lib-ruby-parser/nodes.rb', line 4068 def expression_l @expression_l end |
#keyword_l ⇒ Loc (readonly)
Location of the unless keyword
“‘text case foo; in pattern unless cond; end
~~~~~~
“‘
4059 4060 4061 |
# File 'lib/lib-ruby-parser/nodes.rb', line 4059 def keyword_l @keyword_l end |