def satisfies(guard):
i = peek()<EOL>if (i is EndOfFile) or (not guard(i)):<EOL><INDENT>fail(["<STR_LIT>" + _fun_to_str(guard) + "<STR_LIT:>>"])<EOL><DEDENT>next()<EOL>return i<EOL>
Returns the current token if it satisfies the guard function provided.

    Fails otherwise.
    This is the a generalisation of one_of.