Handle include statements with trailing whitespace

Fixes: 303832950
Test: go test
Change-Id: I919556ee43a60f59dbd7c040025f01abb53da2a8
This commit is contained in:
Cole Faust
2023-10-06 11:53:50 -07:00
parent affbb8d206
commit b0b2457842
2 changed files with 27 additions and 0 deletions

View File

@@ -941,6 +941,8 @@ func (p *inheritProductCallParser) parse(ctx *parseContext, v mkparser.Node, arg
func (ctx *parseContext) handleInclude(v *mkparser.Directive) []starlarkNode {
loadAlways := v.Name[0] != '-'
v.Args.TrimRightSpaces()
v.Args.TrimLeftSpaces()
return ctx.handleSubConfig(v, ctx.parseMakeString(v, v.Args), loadAlways, func(im inheritedModule) starlarkNode {
return &includeNode{im, loadAlways}
})