clarify comments
This commit is contained in:
parent
0cd38cfd03
commit
9821836b6c
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user