[llvm] r296968 - Remove redundant code block and update comment.

Sylvestre Ledru via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 4 06:00:45 PST 2017


Author: sylvestre
Date: Sat Mar  4 08:00:44 2017
New Revision: 296968

URL: http://llvm.org/viewvc/llvm-project?rev=296968&view=rev
Log:
Remove redundant code block and update comment.
By patch zoren here: https://github.com/llvm-mirror/llvm/pull/20


Modified:
    llvm/trunk/docs/tutorial/OCamlLangImpl5.rst

Modified: llvm/trunk/docs/tutorial/OCamlLangImpl5.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/OCamlLangImpl5.rst?rev=296968&r1=296967&r2=296968&view=diff
==============================================================================
--- llvm/trunk/docs/tutorial/OCamlLangImpl5.rst (original)
+++ llvm/trunk/docs/tutorial/OCamlLangImpl5.rst Sat Mar  4 08:00:44 2017
@@ -103,19 +103,7 @@ Parser Extensions for If/Then/Else
 
 Now that we have the relevant tokens coming from the lexer and we have
 the AST node to build, our parsing logic is relatively straightforward.
-First we define a new parsing function:
-
-.. code-block:: ocaml
-
-    let rec parse_primary = parser
-      ...
-      (* ifexpr ::= 'if' expr 'then' expr 'else' expr *)
-      | [< 'Token.If; c=parse_expr;
-           'Token.Then ?? "expected 'then'"; t=parse_expr;
-           'Token.Else ?? "expected 'else'"; e=parse_expr >] ->
-          Ast.If (c, t, e)
-
-Next we hook it up as a primary expression:
+Next we add a new case for parsing a if-expression as a primary expression:
 
 .. code-block:: ocaml
 




More information about the llvm-commits mailing list