Ignore:
Timestamp:
Jan 19, 2021, 8:44:29 PM (11 months ago)
Author:
Michael Brooks <mlbrooks@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast-unique-expr
Children:
dafbde8
Parents:
2f47ea4
Message:

Converting the project to use the new syntax for otype, dtype and ttytpe.

Changed prelude (gen), libcfa and test suite to use it. Added a simple deprecation rule of the old syntax to the parser; we might wish to support both syntaxes "officially," like with an extra CLI switch, but this measure should serve as a simple reminder for our team to try the new syntax.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/containers/result.hfa

    r2f47ea4 rfd54fef  
    1919
    2020// DO NOT USE DIRECTLY!
    21 forall(otype T, otype E)
     21forall(T, E)
    2222union inner_result{
    2323        T value;
     
    2525};
    2626
    27 forall(otype T, otype E)
     27forall(T, E)
    2828struct result {
    2929        bool has_value;
     
    3232
    3333
    34 forall(otype T, otype E)
     34forall(T, E)
    3535void ?{}(result(T, E) & this);
    3636
    37 forall(otype T, otype E)
     37forall(T, E)
    3838void ?{}(result(T, E) & this, one_t, T value);
    3939
    40 forall(otype T, otype E)
     40forall(T, E)
    4141void ?{}(result(T, E) & this, zero_t, E error);
    4242
    43 forall(otype T, otype E)
     43forall(T, E)
    4444void ?{}(result(T, E) & this, result(T, E) other);
    4545
    46 forall(otype T, otype E)
     46forall(T, E)
    4747void ^?{}(result(T, E) & this);
    4848
    49 forall(otype T, otype E)
     49forall(T, E)
    5050result(T, E) ?=?(result(T, E) & this, result(T, E) other);
    5151
    52 forall(otype T, otype E)
     52forall(T, E)
    5353bool ?!=?(result(T, E) this, zero_t);
    5454
    5555/* Wating for bug#11 to be fixed.
    56 forall(otype T, otype E)
     56forall(T, E)
    5757result(T, E) result_value(T value);
    5858
    59 forall(otype T, otype E)
     59forall(T, E)
    6060result(T, E) result_error(E error);
    6161*/
    6262
    63 forall(otype T, otype E)
     63forall(T, E)
    6464bool has_value(result(T, E) * this);
    6565
    66 forall(otype T, otype E)
     66forall(T, E)
    6767T get(result(T, E) * this);
    6868
    69 forall(otype T, otype E)
     69forall(T, E)
    7070E get_error(result(T, E) * this);
    7171
    72 forall(otype T, otype E)
     72forall(T, E)
    7373void set(result(T, E) * this, T value);
    7474
    75 forall(otype T, otype E)
     75forall(T, E)
    7676void set_error(result(T, E) * this, E error);
    7777
Note: See TracChangeset for help on using the changeset viewer.