(self, token)
return False
Tries to consume a given piece of text.

    Args:
      token: Text to consume.

    Returns:
      True iff the text was consumed.
Tries to consume a given piece of text.
Tries to consume a given piece of text .
def TryConsume(self, token):
    """Tries to consume a given piece of text.

    Args:
      token: Text to consume.

    Returns:
      True iff the text was consumed.
    """
    if self.token == token:
      self.NextToken()
      return True
    return False
def TryConsume ( self , token ) : if self . token == token : self . NextToken ( ) return True return False