@@ -231,7 +231,8 @@ parentheses follow.
231231(((syntax tree)))(((Egg language)))(((parse function)))This is all we
232232need to parse Egg. We wrap it in a convenient `parse` function which
233233verifies that it has reached the end of the input string after parsing
234- the program, and which gives us the program's data structure.
234+ the expression (an Egg program is a single expression), and which
235+ gives us the program's data structure.
235236
236237// include_code strip_log
237238// test: join
@@ -354,9 +355,10 @@ specialForms["if"] = function(args, env) {
354355(((conditional execution)))Egg's `if` construct expects exactly three
355356arguments. It will evaluate the first, and if the result isn't the
356357value `false`, it will evaluate the second. Otherwise, the third gets
357- evaluated. Because this `if` form is an expression, not a statement as
358- it is in JavaScript, it has a value—namely, the result of the second
359- or third argument.
358+ evaluated. This `if` form is more similar to JavaScript's ternary `?:`
359+ operator than to JavaScript's `if`—is an expression, not a statement,
360+ and it produces a value—namely the result of the second or third
361+ argument.
360362
361363(((Boolean)))Egg differs from JavaScript in how it handles the
362364condition value to `if`. It will not treat things like zero or the
0 commit comments