Added variables

This commit is contained in:
Mike Farah
2021-02-11 10:58:40 +11:00
parent 5c73132c8e
commit 85ec32e3db
9 changed files with 160 additions and 44 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ func popOpToResult(opStack []*token, result []*Operation) ([]*token, []*Operatio
func (p *expressionPostFixerImpl) ConvertToPostfix(infixTokens []*token) ([]*Operation, error) {
var result []*Operation
// surround the whole thing with quotes
var opStack = []*token{&token{TokenType: openBracket}}
var opStack = []*token{{TokenType: openBracket}}
var tokens = append(infixTokens, &token{TokenType: closeBracket})
for _, currentToken := range tokens {