Geshi blitzmax file ?

BlitzMax Forums/BlitzMax Programming/Geshi blitzmax file ?

Paul "Taiphoz"(Posted 2011) [#1]
I started working on this today, since I will be posting code to my blog, and want it to look nice.

Is anyone else doing this or has anyone got a file I could use ? failing that anyone wana help ?

<?php
/*************************************************************************************
 * blitzmax.php
 * --------------
 *    Edited the blitzbasic.php to change it to support blitzmax commands.
 *
 *************************************************************************************
 *
 *     This file is part of GeSHi.
 *
 *   GeSHi is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 *   GeSHi is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with GeSHi; if not, write to the Free Software
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 ************************************************************************************/

$language_data = array (
    'LANG_NAME' => 'BlitzMax',
    'COMMENT_SINGLE' => array(1 => "'"),
    'COMMENT_MULTI' => array('REM','ENDREM'),
    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
    'QUOTEMARKS' => array('"'),
    'ESCAPE_CHAR' => '',
    'KEYWORDS' => array(
        1 => array(
            'Method'
            ),
        2 => array(
            // Audio
            'TChannel','.Playing','.SetDepth','.SetPan','.SetPaused','.SetRate','.SetVolume','.Stop',
            'Tsound','.Cue','.Load','.Play','AllocChannel','AudioDriverExists','AudioDrivers',
            'ChannelPlaying','CueSound','LoadSound','PauseChannel','PlaySound','ResumeChannel','SetAudioDriver','SetChannelDepth','SetChannelPan','SetChannelRate','SetChannelVolume','StopChannel',
            
            //BASIC
            'Bin','Hex','Instr','Lset','Left','LongBin','LongHex','Lower','Mid','RSet','Replace','Right','Trim','Upper',
            // BlitzMax RunTime
            'Abs','Abstract','And','AppArgs','AppDir','AppFile','AppTitle','Asc','Assert','Byte','case','Catch','Chr','Const','Continue','Debuglog','DebugStop','DefData','Default','Delay','Delete','Double','EachIn','Else','Elseif','End','EndExtern','EndFunction','EndIF','EndMethod','EndRem','EndSelect','EndTry','EndType','EndWhile','Exit','Extends','Extern','False','Field','Final','Float','For','Forever','Framework','Function','GCCollect','GCLeave','GCMemAlloced','GCResume','GCSetMode','GCSuspend','Global','Goto','HandleFromObject','HandleToObject','If','Import','IncBin','IncBinLen','IncBinPtr','Include','Int','LaunchDir','Len','Local','Long','Max','MemAlloc','MemClear','MemCopy','MemExtend','MemFree','MemMove','Method','Millisecs','Min','Mod','Module','ModuleInfo','New','Next','Not','Null','Object','OnEnd','Or','Pi','Private','Ptr','Public','ReadData','ReadStdin','Release','Rem','Repeat','RestoreData','Return','RuntimeError','Sar','Select','Self','Sgn','Shl','Short','Shr','SizeOf','Step','Strict','String','Super','SuperStrict','Then','Throw','To','True','Try','Type','Until','Var','Varptr','Wend','While','WriteStderr','WriteStdout',
            // Reflection
            
            //Data Structures.
            'Tlink','.NextLink','.PrevLink','.Remove','.Value','Tlist','.AddFirst','.AddLast','.Clear','.Contains','.Copy','.Count','.FindLink','.First','.FirstLink','.FromArray','.InsertAfterLink','.InsertBeforeLink','.IsEmpty','.Last','.LastLink','.Remove','.RemoveFirst','.RemoveLast','.Reverse','.Reversed','.Sort','.Swap','.ToArray','.ValueAtIndex',
            'TListEnum','ClearList','CountList','ListAddLast','ListAddFirst','ListContains','ListFindLInk','ListFromArray','ListIsEmpty','ListRemove','ListToArray','RemoveLink','ReverseList','SortList','SwapList'
            
            //Maps
            
    
            )
        ),
    'SYMBOLS' => array(
        '(',')'
        ),
    'CASE_SENSITIVE' => array(
        GESHI_COMMENTS => false,
        1 => false,
        2 => false,
        ),
    'STYLES' => array(
        'KEYWORDS' => array(
            1 => 'color: #000066; font-weight: bold;',
            2 => 'color: #0000ff;'
            ),
        'COMMENTS' => array(
            1 => 'color: #D9D100; font-style: italic;',
            ),
        'ESCAPE_CHAR' => array(
            0 => 'color: #000099; font-weight: bold;'
            ),
        'BRACKETS' => array(
            0 => 'color: #000066;'
            ),
        'STRINGS' => array(
            0 => 'color: #009900;'
            ),
        'NUMBERS' => array(
            0 => 'color: #CC0000;'
            ),
        'METHODS' => array(
            1 => 'color: #006600;'
            ),
        'SYMBOLS' => array(
            0 => 'color: #000066;'
            ),
        'REGEXPS' => array(
            ),
        'SCRIPT' => array(
            0 => '',
            1 => '',
            )
        ),
    'URLS' => array(
        1 => '',
        2 => ''
        ),
    'OOLANG' => false,
    'OBJECT_SPLITTERS' => array(
        1 => '\\'
        ),
    'REGEXPS' => array(
        ),
    'STRICT_MODE_APPLIES' => GESHI_NEVER,
    'SCRIPT_DELIMITERS' => array(),
    'HIGHLIGHT_STRICT_BLOCK' => array(
        0 => false,
        1 => false
        )
);

?>



Czar Flavius(Posted 2011) [#2]
What is this for? I don't understand it.


Kryzon(Posted 2011) [#3]
It's a PHP Syntax Highlighter class, for highlighting code in webpages.


Paul "Taiphoz"(Posted 2011) [#4]
Example of it in action here http://dev.cruel-gaming.com/cfont/


Htbaa(Posted 2011) [#5]
Plash also did one for Pygments, a Python library for syntax highlighting. But I think it only includes the BlitzMax syntax, no Types.