aboutsummaryrefslogtreecommitdiff
path: root/ast.go
diff options
context:
space:
mode:
authorShinichiro Hamaji <shinichiro.hamaji@gmail.com>2015-04-06 17:20:28 +0900
committerShinichiro Hamaji <shinichiro.hamaji@gmail.com>2015-04-06 17:21:15 +0900
commit52e83aa33e2c9b642bcf3cd95db71bdaf8ef7dda (patch)
treeef3607909b6a2a8ad0197c78d726e0ea8819bf63 /ast.go
parent3cd63967f5f6a208de7b706ca45b5415cf8a1474 (diff)
downloadkati-52e83aa33e2c9b642bcf3cd95db71bdaf8ef7dda.tar.gz
Fix testcase/comment_in_command.mk
When you think something is maybe unnecessary, you are almost always wrong.
Diffstat (limited to 'ast.go')
-rw-r--r--ast.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/ast.go b/ast.go
index 8689b70..9cc566e 100644
--- a/ast.go
+++ b/ast.go
@@ -1,6 +1,9 @@
package main
-import "fmt"
+import (
+ "fmt"
+ "strings"
+)
type AST interface {
eval(*Evaluator)
@@ -66,7 +69,7 @@ func (ast *MaybeRuleAST) eval(ev *Evaluator) {
func (ast *MaybeRuleAST) show() {
Log("%s", ast.expr)
for _, cmd := range ast.cmds {
- Log("\t%s", cmd)
+ Log("\t%s", strings.Replace(cmd, "\n", `\n`, -1))
}
}