spell identifier correctly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43718 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2007-11-05 17:54:34 +00:00
parent b50196413a
commit 20a0c80f7e
6 changed files with 35 additions and 35 deletions
+5 -5
View File
@@ -1048,12 +1048,12 @@ FunctionAST *ErrorF(const char *Str) { Error(Str); return 0; }
static ExprAST *ParseExpression();
/// identifierexpr
/// ::= identifer
/// ::= identifer '(' expression* ')'
/// ::= identifier
/// ::= identifier '(' expression* ')'
static ExprAST *ParseIdentifierExpr() {
std::string IdName = IdentifierStr;
getNextToken(); // eat identifer.
getNextToken(); // eat identifier.
if (CurTok != '(') // Simple variable ref.
return new VariableExprAST(IdName);
@@ -1126,7 +1126,7 @@ static ExprAST *ParseIfExpr() {
return new IfExprAST(Cond, Then, Else);
}
/// forexpr ::= 'for' identifer '=' expr ',' expr (',' expr)? 'in' expression
/// forexpr ::= 'for' identifier '=' expr ',' expr (',' expr)? 'in' expression
static ExprAST *ParseForExpr() {
getNextToken(); // eat the for.
@@ -1134,7 +1134,7 @@ static ExprAST *ParseForExpr() {
return Error("expected identifier after for");
std::string IdName = IdentifierStr;
getNextToken(); // eat identifer.
getNextToken(); // eat identifier.
if (CurTok != '=')
return Error("expected '=' after for");