vibe.d beta banner
get vibe.d
0.10.0

Asynchronous I/O that doesn’t get in your way, written in D

Struct Attribute

A single node attribute.

struct Attribute ;

Attributes are key-value pairs, where the value can either be empty (considered as a Boolean value of true), a string with optional string interpolations, or a D expression (stored as a single interpolation AttributeContent).

Constructors

NameDescription
this (loc, name, contents)

Fields

NameTypeDescription
contents AttributeContent[]Value of the attribute
loc LocationLocation in source file
name stringName of the attribute
translationKey stringFor translated attributes, contains the attribute value expression as-is

Properties

NameTypeDescription
dup[get] AttributeCreates a copy of the attribute.

Methods

NameDescription
addContents (contents) Appends a list of contents.
addText (str) Appends raw text to the attribute.
expr (name, value, loc) Creates a new attribute with an expression based value.
text (name, value, loc) Creates a new attribute with a static text value.
Authors
Copyright
License