Merge pull request #8578 from erikh/fix_slash

builder: Handle trailing \ appropriately.
Upstream-commit: 9a827137725d13dbe14c577df40dc35d061152b3
Component: engine
This commit is contained in:
Michael Crosby
2014-10-15 12:11:37 -07:00
3 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ type Node struct {
var (
dispatch map[string]func(string) (*Node, map[string]bool, error)
TOKEN_WHITESPACE = regexp.MustCompile(`[\t\v\f\r ]+`)
TOKEN_LINE_CONTINUATION = regexp.MustCompile(`\\$`)
TOKEN_LINE_CONTINUATION = regexp.MustCompile(`\\\s*$`)
TOKEN_COMMENT = regexp.MustCompile(`^#.*$`)
)
@@ -14,6 +14,7 @@ RUN echo hello \
goodbye\
frog
RUN echo hello \
world
RUN echo hi \
\
world \
@@ -3,7 +3,7 @@
(run "echo hello world")
(run "echo hello world")
(run "echo hello goodbyefrog")
(run "echo hello \\")
(run "echo hello world")
(run "echo hi world goodnight")
(run "echo goodbyefrog")
(run "echo goodbyefrog")