Goose  Diff

Differences From Artifact [81246dbb7b]:

  • File bs/builtins/operators/helpers.h — part of check-in [e1ede8dafa] at 2021-11-25 20:30:26 on branch trunk —
    • simplified ref parsing implementation by using the parser's infix parsing rule helper
    • refactored "requires" and "ensures": they are now simply infix operators that take a function type on the lhs and a proposition list on the rhs
    (user: zlodo size: 3981)

To Artifact [c92475c321]:

  • File bs/builtins/operators/helpers.h — part of check-in [3b954688f3] at 2022-01-07 20:02:04 on branch trunk —
    • Use non-experimental std::coroutine
    • Get rid of fmt lib, use std::format instead
    (user: zlodo size: 3987)

59
60
61
62
63
64
65
66

67
68
69
70
71
72
73
59
60
61
62
63
64
65

66
67
68
69
70
71
72
73







-
+







    auto BuildOpFunc( Env& e, StringId funcName, R&&... ruleBuilders )
    {
        auto pOvlSet = GetOrCreateOverloadSet( e, funcName );
        ( ( ruleBuilders( e, pOvlSet, tag() ) ), ... );

        return [pOvlSet, funcName]< typename... O >( Parser& p, O&&... operands )
        {
            DiagnosticsContext dc( 0, format( "When invoking {}.", funcName ) );
            DiagnosticsContext dc( 0, format( "When invoking {}.", funcName.str() ) );
            return InvokeOverloadSet( p.context(), pOvlSet, MakeTuple( forward< O >( operands )... ) );
        };
    }

    template< typename T, typename I, typename RT = T >
    auto ForType()
    {