From 24ac7c2923e2de7bc3d60679e7b6755f7a7077f3 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sat, 19 Jan 2013 13:27:58 +1100 Subject: Implement provisional category and place Unicode line ends and substyles into it. --- include/HFacer.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/HFacer.py') diff --git a/include/HFacer.py b/include/HFacer.py index 074ce96be..aa6b0f0a2 100755 --- a/include/HFacer.py +++ b/include/HFacer.py @@ -20,9 +20,13 @@ def printLexHFile(f,out): out.write("#define " + name + " " + v["Value"] + "\n") def printHFile(f,out): + previousCategory = "" for name in f.order: v = f.features[name] if v["Category"] != "Deprecated": + if v["Category"] == "Provisional" and previousCategory != "Provisional": + out.write("#ifndef SCI_DISABLE_PROVISIONAL\n") + previousCategory = v["Category"] if v["FeatureType"] in ["fun", "get", "set"]: featureDefineName = "SCI_" + name.upper() out.write("#define " + featureDefineName + " " + v["Value"] + "\n") @@ -32,6 +36,7 @@ def printHFile(f,out): elif v["FeatureType"] in ["val"]: if not (Contains(name, "SCE_") or Contains(name, "SCLEX_")): out.write("#define " + name + " " + v["Value"] + "\n") + out.write("#endif\n") def CopyWithInsertion(input, output, genfn, definition): copying = 1 -- cgit v1.2.3