mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-29 06:15:01 +01:00
Define a base class for all AST nodes. (#947)
Also implement code-generation to manage the resulting boilerplate.
This commit is contained in:
@@ -8,8 +8,9 @@
|
||||
|
||||
namespace Carbon {
|
||||
|
||||
void StaticScope::Add(std::string name,
|
||||
Nonnull<const NamedEntityInterface*> entity) {
|
||||
NamedEntity::~NamedEntity() = default;
|
||||
|
||||
void StaticScope::Add(std::string name, Nonnull<const NamedEntity*> entity) {
|
||||
if (!declared_names_.insert({name, entity}).second) {
|
||||
FATAL_COMPILATION_ERROR(entity->source_loc())
|
||||
<< "Duplicate name `" << name << "` also found at "
|
||||
|
||||
Reference in New Issue
Block a user