Skip to content

Instantly share code, notes, and snippets.

@rightfold
Created October 4, 2013 16:03
Show Gist options
  • Save rightfold/dad0a574714e48e5c94e to your computer and use it in GitHub Desktop.
Save rightfold/dad0a574714e48e5c94e to your computer and use it in GitHub Desktop.
struct name {
virtual name::~name() = 0;
};
// foo
struct identifier : name {
string name;
};
// foo.bar
struct qualified_name : name {
unique_ptr<name> base;
string child;
};
// foo<bar, baz>
struct parameterized_name : name {
unique_ptr<name> base;
vector<unique_ptr<name>> params;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment