Refactor standard and rewrite properties to reduce duplication

Refactor calls to standardProperties and rewriteProperties into
translateSingleProperty that can be used for normal, suffix, and
target properties.

Change-Id: I04e060588d4feeba1da7802d68622fe9b20e2c8b
This commit is contained in:
Colin Cross
2015-07-07 12:22:51 -07:00
parent aee540a439
commit 3cc00f1fd8
2 changed files with 60 additions and 81 deletions

View File

@@ -64,7 +64,7 @@ var standardProperties = map[string]struct {
var rewriteProperties = map[string]struct {
string
f func(name string, prop *bpparser.Property, suffix *string) ([]string, error)
f func(name string, prop *bpparser.Property, val string) (propAssignment, error)
}{
"include_dirs": {"LOCAL_C_INCLUDES", appendAssign},
"local_include_dirs": {"LOCAL_C_INCLUDES", prependLocalPath},