27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
+
+
+
+
+
+
-
+
-
-
|
auto next = m_resolver->lookAhead();
if( !next )
return false;
if( !parsePrefix( *next, precedence ) )
return false;
parsePostfixExpression( precedence );
return true;
}
void Parser::parsePostfixExpression( uint32_t precedence )
{
while( next = m_resolver->lookAhead() )
while( auto next = m_resolver->lookAhead() )
{
auto prec = getPrecedence( *next );
if( !prec || precedence > *prec )
break;
if( !parseInfix( *next, *prec ) )
break;
}
return true;
}
void Parser::flushValue()
{
// Flush the pending value's llr as a standalone instruction,
// if any. If it is a constant, complain about discarding it.
if( !m_lastValue )
|