Goose  Diff

Differences From Artifact [32603efaab]:

  • File bs/parse/parser.cpp — part of check-in [b8548d8b24] at 2019-08-11 17:18:45 on branch trunk —
    • Converted more error messages to the new system.
    • Propagated value locations in some missing places.
    • Added the location of template function calls as diagnostics context.
    (user: achavasse size: 6212)

To Artifact [51a891ea84]:

  • File bs/parse/parser.cpp — part of check-in [972c1d8b47] at 2019-08-12 20:15:11 on branch trunk —
    • Implemented a system to temporarily silence error outputs.
    • Syntax errors now silence further errors encountered while parsing the same block and nested children blocks.
    • All errors are also silenced while speculatively attempting to evaluate invocations at compilation time.
    (user: achavasse size: 6195)

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 )
{