Prettier printing.
This commit is contained in:
parent
8a218f35c0
commit
467d1d3d44
5 changed files with 73 additions and 26 deletions
4
parse.go
4
parse.go
|
|
@ -76,7 +76,7 @@ func parseInto(input string, name string, rules *ruleSet) {
|
|||
|
||||
// insert a dummy newline to allow parsing of any assignments or recipeless
|
||||
// rules to finish.
|
||||
state = state(p, token{tokenNewline, "\n", l.line})
|
||||
state = state(p, token{tokenNewline, "\n", l.line, l.col})
|
||||
|
||||
// TODO: Error when state != parseTopLevel
|
||||
}
|
||||
|
|
@ -339,7 +339,7 @@ func parseRecipe(p *parser, t token) parserStateFun {
|
|||
}
|
||||
|
||||
if t.typ == tokenRecipe {
|
||||
r.recipe = t.val
|
||||
r.recipe = stripIndentation(t.val, t.col)
|
||||
}
|
||||
|
||||
p.rules.add(r)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue