Goose  Diff

Differences From Artifact [1977adc51b]:

  • File bs/llr/element.h — part of check-in [fac82a4d71] at 2019-01-15 18:39:17 on branch trunk —
    • Defined the representation for values and their conversion from/to IR expressions.
    • Began defining the LLR.
    (user: achavasse size: 316)

To Artifact [86db67a480]:

  • File bs/llr/element.h — part of check-in [affb657e05] at 2019-01-17 20:59:41 on branch trunk — Import most of the llr implementation from the previous prototype. (user: achavasse size: 606)

1
2
3
4
5


6
7
8
9
10

11
12


13


14
15
16
17






18
19
20
#ifndef EMPATHY_LLR_ELEMENT_H
#define EMPATHY_LLR_ELEMENT_H

namespace empathy::llr
{


    class Element
    {
        public:
            using Content = variant
            <

                Value
                // TODO add the rest


            >;



        private:
            Content m_content;
    };






}

#endif





>
>





>
|
<
>
>

>
>




>
>
>
>
>
>



1
2
3
4
5
6
7
8
9
10
11
12
13
14

15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef EMPATHY_LLR_ELEMENT_H
#define EMPATHY_LLR_ELEMENT_H

namespace empathy::llr
{
    class Seq;

    class Element
    {
        public:
            using Content = variant
            <
                ptr< Seq >,
                ptr< Call >,

                ptr< GetVar >,
                ptr< SetVar >
            >;

            const auto& content() const { return m_content; }

        private:
            Content m_content;
    };

    template<>
    bool CanBeInterpreted( const Element& elem );

    template<>
    bool CanBeInterpretedInIncompleteFunction( const Element& elem );
}

#endif