Rename parseIdentifier to parseAnyIdentifier to match langref and

make it clear to it also allows operators.


Swift SVN r1126
This commit is contained in:
Chris Lattner
2012-02-26 18:16:30 +00:00
parent 5b98c5086c
commit dd0c5aff52
5 changed files with 28 additions and 20 deletions

View File

@@ -134,9 +134,9 @@ void Parser::skipUntilDeclStmtRBrace() {
// Primitive Parsing
//===----------------------------------------------------------------------===//
/// parseIdentifier - Consume an identifier if present and return its name in
/// Result. Otherwise, emit an error and return true.
bool Parser::parseIdentifier(Identifier &Result, const Diagnostic &D) {
/// parseAnyIdentifier - Consume an identifier or operator if present and return
/// its name in Result. Otherwise, emit an error and return true.
bool Parser::parseAnyIdentifier(Identifier &Result, const Diagnostic &D) {
if (Tok.is(tok::identifier) || Tok.is(tok::oper)) {
Result = Context.getIdentifier(Tok.getText());
consumeToken();