Skip to content

Commit b3b308c

Browse files
committed
Use simple object field for Node.UserData for now
1 parent 54d58e6 commit b3b308c

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/Acornima/Ast/Node.cs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,23 +43,13 @@ protected Node(NodeType type)
4343
internal SourceLocation _location;
4444
public SourceLocation Location { [MethodImpl(MethodImplOptions.AggressiveInlining)] get => _location; init => _location = value; }
4545

46-
private AdditionalDataSlot _additionalDataSlot;
47-
48-
//// TODO: allow multiple pieces of user data?
49-
5046
/// <summary>
5147
/// Gets or sets the arbitrary, user-defined data object associated with the current <see cref="Node"/>.
5248
/// </summary>
5349
/// <remarks>
5450
/// The operation is not guaranteed to be thread-safe. In case concurrent access or update is possible, the necessary synchronization is caller's responsibility.
5551
/// </remarks>
56-
public object? UserData
57-
{
58-
[MethodImpl(MethodImplOptions.AggressiveInlining)]
59-
get => _additionalDataSlot.PrimaryData;
60-
[MethodImpl(MethodImplOptions.AggressiveInlining)]
61-
set => _additionalDataSlot.PrimaryData = value;
62-
}
52+
public object? UserData { [MethodImpl(MethodImplOptions.AggressiveInlining)] get; [MethodImpl(MethodImplOptions.AggressiveInlining)] set; }
6353

6454
protected internal abstract object? Accept(AstVisitor visitor);
6555

0 commit comments

Comments
 (0)