projects
/
ibg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Highlight function names correctly.
[ibg.git]
/
tools
/
inform.py
diff --git
a/tools/inform.py
b/tools/inform.py
index 73b0d0d76e580351645e2752e15a05fae61aa9b4..1fa4e5b2290b3a02173cb4df2560c73d66e1c7fb 100644
(file)
--- a/
tools/inform.py
+++ b/
tools/inform.py
@@
-72,8
+72,9
@@
class InformLexer(RegexLexer):
tokens = {
'root': [
tokens = {
'root': [
- (r'"', String.Double, 'stringdouble'),
- (r"'", String.Single, 'stringsingle'),
+ (r'"', String.Double, 'string-double'),
+ (r"'", String.Single, 'string-single'),
+ (r"\[ *", Text, 'function-name'),
(r'\n', Text),
(r'[^\S\n]+', Text),
(r'\n', Text),
(r'[^\S\n]+', Text),
@@
-100,13
+101,18
@@
class InformLexer(RegexLexer):
(r'.', Punctuation),
],
(r'.', Punctuation),
],
- 'stringdouble': [
+ 'function-name': [
+ (r"[ ;]", Text, '#pop'),
+ (r".", Name.Function),
+ ],
+
+ 'string-double': [
(r'"', String.Double, '#pop'),
(r'.', String.Double),
(r'\n', String.Double),
],
(r'"', String.Double, '#pop'),
(r'.', String.Double),
(r'\n', String.Double),
],
- 'stringsingle': [
+ 'string
-
single': [
(r"'", String.Single, '#pop'),
(r'.', String.Single),
],
(r"'", String.Single, '#pop'),
(r'.', String.Single),
],