Goose  Diff

Differences From Artifact [6c0ee17e36]:

  • File bs/parse/rule-helpers.cpp — part of check-in [3e4339b34a] at 2019-01-20 17:59:58 on branch trunk — Parser: added helpers to register parsing rules for prefix operators, postfix operators, and infix operators (either left or right associative). (user: achavasse size: 879)

To Artifact [dac4555eb2]:

  • File bs/parse/rule-helpers.cpp — part of check-in [931ecff8c4] at 2019-01-22 20:32:18 on branch trunk — Builtins: added functions to construct tuples. (user: achavasse size: 919)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "parse.h"

using namespace empathy;
using namespace empathy::parse;

namespace empathy::parse
{
    const Term& RuleType()
    {
        static auto type = TSID( rule );
        return type;
    }

    Value RuleToValue( Rule&& r )
    {
        return Value( RuleType(), make_shared< Rule >( move( r ) ) );
    }









|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "parse.h"

using namespace empathy;
using namespace empathy::parse;

namespace empathy::parse
{
    const Term& RuleType()
    {
        static auto type = ValueToIRExpr( Value( TSID( type ), TSID( rule ) ) );
        return type;
    }

    Value RuleToValue( Rule&& r )
    {
        return Value( RuleType(), make_shared< Rule >( move( r ) ) );
    }