语法插件

WP-SYNTAX插件很不错,但经常找语言代码就不好了,
下面是它的语言表,希望对大家有用:)

$lookup = array(
    '6502acme' => array( 'a', 's', 'asm', 'inc' ),
    '6502tasm' => array( 'a', 's', 'asm', 'inc' ),
    '6502kickass' => array( 'a', 's', 'asm', 'inc' ),
    '68000devpac' => array( 'a', 's', 'asm', 'inc' ),
    'abap' => array('abap'),
    'actionscript' => array('as'),
    'ada' => array('a', 'ada', 'adb', 'ads'),
    'apache' => array('conf'),
    'asm' => array('ash', 'asm', 'inc'),
    'asp' => array('asp'),
    'bash' => array('sh'),
    'bf' => array('bf'),
    'c' => array('c', 'h'),
    'c_mac' => array('c', 'h'),
    'caddcl' => array(),
    'cadlisp' => array(),
    'cdfg' => array('cdfg'),
    'cobol' => array('cbl'),
    'cpp' => array('cpp', 'hpp', 'C', 'H', 'CPP', 'HPP'),
    'csharp' => array('cs'),
    'css' => array('css'),
    'd' => array('d'),
    'delphi' => array('dpk', 'dpr', 'pp', 'pas'),
    'diff' => array('diff', 'patch'),
    'dos' => array('bat', 'cmd'),
    'gdb' => array('kcrash', 'crash', 'bt'),
    'gettext' => array('po', 'pot'),
    'gml' => array('gml'),
    'gnuplot' => array('plt'),
    'groovy' => array('groovy'),
    'haskell' => array('hs'),
    'html4strict' => array('html', 'htm'),
    'ini' => array('ini', 'desktop'),
    'java' => array('java'),
    'javascript' => array('js'),
    'klonec' => array('kl1'),
    'klonecpp' => array('klx'),
    'latex' => array('tex'),
    'lisp' => array('lisp'),
    'lua' => array('lua'),
    'matlab' => array('m'),
    'mpasm' => array(),
    'mysql' => array('sql'),
    'nsis' => array(),
    'objc' => array(),
    'oobas' => array(),
    'oracle8' => array(),
    'oracle10' => array(),
    'pascal' => array('pas'),
    'perl' => array('pl', 'pm'),
    'php' => array('php', 'php5', 'phtml', 'phps'),
    'povray' => array('pov'),
    'providex' => array('pvc', 'pvx'),
    'prolog' => array('pl'),
    'python' => array('py'),
    'qbasic' => array('bi'),
    'reg' => array('reg'),
    'ruby' => array('rb'),
    'sas' => array('sas'),
    'scala' => array('scala'),
    'scheme' => array('scm'),
    'scilab' => array('sci'),
    'smalltalk' => array('st'),
    'smarty' => array(),
    'tcl' => array('tcl'),
    'vb' => array('bas'),
    'vbnet' => array(),
    'visualfoxpro' => array(),
    'whitespace' => array('ws'),
    'xml' => array('xml', 'svg', 'xrc'),
    'z80' => array('z80', 'asm', 'inc')
);

c语言测试

//lang="c"
int main(int argc,char** argv)
{
    printf("Hello World\n");
    return 0;
}

c++语言测试

//lang="cpp"
using namespace std;
int main(int argc,char** argv)
{
    cout<<"Hello World"<<endl;
    return 0;
}
&#91;/code&#93;

Objective-C语言测试
&#91;code lang="objc"&#93;
#import <Foundation/Foundation.h>

int main(int argc, char**argv)
{
	NSString *hello = @"Hello World\n";
	NSLog(hello);
	[hello release];
	return 0;
}

java语言测试

//lang="java"
public static void main(String[] args)
{
    System.out.println("Hello World!");
}

bash脚本测试

#!/bin/bash
#lang="bash"
HI="Hello World!"
echo $HI

bat脚本测试

REM lang="bash"
echo "Hello World!"

Leave a Reply

Your email address will not be published. Required fields are marked *

*