Skip to content
Commit 0ab032aa authored by Chris Lattner's avatar Chris Lattner
Browse files

Add two new Token helper functions, "is" and "isNot". This allows us to write

stuff like this:

       // If we don't have a comma, it is either the end of the list (a ';') or
       // an error, bail out.
       if (Tok.isNot(tok::comma))
         break;
instead of:
       // If we don't have a comma, it is either the end of the list (a ';') or
       // an error, bail out.
       if (Tok.getKind() != tok::comma)
         break;

There is obviously no functionality change, but the code reads a bit better and is 
more terse.

llvm-svn: 42795
parent f4838472
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment