fix incorrect highlighting in c and haskell modes
This commit is contained in:
parent
2d12ebb1df
commit
7a3257ab58
2 changed files with 4 additions and 4 deletions
|
|
@ -84,11 +84,11 @@ var c_cppHighlightRules = function() {
|
||||||
regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"
|
regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"
|
||||||
}, {
|
}, {
|
||||||
token : "keyword", // pre-compiler directives
|
token : "keyword", // pre-compiler directives
|
||||||
regex : "#\\s*(?:include|import|pragma|line|define|undef|if|ifdef|else|elif|ifndef)\\b",
|
regex : "#\\s*(?:include|import|pragma|line|define|undef)\\b",
|
||||||
next : "directive"
|
next : "directive"
|
||||||
}, {
|
}, {
|
||||||
token : "keyword", // special case pre-compiler directive
|
token : "keyword", // special case pre-compiler directive
|
||||||
regex : "(?:#\\s*endif)\\b"
|
regex : "#\\s*(?:endif|if|ifdef|else|elif|ifndef)\\b"
|
||||||
}, {
|
}, {
|
||||||
token : "support.function.C99.c",
|
token : "support.function.C99.c",
|
||||||
regex : cFunctions
|
regex : cFunctions
|
||||||
|
|
|
||||||
|
|
@ -55,9 +55,9 @@ var HaskellHighlightRules = function() {
|
||||||
{ token: 'constant.language.empty-list.haskell',
|
{ token: 'constant.language.empty-list.haskell',
|
||||||
regex: '\\[\\]' },
|
regex: '\\[\\]' },
|
||||||
{ token: 'keyword.other.haskell',
|
{ token: 'keyword.other.haskell',
|
||||||
regex: 'module',
|
regex: '\\bmodule\\b',
|
||||||
push:
|
push:
|
||||||
[ { token: 'keyword.other.haskell', regex: 'where', next: 'pop' },
|
[ { token: 'keyword.other.haskell', regex: '\\bwhere\\b', next: 'pop' },
|
||||||
{ include: '#module_name' },
|
{ include: '#module_name' },
|
||||||
{ include: '#module_exports' },
|
{ include: '#module_exports' },
|
||||||
{ token: 'invalid', regex: '[a-z]+' },
|
{ token: 'invalid', regex: '[a-z]+' },
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue