Spicy
Public Member Functions | List of all members
spicy::detail::codegen::Production Class Referencefinal

#include <production.h>

Inheritance diagram for spicy::detail::codegen::Production:

Public Member Functions

template<typename T , typename std::enable_if_t< std::is_base_of< trait::isProduction, T >::value > * = nullptr>
 Production (T t)
 
 Production (const Production &)=default
 
 Production (Production &&) noexcept=default
 
Productionoperator= (const Production &)=default
 
Productionoperator= (Production &&)=default
 
 operator std::string () const
 

Detailed Description

A single production inside a grammar. This is a type-erased class that wraps all types of productions.

Note
Do not derive from this class. Implement the Production interface instead.

Constructor & Destructor Documentation

◆ Production()

template<typename T , typename std::enable_if_t< std::is_base_of< trait::isProduction, T >::value > * = nullptr>
spicy::detail::codegen::Production::Production ( t)
inline

Constructs a production from an instance of a class implementing the Production interface.

Member Function Documentation

◆ operator std::string()

spicy::detail::codegen::Production::operator std::string ( ) const
inlineexplicit

Returns a readable representation of the production for diagnostics.


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