mirror of
https://codeberg.org/ProgramSnail/lang_2023.git
synced 2025-12-24 15:58:44 +00:00
type_check_visitor fixes, array access and function call syntax change
This commit is contained in:
parent
f7080ba856
commit
c1dec6a0d1
16 changed files with 426 additions and 311 deletions
|
|
@ -124,6 +124,10 @@ private:
|
|||
Context() = default;
|
||||
|
||||
bool DefineVariable(const std::string& name, utils::IdType type_id) {
|
||||
if (name == "_") { // placeholder // TODO: check in all places
|
||||
return true;
|
||||
}
|
||||
|
||||
if (variables_.count(name) > 0) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue