parameters: (string, expansions)
return_statement: return string
docstring: Expand $(Variable) per expansions dict. See MsvsSettings.GetVSMacroEnv
    for the canonical way to retrieve a suitable dict.
docstring_summary: Expand $(Variable) per expansions dict. See MsvsSettings.GetVSMacroEnv
    for the canonical way to retrieve a suitable dict.
docstring_tokens: Expand $ ( Variable ) per expansions dict . See MsvsSettings . GetVSMacroEnv for the canonical way to retrieve a suitable dict .
function: def ExpandMacros(string, expansions):
    """Expand $(Variable) per expansions dict. See MsvsSettings.GetVSMacroEnv
    for the canonical way to retrieve a suitable dict."""
    if '$' in string:
      for old, new in expansions.iteritems():
        assert '$(' not in new, new
        string = string.replace(old, new)
    return string
function_tokens: def ExpandMacros ( string , expansions ) : if '$' in string : for old , new in expansions . iteritems ( ) : assert '$(' not in new , new string = string . replace ( old , new ) return string