107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
}
// Standalone (ie not part of a grammar construct that expects them such as a decl), unresolved identifiers
// end up here.
bool Parser::parsePrefix( const StringId& strid, uint32_t )
{
auto tok = m_resolver->consume();
// TODO poisoning
DiagnosticsManager::GetInstance().emitErrorMessage( tok->second,
"undefined identifier.", 0 );
return false;
}
// Infix identifiers: if the left value is a type, then we have a decl.
optional< uint32_t > Parser::getPrecedence( const Term&, const StringId& strid )
{
|
<
<
|
|
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
}
// Standalone (ie not part of a grammar construct that expects them such as a decl), unresolved identifiers
// end up here.
bool Parser::parsePrefix( const StringId& strid, uint32_t )
{
auto tok = m_resolver->consume();
DiagnosticsManager::GetInstance().emitSyntaxErrorMessage( tok->second,
"undefined identifier.", 0 );
return false;
}
// Infix identifiers: if the left value is a type, then we have a decl.
optional< uint32_t > Parser::getPrecedence( const Term&, const StringId& strid )
{
|