dfix

Undocumented in source.

Members

Classes

DFixVisitor
class DFixVisitor

Scans a module's parsed AST and looks for C-style array variables and parameters, storing the locations in the markers array.

Enums

SpecialMarkerType
enum SpecialMarkerType

The types of special token ranges identified by the parsing pass

Functions

isBodyKw
bool isBodyKw(const(Token)[] tokens, size_t index)

Returns true if body is a keyword and false if it's an identifier.

main
int main(string[] args)
Undocumented in source. Be warned that the author may not have intended to support it.
printHelp
void printHelp()

Prints help message

relocateMarkers
void relocateMarkers(SpecialMarker[] markers, const(Token)[] tokens)

Converts the marker index from a byte index into the source code to an index into the tokens array.

reportErrors
void reportErrors(string fileName, size_t lineNumber, size_t columnNumber, string message, bool isError)

Dummy message output function for the lexer/parser

skip
void skip(const(Token)[] tokens, size_t index)

Skips balanced parens, braces, or brackets. index will be incremented to index tokens just after the balanced closing token.

skipAndWrite
void skipAndWrite(File output, const(Token)[] tokens, size_t index)
Undocumented in source. Be warned that the author may not have intended to support it.
skipAsmBlock
void skipAsmBlock(File output, const(Token)[] tokens, size_t i)

Skips over (and prints) an asm block

skipAttribute
void skipAttribute(File output, const(Token)[] tokens, size_t i)

Skips over an attribute

skipIdentifierChain
void skipIdentifierChain(File output, const(Token)[] tokens, size_t index, bool print)

Advances index until it indexs the token just after an identifier or template chain.

skipWhitespace
void skipWhitespace(File output, const(Token)[] tokens, size_t index, bool print)

Skips whitespace tokens, incrementing index until it indexes tokens at a non-whitespace token.

upgradeFile
void upgradeFile(string fileName, bool dip64, bool dip65, bool dip1003)

Fixes the given file.

writeToken
void writeToken(File output, const(Token) token)

Writes a token to the output file.

Structs

SpecialMarker
struct SpecialMarker

Identifies ranges of tokens in the source tokens that need to be rewritten

Meta