[zeek/spicy] 3eb1b0: Encompass child node's location in parent.

0 views
Skip to first unread message

Evan Typanski

unread,
Oct 24, 2024, 9:02:29 AM10/24/24
to spicy-...@zeek.org
Branch: refs/heads/topic/etyp/encompass-children-locs
Home: https://github.com/zeek/spicy
Commit: 3eb1b0ae7a5a92b193c8f637bce28784982dcb6d
https://github.com/zeek/spicy/commit/3eb1b0ae7a5a92b193c8f637bce28784982dcb6d
Author: Evan Typanski <evan.t...@corelight.com>
Date: 2024-10-24 (Thu, 24 Oct 2024)

Changed paths:
M hilti/toolchain/include/ast/attribute.h
M hilti/toolchain/include/ast/location.h
M hilti/toolchain/include/ast/meta.h
M hilti/toolchain/include/ast/node.h
M hilti/toolchain/src/ast/location.cc
M spicy/toolchain/src/compiler/validator.cc
M tests/Baseline/hilti.ast.basic-module/debug.log
M tests/Baseline/hilti.ast.coercion/output
M tests/Baseline/hilti.ast.imported-id/output
M tests/Baseline/hilti.ast.types/output
M tests/Baseline/hilti.expressions.ctor-replacement/output
M tests/Baseline/spicy.attributes.invalid-type-attributes/output

Log Message:
-----------
Encompass child node's location in parent.

Closes #1893

When a child is added with `addChild`, the parent's location should
(generally) span over that child as well. This primarily helps for cases
where a node doesn't have much of a location until it gets children
added - like `AttributeSet`. The locations for those should encompass
all of the attributes within the set. That logic applies for any node
with a child: if it's the child, then its location should reflect that.



To unsubscribe from these emails, change your notification settings at https://github.com/zeek/spicy/settings/notifications
Reply all
Reply to author
Forward
0 new messages