jamesjuett / lobster

Interactive Program Visualization Tools
8 stars 3 forks source link

Support for Namespaces #301

Open jamesjuett opened 2 years ago

jamesjuett commented 2 years ago

The changes in #333 pave the way for the addition of namespaces.

jamesjuett commented 2 years ago

A potential test

namespace Z {
    using duble = double;
    class X {
        public:
        int a;
        int b;
        class Y {

        };
        static int foo(Y y, Y y2, duble d);

        using dubble = duble;

        ~X() {

        }
    };
}

using Y = int;
using duble = void;
using W = Z::X::Y;

int Z::X::foo(Y y, W z, duble d = *new duble(3.5)) {
  return *new duble(4.5);
  return 2;
};

int main () {
    int blah();
}

int blah() {
    return 2;
}