]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/Common/Expression.py
BaseTools: Expression - change from series of if to elif
[mirror_edk2.git] / BaseTools / Source / Python / Common / Expression.py
index c7037dd0d00bcc27ed31ee2ad896d2ebbddc315d..85c1ce9bbc09b0fb081a61357f8ad44002ff5b3f 100644 (file)
@@ -93,18 +93,18 @@ def SplitPcdValueString(String):
     for i, ch in enumerate(String):\r
         if ch == '(':\r
             InParenthesis += 1\r
-        if ch == ')':\r
+        elif ch == ')':\r
             if InParenthesis:\r
                 InParenthesis -= 1\r
             else:\r
                 raise BadExpression(ERR_STRING_TOKEN % Item)\r
-        if ch == '"' and not InSingleQuote:\r
+        elif ch == '"' and not InSingleQuote:\r
             if String[i-1] != '\\':\r
                 InDoubleQuote = not InDoubleQuote\r
-        if ch == "'" and not InDoubleQuote:\r
+        elif ch == "'" and not InDoubleQuote:\r
             if String[i-1] != '\\':\r
                 InSingleQuote = not InSingleQuote\r
-        if ch == ',':\r
+        elif ch == ',':\r
             if InParenthesis or InSingleQuote or InDoubleQuote:\r
                 Item += String[i]\r
                 continue\r