1. Fix a bug when supporting parsing multiple lines of one string
authorhche10x <hche10x@7335b38e-4728-0410-8992-fb3ffe349368>
Wed, 20 Feb 2008 03:29:52 +0000 (03:29 +0000)
committerhche10x <hche10x@7335b38e-4728-0410-8992-fb3ffe349368>
Wed, 20 Feb 2008 03:29:52 +0000 (03:29 +0000)
git-svn-id: https://buildtools.tianocore.org/svn/buildtools/trunk/BaseTools@1008 7335b38e-4728-0410-8992-fb3ffe349368

Source/Python/AutoGen/UniClassObject.py

index 8660465..e2bf76a 100644 (file)
@@ -311,9 +311,10 @@ class UniFileClassObject(object):
                         break\r
                     elif Lines[IndexJ].find(u'#string ') < 0 and Lines[IndexJ].find(u'#language ') >= 0:\r
                         StringItem = StringItem + Lines[IndexJ]\r
-                    elif Lines[IndexJ].find(u'\"') >= 2:\r
+                    elif Lines[IndexJ].count(u'\"') >= 2:\r
                         StringItem = StringItem[ : StringItem.rfind(u'\"')] + Lines[IndexJ][Lines[IndexJ].find(u'\"') + len(u'\"') : ]\r
                 self.GetStringObject(StringItem)\r
+                continue\r
 \r
     #\r
     # Load multiple .uni files\r
@@ -438,6 +439,7 @@ class UniFileClassObject(object):
 # This acts like the main() function for the script, unless it is 'import'ed into another\r
 # script.\r
 if __name__ == '__main__':\r
+    EdkLogger.Initialize()\r
     EdkLogger.SetLevel(EdkLogger.DEBUG_0)\r
     a = UniFileClassObject(['C:\\Edk\\Strings.uni', 'C:\\Edk\\Strings2.uni'])\r
     a.ReToken()\r