Fixed bug #12703: t3editor/codecompletion: parser error on opening brackets on the...
authorTobias Liebig <mail@etobi.de>
Fri, 18 Dec 2009 16:09:57 +0000 (16:09 +0000)
committerTobias Liebig <mail@etobi.de>
Fri, 18 Dec 2009 16:09:57 +0000 (16:09 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@6679 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/t3editor/jslib/ts_codecompletion/tsparser.js

index 8f4d0b4..4b5b6ab 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-12-18  Tobias Liebig <mail_typo3@etobi.de>
+
+       * Fixed bug #12703: t3editor/codecompletion: parser error on opening brackets on the right side of an operator
+
 2009-12-18  Francois Suter  <francois@typo3.org>
 
        * Fixed bug #12955: Missing -R option in chmod command in INSTALL.txt (thanks to Patrick Nussbaumer)
index 87515df..3f97596 100644 (file)
@@ -204,11 +204,13 @@ var TsParser = function(tsRef,extTsObjTree){
                                if (node[0] == '/' && node[1]=='*') {
                                        stack.push('/*');
                                }
-                               if (node    == '{') {
+                               if (node == '{') {
                                        // TODO: ignore whole block if wrong whitespaces in this line
-                                       stack.push('{');
-                                       prefixes.push(line.strip());
-                                       ignoreLine = true;
+                                       if (getOperator(line)==-1) {
+                                               stack.push('{');
+                                               prefixes.push(line.strip());
+                                               ignoreLine = true;
+                                       }
                                }
                                // TODO: conditions
                                // if condition starts -> ignore everything until end of condition