aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/LexGen.py
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2021-05-06 14:20:14 +1000
committerNeil <nyamatongwe@gmail.com>2021-05-06 14:20:14 +1000
commit43e81343caba072317c0141ef30fc75b3cedab0f (patch)
tree65452b2c82acede81e173b4538ade9da9a89e277 /scripts/LexGen.py
parent4c8fd05007555bca62f5b4647395a8669f9f4e78 (diff)
downloadscintilla-mirror-43e81343caba072317c0141ef30fc75b3cedab0f.tar.gz
Remove dead code and imports as found by Vulture.
https://github.com/jendrikseipp/vulture
Diffstat (limited to 'scripts/LexGen.py')
-rw-r--r--scripts/LexGen.py22
1 files changed, 4 insertions, 18 deletions
diff --git a/scripts/LexGen.py b/scripts/LexGen.py
index f40efce04..416f69c2d 100644
--- a/scripts/LexGen.py
+++ b/scripts/LexGen.py
@@ -2,21 +2,16 @@
# LexGen.py - implemented 2002 by Neil Hodgson neilh@scintilla.org
# Released to the public domain.
-# Regenerate the Scintilla source files that list all the lexers.
-# Should be run whenever a new lexer is added or removed.
+# Update Scintilla files.
+# Update version numbers and modification dates in documentation and header files.
+# Update make dependencies.
# Requires Python 3.6 or later
-# Files are regenerated in place with templates stored in comments.
-# The format of generation comments is documented in FileGenerator.py.
-# Also updates version numbers and modification dates.
-from FileGenerator import Regenerate, UpdateLineInFile, \
- ReplaceREInFile, UpdateLineInPlistFile, ReadFileAsList, UpdateFileFromLines, \
- FindSectionInList
+from FileGenerator import UpdateLineInFile, ReplaceREInFile, UpdateLineInPlistFile
import ScintillaData
import HFacer
import os
import pathlib
-import uuid
import sys
baseDirectory = os.path.dirname(os.path.dirname(ScintillaData.__file__))
@@ -61,13 +56,6 @@ def UpdateVersionNumbers(sci, root):
"CURRENT_PROJECT_VERSION = [0-9.]+;",
f'CURRENT_PROJECT_VERSION = {sci.versionDotted};')
-# Last 24 digits of UUID, used for item IDs in Xcode
-def uid24():
- return str(uuid.uuid4()).replace("-", "").upper()[-24:]
-
-def ciLexerKey(a):
- return a.split()[2].lower()
-
def RegenerateAll(rootDirectory):
root = pathlib.Path(rootDirectory)
@@ -76,8 +64,6 @@ def RegenerateAll(rootDirectory):
sci = ScintillaData.ScintillaData(scintillaBase)
- Regenerate(scintillaBase / "win32/scintilla.mak", "#", sci.lexFiles)
-
startDir = os.getcwd()
os.chdir(os.path.join(scintillaBase, "win32"))
win32.DepGen.Generate()