0

Update to 7.1

This commit is contained in:
Rei
2012-08-14 22:13:27 +08:00
parent c48a19bb3f
commit 7d6da30689
84 changed files with 4179 additions and 2385 deletions

View File

@@ -3,79 +3,55 @@
Author: Sergey Ignatov <sergey@ignatov.spb.su>
*/
hljs.LANGUAGES.erlang_repl = {
defaultMode: {
keywords: {
'special_functions':{
'spawn':10,
'spawn_link':10,
'self':2
hljs.LANGUAGES['erlang-repl'] = function(hljs) {
return {
defaultMode: {
keywords: {
special_functions:
'spawn spawn_link self',
reserved:
'after and andalso|10 band begin bnot bor bsl bsr bxor case catch cond div end fun if ' +
'let not of or orelse|10 query receive rem try when xor'
},
'reserved':{
'after':1,
'and':1,
'andalso':5,
'band':1,
'begin':1,
'bnot':1,
'bor':1,
'bsl':1,
'bsr':1,
'bxor':1,
'case':1,
'catch':0,
'cond':1,
'div':1,
'end':1,
'fun':0,
'if':0,
'let':1,
'not':0,
'of':1,
'or':1,
'orelse':5,
'query':1,
'receive':0,
'rem':1,
'try':0,
'when':1,
'xor':1
}
},
contains: [
{
className: 'input_number', begin: '^[0-9]+> ',
relevance: 10
},
{
className: 'comment',
begin: '%', end: '$'
},
hljs.NUMBER_MODE,
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE,
{
className: 'constant', begin: '\\?(::)?([A-Z]\\w*(::)?)+'
},
{
className: 'arrow', begin: '->'
},
{
className: 'ok', begin: 'ok'
},
{
className: 'exclamation_mark', begin: '!'
},
{
className: 'function_or_atom',
begin: '(\\b[a-z\'][a-zA-Z0-9_\']*:[a-z\'][a-zA-Z0-9_\']*)|(\\b[a-z\'][a-zA-Z0-9_\']*)',
relevance: 0
},
{
className: 'variable',
begin: '[A-Z][a-zA-Z0-9_\']*',
relevance: 0
}
]
}
};
contains: [
{
className: 'input_number', begin: '^[0-9]+> ',
relevance: 10
},
{
className: 'comment',
begin: '%', end: '$'
},
{
className: 'number',
begin: '\\b(\\d+#[a-fA-F0-9]+|\\d+(\\.\\d+)?([eE][-+]?\\d+)?)',
relevance: 0
},
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE,
{
className: 'constant', begin: '\\?(::)?([A-Z]\\w*(::)?)+'
},
{
className: 'arrow', begin: '->'
},
{
className: 'ok', begin: 'ok'
},
{
className: 'exclamation_mark', begin: '!'
},
{
className: 'function_or_atom',
begin: '(\\b[a-z\'][a-zA-Z0-9_\']*:[a-z\'][a-zA-Z0-9_\']*)|(\\b[a-z\'][a-zA-Z0-9_\']*)',
relevance: 0
},
{
className: 'variable',
begin: '[A-Z][a-zA-Z0-9_\']*',
relevance: 0
}
]
}
};
}(hljs);