[svn merge][r426] Updated C++ syntax highlighting to terminate strings at newline characters.
Also fixed a bug that prevented the '--no-rcfile' and '--rcfile' command line options from being used with other options.
This commit is contained in:
parent
2aecb941d7
commit
4d54a00041
|
@ -154,7 +154,6 @@ whitespace = ' \t\n\r\x0b\x0c'
|
||||||
|
|
||||||
# escape special glob characters
|
# escape special glob characters
|
||||||
def globEscape(s):
|
def globEscape(s):
|
||||||
print 'globEscape', repr(s)
|
|
||||||
m = dict([ (c, u'[%s]' % (c, )) for c in u'[]?*' ])
|
m = dict([ (c, u'[%s]' % (c, )) for c in u'[]?*' ])
|
||||||
return u''.join([ m.get(c, c) for c in s ])
|
return u''.join([ m.get(c, c) for c in s ])
|
||||||
|
|
||||||
|
@ -8364,9 +8363,9 @@ if __name__ == '__main__':
|
||||||
data_dir = make_subdirs(data_dir, subdirs)
|
data_dir = make_subdirs(data_dir, subdirs)
|
||||||
# load resource files
|
# load resource files
|
||||||
i, rc_files = 1, []
|
i, rc_files = 1, []
|
||||||
if argc == 2 and args[1] == '--no-rcfile':
|
if i < argc and args[i] == '--no-rcfile':
|
||||||
i += 1
|
i += 1
|
||||||
elif argc == 3 and args[1] == '--rcfile':
|
elif i + 1 < argc and args[i] == '--rcfile':
|
||||||
i += 1
|
i += 1
|
||||||
rc_files.append(args[i])
|
rc_files.append(args[i])
|
||||||
i += 1
|
i += 1
|
||||||
|
|
|
@ -47,15 +47,15 @@ syntax_pattern cpp cpp c++_cpp '.[^\\/\r\n]*'
|
||||||
|
|
||||||
# char
|
# char
|
||||||
syntax_pattern normal char c++_string "[uUL]?'"
|
syntax_pattern normal char c++_string "[uUL]?'"
|
||||||
syntax_pattern char normal c++_string "'"
|
syntax_pattern char normal c++_string "['\\n]"
|
||||||
syntax_pattern char char c++_escapedchar '(\\([0-7]{1,3}|x[0-9a-fA-F]{1,2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8}|.))+'
|
syntax_pattern char char c++_escapedchar '(\\([0-7]{1,3}|x[0-9a-fA-F]{1,2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8}|.|\n))+'
|
||||||
syntax_pattern char char c++_string ".[^\\\\']*"
|
syntax_pattern char char c++_string ".[^\\\\\\n']*"
|
||||||
|
|
||||||
# string
|
# string
|
||||||
syntax_pattern normal string c++_string '(u|u8|U|L)?"'
|
syntax_pattern normal string c++_string '(u|u8|U|L)?"'
|
||||||
syntax_pattern string normal c++_string '"'
|
syntax_pattern string normal c++_string '["\n]'
|
||||||
syntax_pattern string string c++_escapedchar '(\\([0-7]{1,3}|x[0-9a-fA-F]{1,2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8}|.))+'
|
syntax_pattern string string c++_escapedchar '(\\([0-7]{1,3}|x[0-9a-fA-F]{1,2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8}|.|\n))+'
|
||||||
syntax_pattern string string c++_string '.[^\\"]*'
|
syntax_pattern string string c++_string '.[^\\\n"]*'
|
||||||
|
|
||||||
# raw string
|
# raw string
|
||||||
syntax_pattern normal raw_string c++_string '(u|u8|U|L)?R"[^\(]*\('
|
syntax_pattern normal raw_string c++_string '(u|u8|U|L)?R"[^\(]*\('
|
||||||
|
|
Loading…
Reference in New Issue