diff options
| author | mitchell <unknown> | 2020-05-09 16:59:30 -0400 | 
|---|---|---|
| committer | mitchell <unknown> | 2020-05-09 16:59:30 -0400 | 
| commit | 828770f0d1ed635d4ab43ad6d0cf0ae36f339cb0 (patch) | |
| tree | b6996eba4adf8a33038f341d541e5ec19146d90e /scripts | |
| parent | 49201487ef7048cf82b2421ef7954fc6a899f42b (diff) | |
| download | scintilla-mirror-828770f0d1ed635d4ab43ad6d0cf0ae36f339cb0.tar.gz | |
Updated generation scripts for LongTerm3 use.
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/FileGenerator.py | 4 | ||||
| -rw-r--r-- | scripts/LexGen.py | 15 | ||||
| -rw-r--r-- | scripts/ScintillaData.py | 3 | 
3 files changed, 17 insertions, 5 deletions
diff --git a/scripts/FileGenerator.py b/scripts/FileGenerator.py index 3e9662632..f52f55948 100644 --- a/scripts/FileGenerator.py +++ b/scripts/FileGenerator.py @@ -214,8 +214,8 @@ def FindSectionInList(lines, markers):          raise Exception("Could not find end marker " + markers[2])      return slice(start, end) -def ReplaceREInFile(path, match, replace): +def ReplaceREInFile(path, match, replace, count=0):      with codecs.open(path, "r", "utf-8") as f:          contents = f.read() -    contents = re.sub(match, replace, contents) +    contents = re.sub(match, replace, contents, count)      UpdateFile(path, contents) diff --git a/scripts/LexGen.py b/scripts/LexGen.py index 0494286b3..794ffaa82 100644 --- a/scripts/LexGen.py +++ b/scripts/LexGen.py @@ -37,8 +37,8 @@ def UpdateVersionNumbers(sci, root):      UpdateLineInFile(root + "doc/ScintillaDownload.html", "       Release",          "       Release " + sci.versionDotted)      ReplaceREInFile(root + "doc/ScintillaDownload.html", -        r"/www.scintilla.org/([a-zA-Z]+)\d\d\d\d?", -        r"/www.scintilla.org/\g<1>" +  sci.version) +        r"(/sourceforge.net/projects/scintilla/files/scintilla/)[\d\.]+(/[a-zA-Z]+)\d+", +        r"\g<1>" +  sci.versionDotted + "\g<2>" + sci.version)      UpdateLineInFile(root + "doc/index.html",          '          <font color="#FFCC99" size="3"> Release version',          '          <font color="#FFCC99" size="3"> Release version ' +\ @@ -46,6 +46,12 @@ def UpdateVersionNumbers(sci, root):      UpdateLineInFile(root + "doc/index.html",          '           Site last modified',          '           Site last modified ' + sci.mdyModified + '</font>') +    ReplaceREInFile(root + "doc/ScintillaHistory.html", +        r"(/sourceforge.net/projects/scintilla/files/scintilla/)[\d\.]+(/[a-zA-Z]+)\d+", +        r"\g<1>" +  sci.versionDotted + "\g<2>" + sci.version, +        count=1) +    ReplaceREInFile(root + "doc/ScintillaHistory.html", +        r">Release [\d\.]+<", ">Release " + sci.versionDotted + "<", count=1)      UpdateLineInFile(root + "doc/ScintillaHistory.html",          '	Released ',          '	Released ' + sci.dmyModified + '.') @@ -53,6 +59,11 @@ def UpdateVersionNumbers(sci, root):          "CFBundleVersion", sci.versionDotted)      UpdateLineInPlistFile(root + "cocoa/ScintillaFramework/Info.plist",          "CFBundleShortVersionString", sci.versionDotted) +    UpdateLineInFile(root + "LongTermDownload.html", "       Release", +        "       Release " + sci.versionDotted) +    ReplaceREInFile(root + "LongTermDownload.html", +        r"(/sourceforge.net/projects/scintilla/files/scintilla/)[\d\.]+(/[a-zA-Z]+)\d+", +        r"\g<1>" +  sci.versionDotted + "\g<2>" + sci.version)  # Last 24 digits of UUID, used for item IDs in Xcode  def uid24(): diff --git a/scripts/ScintillaData.py b/scripts/ScintillaData.py index 385db59af..b0a68ed16 100644 --- a/scripts/ScintillaData.py +++ b/scripts/ScintillaData.py @@ -237,7 +237,8 @@ class ScintillaData:              for module in modules:                  self.sclexFromName[module[2]] = module[1]                  self.fileFromSclex[module[1]] = lexFile -                self.lexerModules.append(module[0]) +                if module[0] not in self.lexerModules: +                    self.lexerModules.append(module[0])              for k in FindProperties(lexFile).keys():                  lexerProperties.add(k)              documents = FindPropertyDocumentation(lexFile)  | 
