accept

The accept family of functions parse tokens. In the case of successful parsing, the function advances the beginning of the tokens to the next token and returns true.

The parsing is successful, if the first token in tokens is of the specified kind and its spelling matches one of the strings passed as Args. It assigns the spelling of the token to the spelling parameter.

bool
accept
(
Args...
)
(
ref Token[] tokens
,
ref string spelling
,
TokenKind kind
)
if (
Args.length > 0 &&
allSatisfy!(isStringValue, Args)
)

Meta