| commit | 08693d2bf26e443bf9e0303b91a7cfc7e7e27e65 | [log] [tgz] |
|---|---|---|
| author | Colin Cross <ccross@android.com> | Wed May 25 17:25:40 2016 -0700 |
| committer | Colin Cross <ccross@android.com> | Thu May 26 03:34:30 2016 +0000 |
| tree | 50ab2f53ec443aa558d2eb28ae7bf7c79fd3b54d | |
| parent | 7fd911f713937029ec9a61602b2086c05a672b96 [diff] |
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