Highlight comments
This commit is contained in:
parent
8ad62ba1b6
commit
4135084a0f
3 changed files with 4 additions and 4 deletions
4
lib.py
4
lib.py
|
|
@ -21,8 +21,8 @@ def scriptLines (*args):
|
|||
|
||||
def unescape (bstr):
|
||||
subs = (
|
||||
('<','/*'),
|
||||
('>','*/'),
|
||||
('<','\033[32m/*'),
|
||||
('>','*/\033[0m'),
|
||||
('\1','\n'),
|
||||
('\2','<'),
|
||||
('\3','>'))
|
||||
|
|
|
|||
1
query.py
1
query.py
|
|
@ -25,7 +25,6 @@ elif cmd == 'file':
|
|||
|
||||
if ext == '.c' or ext == '.h':
|
||||
tokens = scriptLines ('tokenize-file', version, path)
|
||||
del tokens[-1]
|
||||
toBe = True
|
||||
for tok in tokens:
|
||||
toBe = not toBe
|
||||
|
|
|
|||
|
|
@ -51,7 +51,8 @@ case $cmd in
|
|||
tr '\n<>' '\1\2\3' |
|
||||
sed 's/\/\*/</g' |
|
||||
sed 's/\*\//>/g' |
|
||||
sed -r 's/(\W*)(<[^>]*>)?(\w*)/\1\2\n\3\n/g'
|
||||
sed -r 's/(\W*)(<[^>]*>)?(\w*)/\1\2\n\3\n/g' |
|
||||
head -n -1
|
||||
;;
|
||||
|
||||
untokenize)
|
||||
|
|
|
|||
Loading…
Reference in a new issue