Skip to content

Instantly share code, notes, and snippets.

@YellowAfterlife
Created August 11, 2015 08:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save YellowAfterlife/70f0126d8d3a672a57be to your computer and use it in GitHub Desktop.
Save YellowAfterlife/70f0126d8d3a672a57be to your computer and use it in GitHub Desktop.
A Haxe syntax highlighter for GeSHi (http://qbnz.com/highlighter/)
<?php
$language_data = array (
'LANG_NAME' => 'Haxe',
'COMMENT_SINGLE' => array(1 => '//'),
'COMMENT_MULTI' => array('/*' => '*/'),
'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
'QUOTEMARKS' => array("'", '"'),
'ESCAPE_CHAR' => '\\',
'KEYWORDS' => array(
1 => array(
'break', 'callback', 'case', 'catch', 'class', 'continue', 'default', 'do',
'else', 'enum', 'extends', 'for', 'function', 'if', 'implements', 'import',
'in', 'interface', 'new', 'namespace', 'package', 'return', 'switch', 'throw',
'try', 'typedef', 'using', 'var', 'while'
),
2 => array(
'public', 'private', 'static', 'inline', 'untyped', 'override', 'extern',
'protected', 'super', 'dynamic', 'this', 'cast', 'trace'
),
3 => array(
'Void', 'Int', 'Float', 'Dynamic', 'Bool', 'Iterator', 'Array', 'List',
'IntHash', 'Hash', 'Map', 'ObjectMap', 'StringMap', 'IntMap', 'Date',
'String', 'Xml', 'StringTools',
//
'Main', 'Reflect'
)
),
'SYMBOLS' => array(
'(', ')', '[', ']', '{', '}', '<', '>',
'!', '@', '%', '&', '*', '|', '/', ',', ';', ':',
'&lt;', '&gt;'
),
'CASE_SENSITIVE' => array(
GESHI_COMMENTS => true,
1 => true,
2 => true,
3 => true
),
'STYLES' => array(
'KEYWORDS' => array(
1 => 'color: #0000ff;',
2 => 'color: #0060ff;',
3 => 'color: #0080aa;'
),
'COMMENTS' => array(
1 => 'color: #009900; font-style: italic;',
'MULTI' => 'color: #009900; font-style: italic;'
),
'ESCAPE_CHAR' => array(
0 => 'color: #000099; font-weight: bold;'
),
'BRACKETS' => array(
0 => 'color: #66cc66;'
),
'STRINGS' => array(
0 => 'color: #901010;'
),
'NUMBERS' => array(
0 => 'color: #FA3232;'
),
'METHODS' => array(
1 => 'color: #006666;'
),
'SYMBOLS' => array(
0 => 'color: #66cc66;'
),
'REGEXPS' => array(
0 => 'color: #0066FF;'
),
'SCRIPT' => array(
0 => '',
1 => '',
2 => '',
3 => ''
)
),
'URLS' => array(
1 => '',
2 => '',
3 => ''
),
'OOLANG' => true,
'OBJECT_SPLITTERS' => array(
1 => '.'
),
'REGEXPS' => array(
0 => "~/.*/([igm]*)?"
),
'STRICT_MODE_APPLIES' => GESHI_NEVER,
'SCRIPT_DELIMITERS' => array(
),
'HIGHLIGHT_STRICT_BLOCK' => array(
0 => true,
1 => true
)
);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment