androidmk fixes for blueprint update

Blueprint's internal Comment type changed, update androidmk to
match.

Change-Id: I7ce308cd5879734c1c76e19deef5b08aee377404
This commit is contained in:
Colin Cross 2015-03-20 17:53:26 -07:00
parent 62ec5f4eb3
commit 7601ef600a

View file

@ -31,14 +31,14 @@ func (f *bpFile) errorf(thing mkparser.MakeThing, s string, args ...interface{})
orig := thing.Dump()
s = fmt.Sprintf(s, args...)
f.comments = append(f.comments, bpparser.Comment{
Comment: fmt.Sprintf("// ANDROIDMK TRANSLATION ERROR: %s", s),
Comment: []string{fmt.Sprintf("// ANDROIDMK TRANSLATION ERROR: %s", s)},
Pos: f.pos,
})
lines := strings.Split(orig, "\n")
for _, l := range lines {
f.incPos()
f.comments = append(f.comments, bpparser.Comment{
Comment: "// " + l,
Comment: []string{"// " + l},
Pos: f.pos,
})
}
@ -99,7 +99,7 @@ func main() {
if comment, ok := t.AsComment(); ok {
file.comments = append(file.comments, bpparser.Comment{
Pos: file.pos,
Comment: "//" + comment.Comment,
Comment: []string{"//" + comment.Comment},
})
} else if assignment, ok := t.AsAssignment(); ok {
handleAssignment(file, assignment, cond)