clarify comments

This commit is contained in:
David 2020-12-19 09:45:31 -05:00
parent 0cd38cfd03
commit 9821836b6c

View File

@ -109,9 +109,7 @@ func printExpression(e expression) string {
return strings.TrimSpace(result) return strings.TrimSpace(result)
} }
// evaluation starts at the root, checks the list of operators, // evaluation starts at the root then descends into the sub-expressions.
// then descends into the expressions as precedence demands apply operators to expressions.
func evalLeftToRight(e expression) int { func evalLeftToRight(e expression) int {
var result int var result int
if e.number != 0 { if e.number != 0 {