Class HumlScalar

Namespace
Huml.Net.Parser
Assembly
Huml.Net.dll

Represents a scalar value.

public sealed record HumlScalar : HumlNode, IEquatable<HumlNode>, IEquatable<HumlScalar>
Inheritance
HumlScalar
Implements
Inherited Members

Constructors

HumlScalar(ScalarKind, object?)

Represents a scalar value.

public HumlScalar(ScalarKind Kind, object? Value)

Parameters

Kind ScalarKind

The kind of scalar (string, integer, float, bool, null, nan, or inf).

Value object

The runtime value of the scalar.

  • Null: always null.
  • NaN: the raw token string "nan".
  • Inf: the raw token string "+inf", "-inf", or "inf".
  • All other kinds: the parsed .NET value (string, long, double, bool).

Properties

Kind

The kind of scalar (string, integer, float, bool, null, nan, or inf).

public ScalarKind Kind { get; init; }

Property Value

ScalarKind

Value

The runtime value of the scalar.

  • Null: always null.
  • NaN: the raw token string "nan".
  • Inf: the raw token string "+inf", "-inf", or "inf".
  • All other kinds: the parsed .NET value (string, long, double, bool).
public object? Value { get; init; }

Property Value

object