mirror of
https://codeberg.org/ProgramSnail/lang_2023.git
synced 2025-12-31 11:18:16 +00:00
type_check_visitor FindSubExpressionMethodAndUpdate fixes, fixes
This commit is contained in:
parent
f177961fbf
commit
d2a01abc9c
3 changed files with 56 additions and 30 deletions
|
|
@ -11,6 +11,13 @@ namespace interpreter {
|
|||
// Namespaces, partitions -----------------
|
||||
|
||||
void FindSymbolsVisitor::Visit(Namespace* node) {
|
||||
if (namespace_visitor_.GetCurrentNamespace()->modifier != utils::ClassInternalsModifier::Static) {
|
||||
// other type of error??
|
||||
error_handling::HandleParsingError("Can't use const /var namespace inside const / var namespace",
|
||||
node->base.start_position,
|
||||
node->base.end_position);
|
||||
}
|
||||
|
||||
namespace_visitor_.AddEnterNamespace(node->type, node->modifier, node, node->base);
|
||||
|
||||
Visitor::Visit(&node->scope);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue