Skip to content

Commit

Permalink
Add attributes to type / nodeID / nodeTypeString
Browse files Browse the repository at this point in the history
Those are simple switches.
  • Loading branch information
Geod24 authored and Herringway committed Jun 28, 2022
1 parent e61243c commit 85f3d1d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/dyaml/node.d
Original file line number Diff line number Diff line change
Expand Up @@ -2096,7 +2096,7 @@ struct Node
}

/// Get type of the node value.
@property NodeType type() const @safe nothrow
@property NodeType type() const scope @safe pure nothrow @nogc
{
return this.value_.match!(
(const bool _) => NodeType.boolean,
Expand All @@ -2114,7 +2114,7 @@ struct Node
}

/// Get the kind of node this is.
@property NodeID nodeID() const @safe nothrow
@property NodeID nodeID() const scope @safe pure nothrow @nogc
{
final switch (type)
{
Expand Down Expand Up @@ -2175,7 +2175,7 @@ struct Node


public:
@property string nodeTypeString() const @safe nothrow
@property string nodeTypeString() const scope @safe pure nothrow @nogc
{
final switch (nodeID)
{
Expand Down

0 comments on commit 85f3d1d

Please sign in to comment.