Ignore:
Timestamp:
Jan 19, 2021, 8:44:29 PM (4 years ago)
Author:
Michael Brooks <mlbrooks@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
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/memory.hfa

    r2f47ea4 rfd54fef  
    1717
    1818// Internal data object.
    19 forall(dtype T | sized(T)) {
     19forall(T & | sized(T)) {
    2020        struct counter_data {
    2121                unsigned int counter;
     
    2323        };
    2424
    25         forall(ttype Args | { void ?{}(T &, Args); })
     25        forall(Args... | { void ?{}(T &, Args); })
    2626        void ?{}(counter_data(T) & this, Args args);
    2727
     
    3131
    3232// This is one of many pointers keeping this alive.
    33 forall(dtype T | sized(T)) {
     33forall(T & | sized(T)) {
    3434        struct counter_ptr {
    3535                counter_data(T) * data;
     
    4040        forall( | { void ^?{}(T &); })
    4141        void ?{}(counter_ptr(T) & this, counter_ptr(T) that);
    42         forall(ttype Args | { void ?{}(T&, Args); })
     42        forall(Args... | { void ?{}(T&, Args); })
    4343        void ?{}(counter_ptr(T) & this, Args args);
    4444
     
    6060
    6161// This is the only pointer that keeps this alive.
    62 forall(dtype T) {
     62forall(T &) {
    6363        struct unique_ptr {
    6464                T * data;
     
    6868        void ?{}(unique_ptr(T) & this, zero_t);
    6969        void ?{}(unique_ptr(T) & this, unique_ptr(T) that) = void;
    70         forall( | sized(T), ttype Args | { void ?{}(T &, Args); })
     70        forall( | sized(T), Args... | { void ?{}(T &, Args); })
    7171        void ?{}(unique_ptr(T) & this, Args args);
    7272
Note: See TracChangeset for help on using the changeset viewer.