mirror of
https://codeberg.org/ProgramSnail/lang_2023.git
synced 2025-12-08 16:08:45 +00:00
type_check_visitor first iteration, value, execution_visitor started
This commit is contained in:
parent
173d50672a
commit
890bd90eba
22 changed files with 481 additions and 452 deletions
|
|
@ -487,6 +487,7 @@ void BuildVisitor::Visit(TypeConstructorPattern* node) {
|
|||
auto parse_node = current_node_;
|
||||
|
||||
current_node_ = parse_node.ChildByFieldName("constructor");
|
||||
node->constructor = std::make_unique<TypeExpression>();
|
||||
Visit(node->constructor.get());
|
||||
|
||||
size_t child_count = parse_node.NamedChildCount();
|
||||
|
|
@ -988,8 +989,6 @@ void BuildVisitor::Visit(FunctionCallExpression* node) {
|
|||
if (child_count > excluded_child_count) {
|
||||
bool parameters_ended = false;
|
||||
|
||||
node->arguments.resize(child_count - excluded_child_count);
|
||||
|
||||
for (size_t i = 0; i + excluded_child_count < child_count; ++i) {
|
||||
current_node_ = parse_node.NthNamedChild(i + excluded_child_count);
|
||||
|
||||
|
|
@ -1499,12 +1498,7 @@ void BuildVisitor::Visit(ParametrizedType* node) {
|
|||
void BuildVisitor::Visit(ExtendedName* node) {
|
||||
SetPosition(node->base, current_node_);
|
||||
|
||||
size_t child_count = current_node_.NamedChildCount();
|
||||
if (child_count > 1) {
|
||||
node->name = current_node_.GetValue();
|
||||
} else {
|
||||
node->name = current_node_.NthNamedChild(0).GetValue();
|
||||
}
|
||||
node->name = current_node_.GetValue();
|
||||
}
|
||||
|
||||
// void BuildVisitor::Visit(AnyIdentifier* node) { // std::string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue