Created
March 20, 2017 06:51
-
-
Save Interfere/684e909db159f16c79b88ffca2f99085 to your computer and use it in GitHub Desktop.
Lexer formToken routine
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Lexer::formToken(tok Kind, const char *TokStart) { | |
assert(CurPtr >= BufferStart && | |
CurPtr <= BufferEnd && | |
"Current pointer out of range!"); | |
NextToken.setToken(Kind, StringRef(TokStart, CurPtr-TokStart)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment