Goose  Diff

Differences From Artifact [348828f6ca]:

  • File bs/llr/element.h — part of check-in [109bc76611] at 2019-01-30 19:53:12 on branch trunk — llr: remove the variable system from the old prototype, it's going to be done differently. (user: achavasse size: 558)

To Artifact [d76aa55cb3]:

  • File bs/llr/element.h — part of check-in [b844506db4] at 2019-01-30 22:39:09 on branch trunk — First draft of the compile-time interpreter. A simple builtin function call works. (user: achavasse size: 687)

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
#ifndef EMPATHY_LLR_ELEMENT_H
#define EMPATHY_LLR_ELEMENT_H

namespace empathy::llr
{
    class Seq;

    class Element
    {
        public:














            using Content = variant
            <
                monostate,
                ptr< Seq >,
                Call
            >;

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

        private:
            Content m_content;
    };

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

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

#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
33
34
35






36
37
38
#ifndef EMPATHY_LLR_ELEMENT_H
#define EMPATHY_LLR_ELEMENT_H

namespace empathy::llr
{
    class Seq;

    class Element
    {
        public:
            Element() {}

            Element( ptr< Seq >&& s ) :
                m_content( move( s ) )
            {}

            Element( const ptr< Seq >& s ) :
                m_content( s )
            {}

            Element( Call&& c ) :
                m_content( move( c ) )
            {}

            using Content = variant
            <

                ptr< Seq >,
                Call
            >;

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

        private:
            Content m_content;
    };






}

#endif