Kaynağa Gözat

Merge https://git.catrenelle.com/Kevin_Smarts/glife into master

slonon 3 yıl önce
ebeveyn
işleme
27f251c3ea

BIN
tools/qsp-analyser/QSP_Analyser.exe


+ 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.0.0.0")]
-[assembly: AssemblyFileVersion("1.3.2")]
+[assembly: AssemblyVersion("1.3.3.0")]
+[assembly: AssemblyFileVersion("1.3.3")]

+ 12 - 4
tools/qsp-analyser/QSP_Analyser/QSPGameCode.cs

@@ -137,7 +137,7 @@ namespace Analyser
             string extraLine = "";
             while (curLine < linesCount)
             {
-                string line = code.ToArray()[curLine];
+                string line = code.ToArray()[curLine].Trim(WhiteSpace);
                 int pos = 0;
                 while (pos < line.Length)
                 {
@@ -1200,8 +1200,6 @@ namespace Analyser
                                 ibc++;
                             }
                         }
-                        Console.WriteLine(pomvarstr1);
-                        
                         ParseExecInOutputText(pomvarstr1);
                         if (iifpresent)
                             ParseExecInOutputText(pomvarstr2);
@@ -1503,6 +1501,15 @@ namespace Analyser
 				            break;
 				        waitForOperator = true;
 			        }
+//                  I added this piece of code (next 7 lines) so the program could detect function call and the first argument -name of the function / location
+//                  I do not assure that I did it in a proper place, but it seems that it works.
+                    else if ((opStack[1] == (int)QspFunctionType.Func) && (argIndex == 2))
+                    {
+                        AddLocationLink(s, false, true);
+                    }
+                    else if ((opStack[1] == (int)QspFunctionType.Func) && (argIndex == 3) && (s == ","))
+                    {
+                    }
                     else if ((argIndex < args.Count) && types[argIndex])
 			        {
 				        if (!qspAppendToCompiled(ref itemsCount))
@@ -1539,7 +1546,7 @@ namespace Analyser
                             SubmitError("Syntax error", currentLine);
 					        break;
 				        }
-				        if (qspOps[opCode].MinArgsCount > 0)
+				        if (qspOps[opCode].MinArgsCount > argSp)
 				        {
                             SubmitError("Invalid number of arguments", currentLine);
 					        break;
@@ -1889,6 +1896,7 @@ namespace Analyser
                         {
                             pos++;
                         }
+
                     }
                     else if ((block.Length == 0) && (c2 == '"'))
                     {

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

@@ -36,7 +36,7 @@
     <UpdateRequired>false</UpdateRequired>
     <MapFileExtensions>true</MapFileExtensions>
     <ApplicationRevision>0</ApplicationRevision>
-    <ApplicationVersion>1.3.2.%2a</ApplicationVersion>
+    <ApplicationVersion>1.3.3.%2a</ApplicationVersion>
     <UseApplicationTrust>false</UseApplicationTrust>
     <PublishWizardCompleted>true</PublishWizardCompleted>
     <BootstrapperEnabled>true</BootstrapperEnabled>
@@ -57,6 +57,7 @@
     <DefineConstants>TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
+    <RunCodeAnalysis>true</RunCodeAnalysis>
   </PropertyGroup>
   <ItemGroup>
     <Reference Include="System" />