Skip to content

Commit

Permalink
Re-add NodeList.Create temporarily
Browse files Browse the repository at this point in the history
  • Loading branch information
adams85 committed May 17, 2024
1 parent d29bed9 commit f7ecb88
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Acornima/Ast/NodeList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,11 @@ internal static NodeList<T> From<T>(ref ArrayList<T> arrayList) where T : Node?
return new NodeList<T>(items, count);
}

[Obsolete($"This method has been renamed to '{nameof(From)}' for consistency, so it exists only for maintaining backward compatibility and will be removed from the public API in a future major version.")]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static NodeList<T> Create<T>(IEnumerable<T> source) where T : Node?
=> From(source);

public static NodeList<T> From<T>(IEnumerable<T> source) where T : Node?
{
if (source is null)
Expand Down

0 comments on commit f7ecb88

Please sign in to comment.