androidmk fixes for blueprint update
Blueprint's internal Comment type changed, update androidmk to match. Change-Id: I7ce308cd5879734c1c76e19deef5b08aee377404
This commit is contained in:
@@ -31,14 +31,14 @@ func (f *bpFile) errorf(thing mkparser.MakeThing, s string, args ...interface{})
|
|||||||
orig := thing.Dump()
|
orig := thing.Dump()
|
||||||
s = fmt.Sprintf(s, args...)
|
s = fmt.Sprintf(s, args...)
|
||||||
f.comments = append(f.comments, bpparser.Comment{
|
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,
|
Pos: f.pos,
|
||||||
})
|
})
|
||||||
lines := strings.Split(orig, "\n")
|
lines := strings.Split(orig, "\n")
|
||||||
for _, l := range lines {
|
for _, l := range lines {
|
||||||
f.incPos()
|
f.incPos()
|
||||||
f.comments = append(f.comments, bpparser.Comment{
|
f.comments = append(f.comments, bpparser.Comment{
|
||||||
Comment: "// " + l,
|
Comment: []string{"// " + l},
|
||||||
Pos: f.pos,
|
Pos: f.pos,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -99,7 +99,7 @@ func main() {
|
|||||||
if comment, ok := t.AsComment(); ok {
|
if comment, ok := t.AsComment(); ok {
|
||||||
file.comments = append(file.comments, bpparser.Comment{
|
file.comments = append(file.comments, bpparser.Comment{
|
||||||
Pos: file.pos,
|
Pos: file.pos,
|
||||||
Comment: "//" + comment.Comment,
|
Comment: []string{"//" + comment.Comment},
|
||||||
})
|
})
|
||||||
} else if assignment, ok := t.AsAssignment(); ok {
|
} else if assignment, ok := t.AsAssignment(); ok {
|
||||||
handleAssignment(file, assignment, cond)
|
handleAssignment(file, assignment, cond)
|
||||||
|
Reference in New Issue
Block a user