-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Description
| Bugzilla Link | 10016 |
| Resolution | FIXED |
| Resolved on | Nov 05, 2013 06:14 |
| Version | unspecified |
| OS | All |
| Blocks | llvm/llvm-bugzilla-archive#10025 llvm/llvm-bugzilla-archive#10316 |
| Reporter | LLVM Bugzilla Contributor |
| CC | @efriedma-quic,@whitequark |
Extended Description
I've just been working through the Kaleidoscope tutorial online at http://llvm.org/docs/tutorial/OCamlLangImpl2.html#parserbinops and I've found a missing line in the section about parsing binary operators (linked).
The line of code (along with the corresponding comment) is:
(* Parse the primary expression after the binary operator. *)
let rhs = parse_primary stream in
found in lines 63 and 64 of parser.ml.
This line is a very important part of the code, and it is impossible to understand the flow of logic without them in the tutorial. The tutorial already mentions this line (below the relevant snippet) by saying "and then parses the primary expression that follows."
All that is needed to fix this bug is to add the 2 lines of code in, and things will make much more sense.
This bug applies only to the OCaml version of the tutorial, the C++ version is fine.