Bladeren bron

add ability to detect colon after else

rachels 3 jaren geleden
bovenliggende
commit
d10f13682d

BIN
tools/qsp-analyser/QSP_Analyser.exe


+ 3 - 3
tools/qsp-analyser/QSP_Analyser/Common.cs

@@ -739,14 +739,14 @@ namespace Analyser
             {
                 for (int j = 0; j < qspOpsNamesCounts[i]; j++)
                 {
-                    if ((name.Equals(qspOpsNames[i, j].Name)) && 
+                    if ((name.Equals(qspOpsNames[i, j].Name)) &&
                         (!functionsOnly || (qspOpsNames[i, j].Code >= (int)QspFunctionType.First_Function)))
                         return qspOpsNames[i, j].Code;
                 }
             }
             return (int)QspFunctionType.Unknown;
         }
-        
+
         static public QspVariable GetVar(string name)
         {
             foreach (QspVariable var in vars)
@@ -1436,7 +1436,7 @@ namespace Analyser
                                     }
                                 }
 
-                                if ((csv_line == null) || (csvLineCompleted && 
+                                if ((csv_line == null) || (csvLineCompleted &&
                                     ((csvLocName != locName) || (quoted_line_counter != csvLineIndex) || (csvOriginalLine != quotedText))))
                                 {
                                     SubmitError("CSV-file does not match the original! Generate it again.", INVALID_INDEX);

+ 2 - 2
tools/qsp-analyser/QSP_Analyser/Properties/AssemblyInfo.cs

@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
 // You can specify all the values or you can default the Build and Revision Numbers 
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.3.3.0")]
-[assembly: AssemblyFileVersion("1.3.3")]
+[assembly: AssemblyVersion("1.3.3.2")]
+[assembly: AssemblyFileVersion("1.3.3.2")]

+ 5 - 1
tools/qsp-analyser/QSP_Analyser/QSPGameCode.cs

@@ -587,6 +587,11 @@ namespace Analyser
                                 return false;
                             }
                         }
+                        else if ((c == ':') && (block == "else"))
+                        {
+                            SubmitError("ELSE with :", lineNum);
+                            return false;
+                        }
                         else if ((c == ':') && (controlBlock == (int)ControlBlockType.ActCondition))
                         {
                             //Разбор аргумента
@@ -1896,7 +1901,6 @@ namespace Analyser
                         {
                             pos++;
                         }
-
                     }
                     else if ((block.Length == 0) && (c2 == '"'))
                     {

+ 1 - 1
tools/qsp-analyser/QSP_Analyser/QSP_Analyser.csproj

@@ -35,7 +35,7 @@
     <UpdatePeriodically>false</UpdatePeriodically>
     <UpdateRequired>false</UpdateRequired>
     <MapFileExtensions>true</MapFileExtensions>
-    <ApplicationRevision>1</ApplicationRevision>
+    <ApplicationRevision>2</ApplicationRevision>
     <ApplicationVersion>1.3.3.%2a</ApplicationVersion>
     <UseApplicationTrust>false</UseApplicationTrust>
     <PublishWizardCompleted>true</PublishWizardCompleted>