Attribute

A single node 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

this
this(Location loc, string name, AttributeContent[] contents)
Undocumented in source.
this
this(Location loc, string name, AttributeContent content)
Undocumented in source.

Members

Functions

addContents
void addContents(const(AttributeContent)[] contents)

Appends a list of contents.

addText
void addText(string str)

Appends raw text to the attribute.

copyFrom
void copyFrom(Attribute a)
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

dup
Attribute dup [@property getter]

Creates a copy of the attribute.

Static functions

expr
Attribute expr(string name, string value, Location loc)

Creates a new attribute with an expression based value.

text
Attribute text(string name, string value, Location loc)

Creates a new attribute with a static text value.

Variables

contents
Array!AttributeContent contents;

Value of the attribute

loc
Location loc;

Location in source file

name
Array!char name;

Name of the attribute

Meta