mirror of
https://codeberg.org/ProgramSnail/lang_2023.git
synced 2025-12-07 07:28:44 +00:00
partition syntax changed, interface modifier added
This commit is contained in:
parent
3fca384446
commit
b1aff1935d
22 changed files with 299 additions and 266 deletions
|
|
@ -15,16 +15,6 @@ void ExecuteVisitor::Visit(SourceFile* node) {
|
|||
|
||||
// Namespaces, partitions -----------------
|
||||
|
||||
void ExecuteVisitor::Visit(PartitionSources* node) {
|
||||
for (auto& statement : node->statements) {
|
||||
Visitor::Visit(statement);
|
||||
}
|
||||
}
|
||||
|
||||
void ExecuteVisitor::Visit(Partition* node) {
|
||||
Visit(&node->scope);
|
||||
}
|
||||
|
||||
void ExecuteVisitor::Visit(NamespaceSources* node) {
|
||||
for (auto& statement : node->statements) {
|
||||
Visitor::Visit(statement);
|
||||
|
|
@ -83,6 +73,16 @@ void ExecuteVisitor::Visit(TypeclassDefinitionStatement* node) {
|
|||
}
|
||||
}
|
||||
|
||||
void ExecuteVisitor::Visit(ExecutableStatement* node) {
|
||||
Visit(&node->name);
|
||||
Visitor::Visit(node->value);
|
||||
}
|
||||
|
||||
void ExecuteVisitor::Visit(TestStatement* node) {
|
||||
Visit(&node->name);
|
||||
Visitor::Visit(node->value);
|
||||
}
|
||||
|
||||
// Definition parts
|
||||
|
||||
void ExecuteVisitor::Visit(FunctionDefinition* node) {
|
||||
|
|
@ -276,6 +276,14 @@ void ExecuteVisitor::Visit(ArrayExpression* node) {
|
|||
|
||||
// Name
|
||||
|
||||
void ExecuteVisitor::Visit(PartitionName* node) {
|
||||
for (auto& path_namespace : node->path) {
|
||||
Visit(&path_namespace);
|
||||
}
|
||||
|
||||
Visit(&node->name);
|
||||
}
|
||||
|
||||
void ExecuteVisitor::Visit(NameExpression* node) {
|
||||
for (auto& name : node->names) {
|
||||
Visit(&name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue