mirror of
https://codeberg.org/ProgramSnail/lang_2023.git
synced 2025-12-31 11:18:16 +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
|
|
@ -7,11 +7,6 @@ namespace interpreter {
|
|||
|
||||
// Namespaces, partitions -----------------
|
||||
|
||||
void FindSymbolsVisitor::Visit(Partition* node) {
|
||||
// TODO: separate partitions
|
||||
Visitor::Visit(&node->scope);
|
||||
}
|
||||
|
||||
void FindSymbolsVisitor::Visit(Namespace* node) {
|
||||
namespace_visitor_.AddEnterNamespace(node->type, node->modifier);
|
||||
Visitor::Visit(&node->scope);
|
||||
|
|
@ -177,6 +172,15 @@ void FindSymbolsVisitor::Visit(TypeclassDefinitionStatement* node) {
|
|||
is_in_statement_ = false;
|
||||
}
|
||||
|
||||
void FindSymbolsVisitor::Visit(PartitionStatement* node) {
|
||||
is_in_statement_ = true;
|
||||
|
||||
node->executable_id_ = namespace_visitor_.AddPartition(node->name.path, node->name.name, node);
|
||||
// TODO: typecheck error on same tests
|
||||
|
||||
is_in_statement_ = false;
|
||||
}
|
||||
|
||||
// Definition parts
|
||||
|
||||
void FindSymbolsVisitor::Visit(AnyAnnotatedType* node) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue