User:Anaminus/lua.php

From Legacy Roblox Wiki
Jump to navigationJump to search

Customized styles with GeSHi for Lua (matches roblox studio's highlighting).

  • MediaWiki version: 1.16.0</syntaxhighlight>
  • GeSHi version: 1.0.8.6</syntaxhighlight>
  • Filename: lua.php</syntaxhighlight>
  • Location: ...\extensions\SyntaxHighlight_GeSHi\geshi\geshi</syntaxhighlight>
  • Source:
<?php
$language_data = array (
    'LANG_NAME' => 'Lua',
    'COMMENT_SINGLE' => array(1 => '--'),
    'COMMENT_MULTI' => array('--[[' => ']]'),
    // Workaround for double-bracket multiline strings
    'COMMENT_REGEXP' => array(2 => '/\[\[(?s:.*?)\]\]/'),
    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
    'QUOTEMARKS' => array('"', "'"),
    'ESCAPE_CHAR' => '\\',
    'NUMBERS' => GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_HEX_PREFIX | GESHI_NUMBER_FLT_SCI_ZERO,
    'KEYWORDS' => array(
        1 => array(
            'and','break','do','else','elseif',
            'end','false','for','function','if',
            'in','local','nil','not','or',
            'repeat','return','then','true','until','while'
            )
        ),
    'SYMBOLS' => array(
        '(', ')', '{', '}', '[', ']',
        '+', '-', '*', '/', '^', '%',
        '=', '~', '<', '>', '#', '.', ',', ':', ';'
        ),
    'CASE_SENSITIVE' => array(
        GESHI_COMMENTS => false,
        1 => true
        ),
    'STYLES' => array(
        'KEYWORDS' => array(
            1 => 'color: #000080; font-weight: bold;'
            ),
        'COMMENTS' => array(
            1 => 'color: #008000;',
            // double-bracket string
            2 => 'color: #800080;',
            'MULTI' => 'color: #008000;'
            ),
        'ESCAPE_CHAR' => array(
            0 => 'color: #800080;'
            ),
        'BRACKETS' => array(
            0 => 'color: #808040;'
            ),
        'STRINGS' => array(
            0 => 'color: #800080;'
            ),
        'NUMBERS' => array(
            0 => 'color: #408080;'
            ),
        'METHODS' => array(
            0 => 'color: #000080;'
            ),
        'SYMBOLS' => array(
            0 => 'color: #808040;'
            ),
        'REGEXPS' => array(
            ),
        'SCRIPT' => array(
            )
        ),
    'URLS' => array(
        1 => ''
        ),
    'OOLANG' => false,
    'OBJECT_SPLITTERS' => array(
        ),
    'REGEXPS' => array(
        ),
    'STRICT_MODE_APPLIES' => GESHI_NEVER,
    'SCRIPT_DELIMITERS' => array(
        ),
    'HIGHLIGHT_STRICT_BLOCK' => array(
        )
);

?>