Extend MCAsmLexer so that it can peek forward several tokens
authorBenjamin Kramer <benny.kra@googlemail.com>
Mon, 17 Aug 2015 14:35:25 +0000 (14:35 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Mon, 17 Aug 2015 14:35:25 +0000 (14:35 +0000)
commitac67f04f79d556001d2e3f836522ec1d5a8a1f06
tree4f3810d346a366d3eafde56806ce65bfe4b1adf4
parentdf09c6b4bf8fc234b7b6b35878dda969c0e0f1d5
Extend MCAsmLexer so that it can peek forward several tokens

This commit adds a virtual `peekTokens()` function to `MCAsmLexer`
which can peek forward an arbitrary number of tokens.

It also makes the `peekTok()` method call `peekTokens()` method, but
only requesting one token.

The idea is to better support targets which more more ambiguous
assembly syntaxes.

Patch by Dylan McKay!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245221 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/MC/MCParser/AsmLexer.h
include/llvm/MC/MCParser/MCAsmLexer.h
lib/MC/MCParser/AsmLexer.cpp