2019-10-25 10:28:15 -04:00
|
|
|
<?php declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace Kilo;
|
|
|
|
|
|
|
|
function get_hldb(): array
|
|
|
|
{
|
|
|
|
static $db = [];
|
|
|
|
|
|
|
|
if (count($db) === 0)
|
|
|
|
{
|
|
|
|
$db = [
|
|
|
|
Syntax::new(
|
2019-10-25 10:47:44 -04:00
|
|
|
'C',
|
2019-10-25 10:28:15 -04:00
|
|
|
['.c', '.h', '.cpp'],
|
2019-10-25 14:49:34 -04:00
|
|
|
[
|
|
|
|
'continue', 'typedef', 'switch', 'return', 'static', 'while', 'break', 'struct',
|
|
|
|
'union', 'class', 'else', 'enum', 'for', 'case', 'if',
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'#include', 'unsigned', '#define', '#ifndef', 'double', 'signed', '#endif',
|
|
|
|
'#ifdef', 'float', '#error', '#undef', 'long', 'char', 'int', 'void', '#if',
|
|
|
|
],
|
2019-10-25 12:08:21 -04:00
|
|
|
'//',
|
2019-10-25 11:49:04 -04:00
|
|
|
Syntax::HIGHLIGHT_NUMBERS | Syntax::HIGHLIGHT_STRINGS,
|
2019-10-25 10:28:15 -04:00
|
|
|
),
|
2019-10-25 10:47:44 -04:00
|
|
|
Syntax::new(
|
|
|
|
'CSS',
|
|
|
|
['.css', '.less', '.sass', 'scss'],
|
2019-10-25 14:49:34 -04:00
|
|
|
[],
|
|
|
|
[],
|
2019-10-25 12:08:21 -04:00
|
|
|
'',
|
2019-10-25 11:49:04 -04:00
|
|
|
Syntax::HIGHLIGHT_NUMBERS | Syntax::HIGHLIGHT_STRINGS,
|
2019-10-25 10:47:44 -04:00
|
|
|
),
|
|
|
|
Syntax::new(
|
|
|
|
'JavaScript',
|
2019-10-25 14:49:34 -04:00
|
|
|
['.js', '.jsx', '.ts', '.tsx', '.jsm', '.mjs', '.es'],
|
|
|
|
[
|
|
|
|
'instanceof',
|
|
|
|
'continue',
|
|
|
|
'debugger',
|
|
|
|
'function',
|
|
|
|
'default',
|
|
|
|
'extends',
|
|
|
|
'finally',
|
|
|
|
'delete',
|
|
|
|
'export',
|
|
|
|
'import',
|
|
|
|
'return',
|
|
|
|
'switch',
|
|
|
|
'typeof',
|
|
|
|
'break',
|
|
|
|
'catch',
|
|
|
|
'class',
|
|
|
|
'const',
|
|
|
|
'super',
|
|
|
|
'throw',
|
|
|
|
'while',
|
|
|
|
'yield',
|
|
|
|
'case',
|
|
|
|
'else',
|
|
|
|
'this',
|
|
|
|
'void',
|
|
|
|
'with',
|
|
|
|
'from',
|
|
|
|
'for',
|
|
|
|
'new',
|
|
|
|
'try',
|
|
|
|
'var',
|
|
|
|
'do',
|
|
|
|
'if',
|
|
|
|
'in',
|
|
|
|
'as',
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'=>', 'Number', 'String', 'Object', 'Math', 'JSON', 'Boolean',
|
|
|
|
],
|
2019-10-25 12:08:21 -04:00
|
|
|
'//',
|
2019-10-25 11:49:04 -04:00
|
|
|
Syntax::HIGHLIGHT_NUMBERS | Syntax::HIGHLIGHT_STRINGS,
|
2019-10-25 10:47:44 -04:00
|
|
|
),
|
|
|
|
Syntax::new(
|
|
|
|
'PHP',
|
|
|
|
['.php'],
|
2019-10-25 14:49:34 -04:00
|
|
|
[
|
|
|
|
'?php', '$this', '__halt_compiler', 'abstract', 'and', 'array', 'as', 'break',
|
|
|
|
'callable', 'case', 'catch', 'class', 'clone', 'const', 'continue', 'declare',
|
|
|
|
'default', 'die', 'do', 'echo', 'else', 'elseif', 'empty', 'enddeclare', 'endfor',
|
|
|
|
'endforeach', 'endif', 'endswitch', 'endwhile', 'eval', 'exit', 'extends',
|
|
|
|
'final', 'finally', 'for', 'foreach', 'function', 'global', 'goto', 'if', 'implements',
|
|
|
|
'include', 'include_once', 'instanceof', 'insteadof', 'interface', 'isset', 'list',
|
|
|
|
'namespace', 'new', 'or', 'print', 'private', 'protected', 'public', 'require', 'require_once',
|
|
|
|
'return', 'static', 'switch', 'throw', 'trait', 'try', 'unset', 'use', 'var', 'while', 'xor',
|
|
|
|
'yield', 'yield from', '__CLASS__', '__DIR__', '__FILE__', '__FUNCTION__', '__LINE__',
|
|
|
|
'__METHOD__', '__NAMESPACE__', '__TRAIT__',
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'int', 'float', 'bool', 'string', 'true', 'TRUE', 'false', 'FALSE', 'null', 'NULL',
|
|
|
|
'void', 'iterable', 'object', 'strict_types'
|
|
|
|
],
|
2019-10-25 12:08:21 -04:00
|
|
|
'//',
|
2019-10-25 11:49:04 -04:00
|
|
|
Syntax::HIGHLIGHT_NUMBERS | Syntax::HIGHLIGHT_STRINGS,
|
2019-10-25 10:47:44 -04:00
|
|
|
),
|
|
|
|
Syntax::new(
|
|
|
|
'Rust',
|
|
|
|
['.rs'],
|
2019-10-25 14:49:34 -04:00
|
|
|
[
|
|
|
|
'continue', 'return', 'static', 'struct', 'unsafe', 'break', 'const', 'crate',
|
|
|
|
'extern', 'match', 'super', 'trait', 'where', 'else', 'enum', 'false', 'impl',
|
|
|
|
'loop', 'move', 'self', 'type', 'while', 'for', 'let', 'mod', 'pub', 'ref', 'true',
|
|
|
|
'use', 'mut', 'as', 'fn', 'if', 'in',
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'DoubleEndedIterator',
|
|
|
|
'ExactSizeIterator',
|
|
|
|
'IntoIterator',
|
|
|
|
'PartialOrd',
|
|
|
|
'PartialEq',
|
|
|
|
'Iterator',
|
|
|
|
'ToString',
|
|
|
|
'Default',
|
|
|
|
'ToOwned',
|
|
|
|
'Extend',
|
|
|
|
'FnOnce',
|
|
|
|
'Option',
|
|
|
|
'String',
|
|
|
|
'AsMut',
|
|
|
|
'AsRef',
|
|
|
|
'Clone',
|
|
|
|
'Debug',
|
|
|
|
'FnMut',
|
|
|
|
'Sized',
|
|
|
|
'Unpin',
|
|
|
|
'array',
|
|
|
|
'isize',
|
|
|
|
'usize',
|
|
|
|
'&str',
|
|
|
|
'Copy',
|
|
|
|
'Drop',
|
|
|
|
'From',
|
|
|
|
'Into',
|
|
|
|
'None',
|
|
|
|
'Self',
|
|
|
|
'Send',
|
|
|
|
'Some',
|
|
|
|
'Sync',
|
|
|
|
'Sync',
|
|
|
|
'bool',
|
|
|
|
'char',
|
|
|
|
'i128',
|
|
|
|
'u128',
|
|
|
|
'Box',
|
|
|
|
'Err',
|
|
|
|
'Ord',
|
|
|
|
'Vec',
|
|
|
|
'dyn',
|
|
|
|
'f32',
|
|
|
|
'f64',
|
|
|
|
'i16',
|
|
|
|
'i32',
|
|
|
|
'i64',
|
|
|
|
'str',
|
|
|
|
'u16',
|
|
|
|
'u32',
|
|
|
|
'u64',
|
|
|
|
'Eq',
|
|
|
|
'Fn',
|
|
|
|
'Ok',
|
|
|
|
'i8',
|
|
|
|
'u8',
|
|
|
|
],
|
2019-10-25 12:08:21 -04:00
|
|
|
'//',
|
2019-10-25 11:49:04 -04:00
|
|
|
Syntax::HIGHLIGHT_NUMBERS | Syntax::HIGHLIGHT_STRINGS,
|
2019-10-25 10:47:44 -04:00
|
|
|
),
|
2019-10-25 10:28:15 -04:00
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
return $db;
|
|
|
|
}
|