diff options
Diffstat (limited to 'src/libs/3rdparty/syntax-highlighting/data/generators/nsis-gen.py')
-rw-r--r-- | src/libs/3rdparty/syntax-highlighting/data/generators/nsis-gen.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/libs/3rdparty/syntax-highlighting/data/generators/nsis-gen.py b/src/libs/3rdparty/syntax-highlighting/data/generators/nsis-gen.py new file mode 100644 index 0000000000..4f03bd44ff --- /dev/null +++ b/src/libs/3rdparty/syntax-highlighting/data/generators/nsis-gen.py @@ -0,0 +1,23 @@ +#!/usr/bin/env python + +from __future__ import print_function + +tokens = [] +with open("makensiscmdhelp.output") as f: # output from `makensis /cmdhelp` + for line in f: + if line.startswith(" "): + continue # line continuation + + tokens.append(line.split()[0]) + +keywords = [x[1:] for x in tokens if x.startswith("!")] +basefuncs = [x for x in tokens if not x.startswith("!")] + +print("KEYWORDS") +for keyword in keywords: + print("<item> %s </item>" % keyword) +print() + +print("BASEFUNCS") +for basefunc in basefuncs: + print("<item> %s </item>" % basefunc) |