diff options
author | Sylvestre Ledru <sylvestre@debian.org> | 2017-03-04 14:00:44 +0000 |
---|---|---|
committer | Sylvestre Ledru <sylvestre@debian.org> | 2017-03-04 14:00:44 +0000 |
commit | 510436882e895b9a175f63f3a746eb5fc199f756 (patch) | |
tree | 06716095e7830038c02662c6a139d6a6e4ae691f /llvm/docs/tutorial | |
parent | 456c79ebf4a2cbafe80313654aa8b766eb448db7 (diff) | |
download | bcm5719-llvm-510436882e895b9a175f63f3a746eb5fc199f756.tar.gz bcm5719-llvm-510436882e895b9a175f63f3a746eb5fc199f756.zip |
Remove redundant code block and update comment.
By patch zoren here: https://github.com/llvm-mirror/llvm/pull/20
llvm-svn: 296968
Diffstat (limited to 'llvm/docs/tutorial')
-rw-r--r-- | llvm/docs/tutorial/OCamlLangImpl5.rst | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/llvm/docs/tutorial/OCamlLangImpl5.rst b/llvm/docs/tutorial/OCamlLangImpl5.rst index 3a135b23337..6e17de4b2bd 100644 --- a/llvm/docs/tutorial/OCamlLangImpl5.rst +++ b/llvm/docs/tutorial/OCamlLangImpl5.rst @@ -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 |