workspaced.dparseext

Undocumented in source.

Members

Functions

astToString
string astToString(T ast, Args args)
Undocumented in source. Be warned that the author may not have intended to support it.
evaluateExpressionString
string evaluateExpressionString(PrimaryExpression expr)
string evaluateExpressionString(UnaryExpression expr)
string evaluateExpressionString(ExpressionNode expr)
string evaluateExpressionString(Token token)

Tries to evaluate an expression if it evaluates to a string.

findDeepestNonBlockNode
BaseNode findDeepestNonBlockNode(T ast)

Finds the deepest non-null node of any BaseNode. (like visiting the tree) Aborts on types that contain DeclarationOrStatement or Declaration[] fields. Useful for getting the IfStatement out of a DeclarationOrStatement without traversing its children.

getIfElse
BaseNode getIfElse(IfStatement ifStmt)

Gets the final else block of an if. Will return a node of type IfStatement if it's an else if block. Returns null if there is no single else statement.

isLikeIdentifier
bool isLikeIdentifier(Token token)
Undocumented in source. Be warned that the author may not have intended to support it.
isSomeString
bool isSomeString(Token token)
Undocumented in source. Be warned that the author may not have intended to support it.
isSomeString
bool isSomeString(IdType type)
Undocumented in source. Be warned that the author may not have intended to support it.
makeString
string makeString(IdentifierOrTemplateChain c)
Undocumented in source. Be warned that the author may not have intended to support it.
paramsToString
string paramsToString(Dec dec)
Undocumented in source. Be warned that the author may not have intended to support it.
textLength
size_t textLength(Token token)
Undocumented in source. Be warned that the author may not have intended to support it.
tokenIndexAtByteIndex
size_t tokenIndexAtByteIndex(const(Token)[] tokens, size_t bytes)
tokenIndexAtPosition
size_t tokenIndexAtPosition(const(Token)[] tokens, uint line, uint column)

Performs a binary search to find the token containing the search location.

tokenText
string tokenText(Token token)
Undocumented in source. Be warned that the author may not have intended to support it.

Meta