CxStatementVariable

Description

sealed class Tinman.Core.Cx.Statements.CxStatementVariable

Derived from

CxStatement abstract
ICxVariableContainer

A statement that declares a local variable:

int a;
int a = 1;
int a; // [!]
int a; // [*]
int a_keep;

Additional semantics (see Semantic) may be added by appending a single-line comment suffix. ICxVariableContainer.Variable returns the local variable declaration or definition, which will never be null.

Public / Constructors

Cx​Statement​Variable


public constructor CxStatementVariable → (2)

variable in : CxVariable

[not-null]
See ICxVariableContainer.Variable.

semantic opt : int32 = 0

See Semantic.

Creates a new instance of CxStatementVariable.

Public / Attributes

Semantic


public attribute Semantic → (get)

value : int32

The additional semantic, given as a combination of the following bits:
0 = no additional semantics,
1 = // [!] : the variable holds ownership (see Owner),
2 = // [*] or _keep : the variable is kept (see CxXmlDoc.Keep),
3 = // [!*] : all additional semantics.

Returns the additional semantic of the local variable, as defined by the subsequent single-line comment or name suffix.