(len - 1); l >= 0; l--) {
- unsigned char indexChar = words[l][0];
+ unsigned char const indexChar = words[l][0];
starts[indexChar] = l;
}
return true;
diff --git a/lexilla/scripts/LexillaData.py b/lexilla/scripts/LexillaData.py
index 0a519613e..4b1cc8b84 100644
--- a/lexilla/scripts/LexillaData.py
+++ b/lexilla/scripts/LexillaData.py
@@ -49,17 +49,17 @@ def FindModules(lexFile):
partLine = ""
with lexFile.open(encoding=neutralEncoding) as f:
lineNum = 0
- for l in f.readlines():
+ for line in f.readlines():
lineNum += 1
- l = l.rstrip()
- if partLine or l.startswith("LexerModule"):
- if ")" in l:
- l = partLine + l
- original = l
- l = l.replace("(", " ")
- l = l.replace(")", " ")
- l = l.replace(",", " ")
- parts = l.split()
+ line = line.rstrip()
+ if partLine or line.startswith("LexerModule"):
+ if ")" in line:
+ line = partLine + line
+ original = line
+ line = line.replace("(", " ")
+ line = line.replace(")", " ")
+ line = line.replace(",", " ")
+ parts = line.split()
lexerName = parts[4]
if not (lexerName.startswith('"') and lexerName.endswith('"')):
print(f"{lexFile}:{lineNum}: Bad LexerModule statement:\n{original}")
@@ -68,7 +68,7 @@ def FindModules(lexFile):
modules.append([parts[1], parts[2], lexerName])
partLine = ""
else:
- partLine = partLine + l
+ partLine = partLine + line
return modules
def FindLexersInXcode(xCodeProject):
@@ -114,11 +114,11 @@ knownIrregularProperties = [
def FindProperties(lexFile):
properties = {}
with open(lexFile, encoding=neutralEncoding) as f:
- for l in f.readlines():
- if ("GetProperty" in l or "DefineProperty" in l) and "\"" in l:
- l = l.strip()
- if not l.startswith("//"): # Drop comments
- propertyName = l.split("\"")[1]
+ for s in f.readlines():
+ if ("GetProperty" in s or "DefineProperty" in s) and "\"" in s:
+ s = s.strip()
+ if not s.startswith("//"): # Drop comments
+ propertyName = s.split("\"")[1]
if propertyName.lower() == propertyName:
# Only allow lower case property names
if propertyName in knownIrregularProperties or \
@@ -131,36 +131,36 @@ def FindPropertyDocumentation(lexFile):
documents = {}
with lexFile.open(encoding=neutralEncoding) as f:
name = ""
- for l in f.readlines():
- l = l.strip()
- if "// property " in l:
- propertyName = l.split()[2]
+ for line in f.readlines():
+ line = line.strip()
+ if "// property " in line:
+ propertyName = line.split()[2]
if propertyName.lower() == propertyName:
# Only allow lower case property names
name = propertyName
documents[name] = ""
- elif "DefineProperty" in l and "\"" in l:
- propertyName = l.split("\"")[1]
+ elif "DefineProperty" in line and "\"" in line:
+ propertyName = line.split("\"")[1]
if propertyName.lower() == propertyName:
# Only allow lower case property names
name = propertyName
documents[name] = ""
elif name:
- if l.startswith("//"):
+ if line.startswith("//"):
if documents[name]:
documents[name] += " "
- documents[name] += l[2:].strip()
- elif l.startswith("\""):
- l = l[1:].strip()
- if l.endswith(";"):
- l = l[:-1].strip()
- if l.endswith(")"):
- l = l[:-1].strip()
- if l.endswith("\""):
- l = l[:-1]
+ documents[name] += line[2:].strip()
+ elif line.startswith("\""):
+ line = line[1:].strip()
+ if line.endswith(";"):
+ line = line[:-1].strip()
+ if line.endswith(")"):
+ line = line[:-1].strip()
+ if line.endswith("\""):
+ line = line[:-1]
# Fix escaped double quotes
- l = l.replace("\\\"", "\"")
- documents[name] += l
+ line = line.replace("\\\"", "\"")
+ documents[name] += line
else:
name = ""
for name in list(documents.keys()):
@@ -172,15 +172,15 @@ def FindCredits(historyFile):
credits = []
stage = 0
with historyFile.open(encoding="utf-8") as f:
- for l in f.readlines():
- l = l.strip()
- if stage == 0 and l == "":
+ for line in f.readlines():
+ line = line.strip()
+ if stage == 0 and line == "":
stage = 1
- elif stage == 1 and l == "
":
+ elif stage == 1 and line == "
":
stage = 2
- if stage == 1 and l.startswith(""):
- credit = l[4:-5]
- if ""):
+ credit = line[4:-5]
+ if "")
name = end.split("<")[0]
@@ -195,19 +195,19 @@ def FindCredits(historyFile):
def ciKey(a):
return str(a).lower()
-def SortListInsensitive(l):
- l.sort(key=ciKey)
+def SortListInsensitive(list):
+ list.sort(key=ciKey)
class LexillaData:
def __init__(self, scintillaRoot):
# Discover version information
self.version = (scintillaRoot / "version.txt").read_text().strip()
- self.versionDotted = self.version[0] + '.' + self.version[1] + '.' + \
- self.version[2]
+ self.versionDotted = self.version[0:-2] + '.' + self.version[-2] + '.' + \
+ self.version[-1]
self.versionCommad = self.versionDotted.replace(".", ", ") + ', 0'
with (scintillaRoot / "doc" / "Lexilla.html").open() as f:
- self.dateModified = [l for l in f.readlines() if "Date.Modified" in l]\
+ self.dateModified = [d for d in f.readlines() if "Date.Modified" in d]\
[0].split('\"')[3]
# 20130602
# Lexilla.html
diff --git a/lexilla/scripts/LexillaGen.cmd b/lexilla/scripts/LexillaGen.cmd
index 0a3e63bbb..b9cb2aaae 100644
--- a/lexilla/scripts/LexillaGen.cmd
+++ b/lexilla/scripts/LexillaGen.cmd
@@ -10,9 +10,9 @@ pushd %_THISDIR_%
set _EXITCODE_=0
-set _PYTHON_EXE=d:\DEV\Python_Embed_311_x64\python.exe
+::set _PYTHON_EXE=d:\DEV\Python_Embed_311_x64\python.exe
rem call :RESOLVE_PATH _PYTHON_EXE "%_THISDIR_%..\..\..\..\_python_emb\python.exe"
-rem set _PYTHON_EXE=python.exe
+set _PYTHON_EXE=python.exe
set _CMD_="%_PYTHON_EXE%" "%~dpn0.py"
echo.Calling: %_CMD_%
diff --git a/lexilla/scripts/LexillaGen.py b/lexilla/scripts/LexillaGen.py
index eb7e718ca..48331a0c1 100644
--- a/lexilla/scripts/LexillaGen.py
+++ b/lexilla/scripts/LexillaGen.py
@@ -106,7 +106,7 @@ def RegenerateAll(rootDirectory):
# Discover version information
version = (lexillaDir / "version.txt").read_text().strip()
- versionDotted = version[0] + '.' + version[1] + '.' + version[2]
+ versionDotted = version[0:-2] + '.' + version[-2] + '.' + version[-1]
versionCommad = versionDotted.replace(".", ", ") + ', 0'
rcPath = srcDir / "LexillaVersion.rc"
@@ -117,7 +117,7 @@ def RegenerateAll(rootDirectory):
UpdateLineInFile(docDir / "LexillaDownload.html", " Release",
" Release " + versionDotted)
ReplaceREInFile(docDir / "LexillaDownload.html",
- r"/www.scintilla.org/([a-zA-Z]+)\d\d\d",
+ r"/www.scintilla.org/([a-zA-Z]+)\d{3,5}",
r"/www.scintilla.org/\g<1>" + version,
0)
diff --git a/src/StyleLexers/styleLexBAT.c b/src/StyleLexers/styleLexBAT.c
index 8c0720101..92c381264 100644
--- a/src/StyleLexers/styleLexBAT.c
+++ b/src/StyleLexers/styleLexBAT.c
@@ -30,6 +30,7 @@ EDITLEXER lexBAT =
{ {SCE_BAT_OPERATOR}, IDS_LEX_STR_Operator, L"Operator", L"fore:#B000B0", L"" },
{ {MULTI_STYLE(SCE_BAT_COMMAND,SCE_BAT_HIDE,0,0)}, IDS_LEX_STR_Cmd, L"Command", L"bold", L"" },
{ {SCE_BAT_LABEL}, IDS_LEX_STR_Label, L"Label", L"fore:#C80000; back:#F4F4F4; eolfilled", L"" },
+ { {SCE_BAT_AFTER_LABEL}, IDS_LEX_STR_AfterLabel, L"After Label", L"fore:#00ACAC;", L"" },
EDITLEXER_SENTINEL
}
};
|