Improve makefile parser
Improve the androidmk makefile parser based on ideas from go/ast and
friends:
- Use type switching instead of the As* mess
- Don't store endPos for every node, compute it based on the last
known position in the node plus the length of the last token
- Store positions as only the offset into the file, and then unpack
them into Line/Column scanner.Position objects later
Change-Id: I87eb6661859951e6c2ea5a85db6229fa5561d615
diff --git a/Android.bp b/Android.bp
index 2777577..344d62b 100644
--- a/Android.bp
+++ b/Android.bp
@@ -216,8 +216,8 @@
name: "androidmk-parser",
pkgPath: "android/soong/androidmk/parser",
srcs: [
+ "androidmk/parser/ast.go",
"androidmk/parser/make_strings.go",
- "androidmk/parser/makething.go",
"androidmk/parser/parser.go",
"androidmk/parser/scope.go",
],