From 9bb31f57226877f78f23fb766773aa8486297bb7 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Thu, 30 Jun 2011 00:52:42 +0200 Subject: initial commit --- deps/highlight.js/languages/parser3.js | 58 ++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 deps/highlight.js/languages/parser3.js (limited to 'deps/highlight.js/languages/parser3.js') diff --git a/deps/highlight.js/languages/parser3.js b/deps/highlight.js/languages/parser3.js new file mode 100644 index 0000000..657a20b --- /dev/null +++ b/deps/highlight.js/languages/parser3.js @@ -0,0 +1,58 @@ +/* +Language: Parser3 +Requires: html-xml.js +Author: Oleg Volchkov +*/ + +this.lang = function(hljs){ + +hljs.LANGUAGES.parser3 = { + defaultMode: { + contains: ['comment', 'preprocessor', 'title', 'variable', 'keyword', 'number'], + subLanguage: 'html' + }, + case_insensitive: false, + + modes: [ + { + className: 'comment', + begin: '^#', end: '$' + }, + { + className: 'comment', + contains: ['commented_block'], + begin: '\\^rem{', end: '}', + relevance: 10 + }, + { + className: 'commented_block', + contains: ['commented_block'], + begin: '{', end: '}', + noMarkup: true + }, + { + className: 'preprocessor', + begin: '^@(?:BASE|USE|CLASS|OPTIONS)$', end: '^', + relevance: 10 + }, + { + className: 'title', + begin: '@[\\w\\-]+\\[[\\w^;\\-]*\\](?:\\[[\\w^;\\-]*\\])?(?:.*)$', end: '^' + }, + { + className: 'variable', + begin: '\\$\\{?[\\w\\-\\.\\:]+\\}?', end: '^' + }, + { + className: 'keyword', + begin: '\\^[\\w\\-\\.\\:]+', end: '^' + }, + { + className: 'number', + begin: '\\^#[0-9a-fA-F]+', end: '^' + }, + hljs.C_NUMBER_MODE + ] +}; + +}; -- cgit v1.2.3