lib-ruby-parser (C++ bindings)  4.0.1+ruby-3.1.1
C++ bindings for lib-ruby-parser library
lib_ruby_parser::When Class Reference

Represents a branch of the case statement (i.e. when foo) More...

#include <nodes.hpp>

Public Attributes

NodeList patterns
 A list of values to compare/match against. More...
 
Nodebody
 Body of the when branch. More...
 
Loc keyword_l
 
Loc begin_l
 
Loc expression_l
 

Detailed Description

Represents a branch of the case statement (i.e. when foo)

Member Data Documentation

◆ begin_l

Loc lib_ruby_parser::When::begin_l

Location of the then keyword

case foo; when bar then baz; end
^^^^

then is optional, and so begin_l can be None

◆ body

Node* lib_ruby_parser::When::body

Body of the when branch.

◆ expression_l

Loc lib_ruby_parser::When::expression_l

Location of the full expression

case foo; when bar then baz; end
^^^^^^^^^^^^^^^^^

◆ keyword_l

Loc lib_ruby_parser::When::keyword_l

Location of the when keyword

case foo; when bar; end
^^^^

◆ patterns

NodeList lib_ruby_parser::When::patterns

A list of values to compare/match against.


The documentation for this class was generated from the following file: