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).

Members

Functions

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

Appends a list of contents.

addText
void addText(string str)

Appends raw text to the attribute.

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
AttributeContent[] contents;

Value of the attribute

loc
Location loc;

Location in source file

name
string name;

Name of the attribute

Meta