Ruby 4.1.0dev (2026-10-21 revision 536dc6f98b72e6999a84bb6373562c43cb1ddf8a)
Data Structures | Variables
node_type.hpp File Reference

(536dc6f98b72e6999a84bb6373562c43cb1ddf8a)

The traits that map node structs to node types. More...

#include "prism/compiler/cplusplus.hpp"
#include "prism/ast.h"
#include <type_traits>
Include dependency graph for node_type.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  prism::node_type< T >
 Maps a node struct to its node type, as in node_type<pm_call_node_t>::value being PM_CALL_NODE. More...
 
struct  prism::is_node< T, typename >
 Whether the given type is one of the node structs declared in ast.h. More...
 
struct  prism::is_node< T, std::void_t< decltype(node_type< T >::value)> >
 Whether the given type is one of the node structs declared in ast.h. More...
 

Variables

template<typename T >
constexpr pm_node_type_t prism::node_type_v = node_type<T>::value
 The node type of the given node struct.
 
template<typename T >
constexpr bool prism::is_node_v = is_node<T>::value
 Whether the given type is one of the node structs declared in ast.h.
 

Detailed Description

The traits that map node structs to node types.

The specialization for each node struct is generated into ast.hpp.

Definition in file node_type.hpp.

Variable Documentation

◆ is_node_v

template<typename T >
constexpr bool prism::is_node_v = is_node<T>::value
inlineconstexpr

Whether the given type is one of the node structs declared in ast.h.

Definition at line 34 of file node_type.hpp.

◆ node_type_v

template<typename T >
constexpr pm_node_type_t prism::node_type_v = node_type<T>::value
inlineconstexpr

The node type of the given node struct.

Definition at line 25 of file node_type.hpp.