Prism Ruby parser
Loading...
Searching...
No Matches
Data Structures | Variables
node_type.hpp File Reference

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.