Ruby 4.1.0dev (2026-11-30 revision 83557d59f9eab9c7fa6004de6c51482b967e68e2)
node_type.hpp File Reference

(83557d59f9eab9c7fa6004de6c51482b967e68e2)

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>
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>
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.