/* * SPDX-License-Identifier: AGPL-3.0-or-later * Copyright (C) 2025 Sergej Görzen * This file is part of xAPI4Unity. */ #if UNITY_EDITOR namespace xAPI4Unity.Editor.Parser.Code.SyntaxTree { /// /// A getter in the syntax tree /// internal sealed class Getter { // Backing field for the getter body. Stored as a MethodBody node representing the serialized statements. private MethodBody _body; /// /// Method body of the getter /// public ref readonly MethodBody Body => ref _body; /// /// Creates an empty getter with nobody. /// public Getter() { } /// /// Creates a getter with the provided method body. /// /// The method body to associate with this getter. public Getter(MethodBody body) { _body = body; } /// /// Sets the method body for this getter. /// /// The method body to assign. /// The same Getter instance for fluent chaining. public Getter WithMethodBody(MethodBody body) { _body = body; return this; } } } #endif