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.

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

Meta