summaryrefslogtreecommitdiffstats
path: root/llvm/docs/tutorial/LangImpl5.rst
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2016-03-25 17:41:26 +0000
committerLang Hames <lhames@gmail.com>2016-03-25 17:41:26 +0000
commit5d045a903115ff154560a844eda3bddb85d9115c (patch)
treebfa2e7f5e56a6350c3b1dc9b04ddddfb2bc93c14 /llvm/docs/tutorial/LangImpl5.rst
parentf9878c54ae64816b411a998b54191fd6de119780 (diff)
downloadbcm5719-llvm-5d045a903115ff154560a844eda3bddb85d9115c.tar.gz
bcm5719-llvm-5d045a903115ff154560a844eda3bddb85d9115c.zip
[Kaleidoscope] Rename Error -> LogError in Chapters 2-5.
This keeps the naming consistent with Chapters 6-8, where Error was renamed to LogError in r264426 to avoid clashes with the new Error class in libSupport. llvm-svn: 264427
Diffstat (limited to 'llvm/docs/tutorial/LangImpl5.rst')
-rw-r--r--llvm/docs/tutorial/LangImpl5.rst14
1 files changed, 7 insertions, 7 deletions
diff --git a/llvm/docs/tutorial/LangImpl5.rst b/llvm/docs/tutorial/LangImpl5.rst
index d916f92bf99..e4dc8ab7d85 100644
--- a/llvm/docs/tutorial/LangImpl5.rst
+++ b/llvm/docs/tutorial/LangImpl5.rst
@@ -127,7 +127,7 @@ First we define a new parsing function:
return nullptr;
if (CurTok != tok_then)
- return Error("expected then");
+ return LogError("expected then");
getNextToken(); // eat the then
auto Then = ParseExpression();
@@ -135,7 +135,7 @@ First we define a new parsing function:
return nullptr;
if (CurTok != tok_else)
- return Error("expected else");
+ return LogError("expected else");
getNextToken();
@@ -154,7 +154,7 @@ Next we hook it up as a primary expression:
static std::unique_ptr<ExprAST> ParsePrimary() {
switch (CurTok) {
default:
- return Error("unknown token when expecting an expression");
+ return LogError("unknown token when expecting an expression");
case tok_identifier:
return ParseIdentifierExpr();
case tok_number:
@@ -518,13 +518,13 @@ value to null in the AST node:
getNextToken(); // eat the for.
if (CurTok != tok_identifier)
- return Error("expected identifier after for");
+ return LogError("expected identifier after for");
std::string IdName = IdentifierStr;
getNextToken(); // eat identifier.
if (CurTok != '=')
- return Error("expected '=' after for");
+ return LogError("expected '=' after for");
getNextToken(); // eat '='.
@@ -532,7 +532,7 @@ value to null in the AST node:
if (!Start)
return nullptr;
if (CurTok != ',')
- return Error("expected ',' after for start value");
+ return LogError("expected ',' after for start value");
getNextToken();
auto End = ParseExpression();
@@ -549,7 +549,7 @@ value to null in the AST node:
}
if (CurTok != tok_in)
- return Error("expected 'in' after for");
+ return LogError("expected 'in' after for");
getNextToken(); // eat 'in'.
auto Body = ParseExpression();
OpenPOWER on IntegriCloud