diff options
author | Neil <nyamatongwe@gmail.com> | 2014-02-05 10:10:04 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2014-02-05 10:10:04 +1100 |
commit | a40d56039f8f98b0ab9714410c5553faa2f8ecec (patch) | |
tree | 56496fb8b1c81589ce56bc9c7829e14e6176592d /scripts | |
parent | e35076efb13a7287b79a62ec67a1df3ab8022be8 (diff) | |
download | scintilla-mirror-a40d56039f8f98b0ab9714410c5553faa2f8ecec.tar.gz |
Fix to work when there are no provisional features.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/HFacer.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/HFacer.py b/scripts/HFacer.py index 819181f78..ed36df4ea 100755 --- a/scripts/HFacer.py +++ b/scripts/HFacer.py @@ -22,11 +22,13 @@ def printLexHFile(f): def printHFile(f): out = [] previousCategory = "" + anyProvisional = False for name in f.order: v = f.features[name] if v["Category"] != "Deprecated": if v["Category"] == "Provisional" and previousCategory != "Provisional": out.append("#ifndef SCI_DISABLE_PROVISIONAL") + anyProvisional = True previousCategory = v["Category"] if v["FeatureType"] in ["fun", "get", "set"]: featureDefineName = "SCI_" + name.upper() @@ -37,7 +39,8 @@ def printHFile(f): elif v["FeatureType"] in ["val"]: if not ("SCE_" in name or "SCLEX_" in name): out.append("#define " + name + " " + v["Value"]) - out.append("#endif") + if anyProvisional: + out.append("#endif") return out def RegenerateAll(root, showMaxID): |