Goose  Diff

Differences From Artifact [d6c2d71c1f]:

  • File bs/parse/parser.cpp — part of check-in [f1458583b5] at 2023-12-26 15:41:26 on branch trunk — Structs: add the Finalize extension point that finalizes the creation of a struct after gathering its content. (user: zlodo size: 10376)

To Artifact [bb168a565a]:

  • File bs/parse/parser.cpp — part of check-in [75a719c020] at 2024-03-14 23:23:27 on branch trunk —
    • add type wrapper for unresolved compile time identifier, move undefined identifier handling to dropValue() of those
    • implemented dot operator for structs
    • fixed struct lazy parsing
    • implemented some tests for structs default construction
    • fixed struct default ctor generation
    (user: zlodo size: 10327)

149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
}

// Standalone (ie not part of a grammar construct that expects them such as a decl), unresolved identifiers
// end up here.
bool Parser::parsePrefix( StringId strid, uint32_t )
{
    auto tok = m_resolver->consume();
    DiagnosticsManager::GetInstance().emitSyntaxErrorMessage( tok->second,
        "undefined identifier.", 0 );
    return true;
}

// Infix identifiers: if the left value is a type, then we have a decl.
optional< uint32_t > Parser::getPrecedence( const Term&, StringId strid )
{
    const auto& leftVal = peekLastValue();







|
<







149
150
151
152
153
154
155
156

157
158
159
160
161
162
163
}

// Standalone (ie not part of a grammar construct that expects them such as a decl), unresolved identifiers
// end up here.
bool Parser::parsePrefix( StringId strid, uint32_t )
{
    auto tok = m_resolver->consume();
    pushValue( ToValue( strid ).setLocationId( tok->second ) );

    return true;
}

// Infix identifiers: if the left value is a type, then we have a decl.
optional< uint32_t > Parser::getPrecedence( const Term&, StringId strid )
{
    const auto& leftVal = peekLastValue();