Goose  Diff

Differences From Artifact [31f53aa7fd]:

  • File bs/builtins/statements/using.cpp — part of check-in [bd2fd03a33] at 2019-08-10 17:50:32 on branch trunk — lexer: generate token locations. (user: achavasse size: 6287)

To Artifact [f5ef86f8f2]:

  • File bs/builtins/statements/using.cpp — part of check-in [e7fce87609] at 2019-08-10 20:15:04 on branch trunk — parser: custom parsing rules are now passed the location id of the value that resolved to them. (user: achavasse size: 6293)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include "builtins/builtins.h"
#include "parse/parse.h"
#include "precedence.h"

using namespace empathy;
using namespace empathy::ir;
using namespace empathy::parse;

namespace empathy::builtins
{
    void SetupUsingStmt( Env& e )
    {
        auto handleUsing = []( Parser& p, const Term& t, uint32_t prec )
        {
            auto& dm = DiagnosticsManager::GetInstance();

            auto nameTerm = p.resolver()->consume();
            if( !nameTerm )
            {
                dm.emitErrorMessage( p.resolver()->getCurrentLocation(), "expected an identifier." );












|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include "builtins/builtins.h"
#include "parse/parse.h"
#include "precedence.h"

using namespace empathy;
using namespace empathy::ir;
using namespace empathy::parse;

namespace empathy::builtins
{
    void SetupUsingStmt( Env& e )
    {
        auto handleUsing = []( Parser& p, uint32_t locationId, uint32_t prec )
        {
            auto& dm = DiagnosticsManager::GetInstance();

            auto nameTerm = p.resolver()->consume();
            if( !nameTerm )
            {
                dm.emitErrorMessage( p.resolver()->getCurrentLocation(), "expected an identifier." );