fix incorrect highlighting in c and haskell modes

This commit is contained in:
nightwing 2014-12-21 12:26:35 +04:00
commit 7a3257ab58
2 changed files with 4 additions and 4 deletions

View file

@ -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"
}, {
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"
}, {
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",
regex : cFunctions

View file

@ -55,9 +55,9 @@ var HaskellHighlightRules = function() {
{ token: 'constant.language.empty-list.haskell',
regex: '\\[\\]' },
{ token: 'keyword.other.haskell',
regex: 'module',
regex: '\\bmodule\\b',
push:
[ { token: 'keyword.other.haskell', regex: 'where', next: 'pop' },
[ { token: 'keyword.other.haskell', regex: '\\bwhere\\b', next: 'pop' },
{ include: '#module_name' },
{ include: '#module_exports' },
{ token: 'invalid', regex: '[a-z]+' },