MCPcopy Create free account
hub / github.com/nodejs/node / ExpandMacros

Function ExpandMacros

tools/gyp/pylib/gyp/msvs_emulation.py:1090–1097  ·  view source on GitHub ↗

Expand $(Variable) per expansions dict. See MsvsSettings.GetVSMacroEnv for the canonical way to retrieve a suitable dict.

(string, expansions)

Source from the content-addressed store, hash-verified

1088
1089
1090def ExpandMacros(string, expansions):
1091 """Expand $(Variable) per expansions dict. See MsvsSettings.GetVSMacroEnv
1092 for the canonical way to retrieve a suitable dict."""
1093 if "$" in string:
1094 for old, new in expansions.items():
1095 assert "$(" not in new, new
1096 string = string.replace(old, new)
1097 return string
1098
1099
1100def _ExtractImportantEnvironment(output_of_set):

Callers 2

ConvertVSMacrosMethod · 0.85

Calls 1

itemsMethod · 0.45

Tested by

no test coverage detected