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 | 0539c21fbdae6944212ff15e6e16bad4f3ef582c (patch) | |
tree | a21b3659082224a33aae444b7006bcf4345f78e5 | |
parent | 13c2132e903d27712cb9e6137fb137c1455d75ed (diff) | |
download | scintilla-mirror-0539c21fbdae6944212ff15e6e16bad4f3ef582c.tar.gz |
Fix to work when there are no provisional features.
-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): |