fix #2441 function highlighting in rust mode

This commit is contained in:
nightwing 2015-04-19 20:27:07 +04:00
commit 63687f693b

View file

@ -84,9 +84,8 @@ var RustHighlightRules = function() {
{ token: 'constant.character.escape.source.rust',
regex: stringEscape },
{ defaultToken: 'string.quoted.double.source.rust' } ] },
{ token: [ 'keyword.source.rust', 'meta.function.source.rust',
'entity.name.function.source.rust', 'meta.function.source.rust' ],
regex: '\\b(fn)(\\s+)([a-zA-Z_][a-zA-Z0-9_][\\w\\:,+ \\\'<>]*)(\\s*\\()' },
{ token: [ 'keyword.source.rust', 'text', 'entity.name.function.source.rust' ],
regex: '\\b(fn)(\\s+)([a-zA-Z_][a-zA-Z0-9_]*)' },
{ token: 'support.constant', regex: '\\b[a-zA-Z_][\\w\\d]*::' },
{ token: 'keyword.source.rust',
regex: '\\b(?:as|assert|break|claim|const|do|drop|else|extern|fail|for|if|impl|in|let|log|loop|match|mod|module|move|mut|Owned|priv|pub|pure|ref|return|unchecked|unsafe|use|while|mod|Send|static|trait|class|struct|enum|type)\\b' },