fermi

A minimalist calculator for estimating with distributions
Log | Files | Refs | README

commit 28fd4f69aae8ebf2a718de0cc6b26e1ed48320da
parent 7ff3b2148e5abc8cdb872faa7d6c1bb680c40d50
Author: NunoSempere <nuno.semperelh@protonmail.com>
Date:   Mon,  8 Jul 2024 17:21:49 -0400

fix issue where cat model.fermi | fermi led to infinite loop

Diffstat:
Mf.go | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/f.go b/f.go @@ -364,6 +364,7 @@ replForLoop: switch { case strings.TrimSpace(new_line_trimmed) == "": /* Empty line case */ + continue replForLoop /* Parenthesis */ case len(words) == 2 && (words[0] == "*" || words[0] == "+" || words[0] == "-" || words[0] == "/") && words[1] == "(": new_stack := runRepl(Stack{old_dist: INIT_DIST, vars: stack.vars}, reader) @@ -392,8 +393,6 @@ replForLoop: fmt.Printf("%s ", words[1]) prettyPrintDist(stack.old_dist) stack.old_dist = INIT_DIST - // fmt.Println() - // continue replForLoop default: op, new_dist, err := parseWordsIntoOpAndDist(words, stack.vars) if err != nil {