cucumber.reflection

Undocumented in source.

Members

Aliases

CucumberStepFunction
alias CucumberStepFunction = void function(in string[] = [])
Undocumented in source.

Functions

argsString
string argsString()

Comma separated argument list for calls to variadic functions associated with regexen. Meant to be used with mixin to generate code.

argsStringWithParens
string argsStringWithParens()
Undocumented in source. Be warned that the author may not have intended to support it.
conversionsFromString
auto conversionsFromString()

Returns an array of string mixins to convert each type from a string

countParenPairs
int countParenPairs()

Counts the number of parentheses pairs in a string known at compile-time

findMatch
MatchResult findMatch(string step_str)

Finds the match to a step string. Checks all steps and loops over to see which one has a matching regex. Steps are found at compile-time.

findSteps
auto findSteps()

Finds all steps in all modules. Modules are passed in as strings. Steps are found by using compile-time reflection to register all functions with the Match UDA attached to it and extracting the relevant regex from the Match UDA itself.

getLineNumber
auto getLineNumber()
Undocumented in source. Be warned that the author may not have intended to support it.
rawStringMixin
string rawStringMixin(string str)

This function is necessary due to the extreme "metaness" of this project. It returns a string that is meant to be consumed by mixin to generate code. Since the strings being fed to the system at compile-time are generally going to be "raw" strings, they'll either be r"" or ` style D strings. If the regex requires the '"' character they'll use `, and vice-versa. When generating code, I opted for r"" strings. This would cause a compilation error if the regex has the quote character in it. So this function returns an escaped version that can be safely used.

Structs

CucumberStep
struct CucumberStep
Undocumented in source.
MatchResult
struct MatchResult

Normally this struct wouldn't exist and I'd use a delegate. But for the wire protocol I need access to the captures array so it's a struct.

Meta