37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
+
+
-
+
|
if( m_seq && m_lastValue )
{
const auto& llr = m_lastValue->llr();
m_seq->emplace_back( move( *llr ) );
return Value( m_lastValue->type(), make_shared< llr::Element >( m_seq ) );
}
// If we don't have a pending value, we wrap it into a void type value
// which is a sort of hackish way to encode a value that isn't really a value but have side effects.
return nullopt;
return Value( GetValueType< void >(), make_shared< llr::Element >( m_seq ) );
}
optional< uint32_t > Parser::getPrecedence( const Term& t )
{
return visit( [&]( auto&& content )
{
return getPrecedence( t, content );
|