Class Tag

Inherits from

  • Object (base class)

Constructors

Name Description
this
this
this

Fields

Name Type Description
location Location File/Line/Column/Index information for where this tag was located in
values std.variant.VariantN!(32L,bool,string,dchar,int,long,float,double,real,std.datetime.Date,sdlang.token.DateTimeFrac,std.datetime.SysTime,sdlang.token.DateTimeFracUnknownZone,core.time.Duration,ubyte[],)[] Access all this tag's values, as an array of type sdlang.token.Value.

Properties

Name Type Description
all [get] Tag.NamespaceAccess Access all attributes and tags regardless of namespace.
attributes [get] sdlang.ast.Tag.__T11MemberRangeTC6sdlang3ast9AttributeVAyaa13_616c6c41747472696275746573VAyaa17_617474726962757465496e646963696573VAyaa11_5f61747472696275746573Z.MemberRange Access all attributes that don't have a namespace
fullName [get] string This tag's name, including namespace if one exists.
maybe [get] Tag.MaybeAccess Access attributes, tags, namespaces and all like normal,
name [get, set] string This tag's name, not including namespace.
namespace [get, set] string This tag's namespace. Empty string if no namespace.
namespaces [get] Tag.NamespaceRange Access all namespaces in this tag, and the attributes/tags within them.
parent [get] Tag Get parent tag. To set a parent, attach this Tag to its intended
tags [get] sdlang.ast.Tag.__T11MemberRangeTC6sdlang3ast3TagVAyaa7_616c6c54616773VAyaa11_746167496e646963696573VAyaa5_5f74616773Z.MemberRange Access all direct-child tags that don't have a namespace.

Methods

Name Description
add Adds a Value, Attribute, Tag (or array of such) as a member/child of this Tag.
clone Deep-copy this Tag.
expectAttribute Lookup an attribute of this tag by name, and retrieve a value of type T from it. Throws if not found.
expectTag Lookup a child tag by name. Throws if not found.
expectTagAttribute Lookup a child tag and attribute by name, and retrieve a value of type T from it. Throws if not found.
expectTagValue Lookup a child tag by name, and retrieve a value of type T from it. Throws if not found,
expectValue Retrieve a value of type T from this tag. Throws if not found.
getAttribute Lookup an attribute of this tag by name, and retrieve a value of type T from it. Returns a default value if not found.
getFullName This tag's name, including namespace if one exists.
getTag Lookup a child tag by name. Returns null if not found.
getTagAttribute Lookup a child tag and attribute by name, and retrieve a value of type T from it. Returns a default value if not found.
getTagAttributes Lookup a child tag by name, and retrieve all attributes in a chosen (or default) namespace from it.
getTagValue Lookup a child tag by name, and retrieve a value of type T from it. Returns a default value if not found.
getTagValues Lookup a child tag by name, and retrieve all values from it.
getValue Retrieve a value of type T from this tag. Returns a default value if not found.
opEquals
remove Removes this from its parent, if any. Returns this for chaining.
toDebugString Outputs full information on the tag.
toSDLDocument Treats this as the root tag. Note that root tags cannot have
toSDLString Output this entire tag in SDL format. Does not treat this as

Inner structs

Name Description
MaybeAccess
MemberRange
NamedMemberRange
NamespaceAccess
NamespaceRange

Aliases

Name Description
AttributeRange
TagRange

Authors

Copyright

License