Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

Commit

Permalink
Don't panic if the first expression is @
Browse files Browse the repository at this point in the history
I'm just learning go, so if I did something obviously stupid lemme know.
  • Loading branch information
matasar committed Mar 1, 2016
1 parent 1a308a3 commit 395d17c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compute/compute.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 395d17c

Please sign in to comment.