handle command counts efficiently

Related #66
This commit is contained in:
Gokcehan committed 2018-04-12 18:04:37 +03:00
1 parent 0175c1bd1b
commit 03619c3cbb
6 files changed
+116 -108

No files matched your search

+4 -3
View File
@@ -72,8 +72,9 @@ type cmdExpr struct {
func (e *cmdExpr) String() string { return fmt.Sprintf("cmd %s %s", e.name, e.expr) }
type callExpr struct {
name string
args []string
name string
args []string
count int
}
func (e *callExpr) String() string { return fmt.Sprintf("%s -- %s", e.name, e.args) }
@@ -230,7 +231,7 @@ func (p *parser) parseExpr() expr {
s.scan()
result = &callExpr{name, args}
result = &callExpr{name, args, 1}
}
case tokenColon:
s.scan()