Selaa lähdekoodia

Add ISPP's {#CompilerPath} and {#SourcePath} to autocomplete. Would like to add {#__FILENAME__}, {#__PATHFILENAME__} and {#__DIR__} as well, but not with those names: too ugly + wouldnt be grouped together + not clear enough that they only apply to include files. So should think of new names before adding them.

Martijn Laan 3 kuukautta sitten
vanhempi
commit
5cb999d551
1 muutettua tiedostoa jossa 9 lisäystä ja 2 poistoa
  1. 9 2
      Projects/Src/IDE.ScintStylerInnoSetup.pas

+ 9 - 2
Projects/Src/IDE.ScintStylerInnoSetup.pas

@@ -387,8 +387,7 @@ const
   ];
 
   Constants: array of AnsiString = [
-    { #emit and #file handled separately by BuildConstantsWordList.
-      Also doesnt include constants with non words chars. }
+    { Doesnt include constants with non words chars }
     '{', 'app', 'win', 'sys', 'sysnative', 'syswow64', 'src', 'sd', 'commonpf',
     'commoncf', 'tmp', 'commonfonts', 'dao', 'dotnet11', 'dotnet20', 'dotnet40',
     'group', 'localappdata', 'userappdata', 'commonappdata', 'usercf',
@@ -402,6 +401,12 @@ const
     'userinfoorg', 'userinfoserial', 'username', 'log'
   ];
 
+  ISPPPredefinedVariables: array of AnsiString = [
+    { #emit and #file handled separately by BuildConstantsWordList.
+      Only includes predefined variables that are useful on their own. }
+    'CompilerPath', 'SourcePath'
+  ];
+
   PascalConstants: array of AnsiString = [
     { ROPS }
     'varEmpty', 'varNull', 'varSmallInt', 'varInteger', 'varSingle', 'varDouble',
@@ -876,6 +881,8 @@ begin
     if ISPPInstalled then begin
       AddWordToList(SL, '{#', awtConstant);
       AddWordToList(SL, '{#file ', awtConstant);
+      for var ISPPPredefinedVariable in ISPPPredefinedVariables do
+        AddWordToList(SL, '{#' + ISPPPredefinedVariable + '}', awtConstant);
     end;
     for var ConstantWithParam in ConstantsWithParam do
       AddWordToList(SL, '{' + ConstantWithParam, awtConstant);