From 395d17cbb81038afbb6ee5b77e9a578b98d8beff Mon Sep 17 00:00:00 2001 From: Ben Matasar Date: Tue, 1 Mar 2016 13:52:03 -0800 Subject: [PATCH] Don't panic if the first expression is @ I'm just learning go, so if I did something obviously stupid lemme know. --- compute/compute.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compute/compute.go b/compute/compute.go index c04126b..15fd8d3 100644 --- a/compute/compute.go +++ b/compute/compute.go @@ -28,7 +28,7 @@ ScanLoop: for { _, tok, lit := s.Scan() - if lit != "@" && back > -1 { + if lit != "@" && back > -1 && len(resHistory) > 0 { floats.Push(getHistory(back)) if prev == token.RPAREN || constants.IsConstant(prev.String()) { evalUnprecedenced("*", ops, floats)