Wrench.PropertyTextReader Class Reference

Detailed Description

Reads properties/ attributes from a lexer. These are of the form propertyName="propertyValue", propertyName=value or singleProperty (i.e. no value).

Static Public Member Functions

static void Read (MLLexer lexer, bool selfClosing, out string property, out string value)
 Reads a property and its value from the given lexer. More...
 
static string ReadString (MLLexer lexer)
 Reads a "string" or a 'string' from the lexer. Delimiting can be done with a backslash. More...
 
static void SkipSpaces (MLLexer lexer)
 Skips any whitespaces that occur next in the given lexer. More...
 

Member Function Documentation

static void Wrench.PropertyTextReader.Read ( MLLexer  lexer,
bool  selfClosing,
out string  property,
out string  value 
)
inlinestatic

Reads a property and its value from the given lexer.

Parameters
lexerThe lexer to read the property from.
selfClosingTrue if the tag being read is a self closing one.
propertyThe name of the property that was read.
valueThe value of the property, if there was one. Null otherwise.
static string Wrench.PropertyTextReader.ReadString ( MLLexer  lexer)
inlinestatic

Reads a "string" or a 'string' from the lexer. Delimiting can be done with a backslash.

Parameters
lexerThe lexer the string will be read from.
Returns
The read string.
static void Wrench.PropertyTextReader.SkipSpaces ( MLLexer  lexer)
inlinestatic

Skips any whitespaces that occur next in the given lexer.

Parameters
lexerThe lexer to skip spaces within.