getShouldIndex

Undocumented in source. Be warned that the author may not have intended to support it.
@safe
size_t
getShouldIndex
(
const(Token)[] tokens
,
size_t startLine
)

Examples

Get the index of the should call

const(Token)[] tokens = [];
splitMultilinetokens(fileToDTokens("test/values.d"), tokens);

auto result = getShouldIndex(tokens, 4);

auto token = tokens[result];
token.line.should.equal(3);
token.text.should.equal(`should`);
str(token.type).text.should.equal(`identifier`);

Meta