forked from highlightjs/highlight.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:c3d/highlight.js into xl
Conflicts: AUTHORS.en.txt docs/css-classes-reference.rst src/test.html
- Loading branch information
Showing
5 changed files
with
143 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -136,3 +136,4 @@ Contributors: | |
- Luke Holder <[email protected]> | ||
- David Mohundro <[email protected]> | ||
- Nicholas Blumhardt <[email protected]> | ||
- Christophe de Dinechin <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
/* | ||
Language: XL | ||
Author: Christophe de Dinechin <[email protected]> | ||
Description: An extensible programming language, based on parse tree rewriting (http://xlr.sf.net) | ||
*/ | ||
|
||
function(hljs) { | ||
var XL_KEYWORDS = { | ||
keyword: 'if then else do while until for loop import with is as where when by data constant', | ||
literal: 'true false nil', | ||
type: 'integer real text name boolean symbol infix prefix postfix block tree', | ||
built_in: 'in mod rem and or xor not abs sign floor ceil sqrt sin cos tan asin acos atan exp expm1 log log2 log10 log1p pi at ' | ||
}; | ||
|
||
var BUILTIN_MODULES = { | ||
className: 'module', | ||
begin: 'ObjectLoader|Animate|MovieCredits|Slides|Filters|Shading|Materials|LensFlare|Mapping|VLCAudioVideo|StereoDecoder|PointCloud|NetworkAccess|RemoteControl|RegExp|ChromaKey|Snowfall|NodeJS|Speech|Charts', | ||
relevance: 10 | ||
}; | ||
|
||
var TAO_BUILTINS = { | ||
className: 'id', | ||
begin: 'text_length|text_range|text_find|text_replace|contains|page|slide|basic_slide|title_slide|title|subtitle|fade_in|fade_out|fade_at|clear_color|color|line_color|line_width|texture_wrap|texture_transform|texture|scale_?x|scale_?y|scale_?z?|translate_?x|translate_?y|translate_?z?|rotate_?x|rotate_?y|rotate_?z?|rectangle|circle|ellipse|sphere|path|line_to|move_to|quad_to|curve_to|theme|background|contents|locally|time|mouse_?x|mouse_?y|mouse_buttons' | ||
}; | ||
|
||
var XL_CONSTANT = { | ||
className: 'constant', | ||
begin: '[A-Z][A-Z_0-9]+', | ||
relevance: 0 | ||
}; | ||
var XL_VARIABLE = { | ||
className: 'variable', | ||
begin: '([A-Z][a-z_0-9]+)+', | ||
relevance: 0 | ||
}; | ||
var XL_ID = { | ||
className: 'id', | ||
begin: '[a-z][a-z_0-9]+', | ||
relevance: 0 | ||
}; | ||
|
||
var DOUBLE_QUOTE_TEXT = { | ||
className: 'string', | ||
begin: '"', end: '"', illegal: '\\n' | ||
}; | ||
var SINGLE_QUOTE_TEXT = { | ||
className: 'string', | ||
begin: '\'', end: '\'', illegal: '\\n' | ||
}; | ||
var LONG_TEXT = { | ||
className: 'string', | ||
begin: '<<', end: '>>', | ||
relevance: 10 | ||
}; | ||
var BASED_NUMBER = { | ||
className: 'number', | ||
begin: '[0-9]+#[0-9A-Z_]+(\\.[0-9-A-Z_]+)?#?([Ee][+-]?[0-9]+)?', | ||
relevance: 10 | ||
}; | ||
var IMPORT = { | ||
className: 'import', | ||
begin: '\\bimport\\b', end: '$', | ||
keywords: 'import', | ||
contains: [DOUBLE_QUOTE_TEXT, BUILTIN_MODULES], | ||
relevance: 5 | ||
}; | ||
var FUNCTION_DEFINITION = { | ||
className: 'function', | ||
begin: '[a-z].*->' | ||
}; | ||
return { | ||
aliases: ['tao'], | ||
keywords: XL_KEYWORDS, | ||
contains: [ | ||
hljs.C_LINE_COMMENT_MODE, | ||
hljs.C_BLOCK_COMMENT_MODE, | ||
DOUBLE_QUOTE_TEXT, | ||
SINGLE_QUOTE_TEXT, | ||
LONG_TEXT, | ||
FUNCTION_DEFINITION, | ||
BUILTIN_MODULES, | ||
TAO_BUILTINS, | ||
XL_CONSTANT, | ||
XL_VARIABLE, | ||
XL_ID, | ||
BASED_NUMBER, | ||
hljs.NUMBER_MODE | ||
] | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters