1<?php 2/************************************************************************************* 3 * vala.php 4 * ---------- 5 * Author: Nicolas Joseph (nicolas.joseph@valaide.org) 6 * Copyright: (c) 2009 Nicolas Joseph 7 * Release Version: 1.0.9.1 8 * Date Started: 2009/04/29 9 * 10 * Vala language file for GeSHi. 11 * 12 * CHANGES 13 * ------- 14 * 15 * TODO 16 * ---- 17 * 18 ************************************************************************************* 19 * 20 * This file is part of GeSHi. 21 * 22 * GeSHi is free software; you can redistribute it and/or modify 23 * it under the terms of the GNU General Public License as published by 24 * the Free Software Foundation; either version 2 of the License, or 25 * (at your option) any later version. 26 * 27 * GeSHi is distributed in the hope that it will be useful, 28 * but WITHOUT ANY WARRANTY; without even the implied warranty of 29 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 30 * GNU General Public License for more details. 31 * 32 * You should have received a copy of the GNU General Public License 33 * along with GeSHi; if not, write to the Free Software 34 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 35 * 36 ************************************************************************************/ 37 38$language_data = array ( 39 'LANG_NAME' => 'Vala', 40 'COMMENT_SINGLE' => array(1 => '//'), 41 'COMMENT_MULTI' => array('/*' => '*/'), 42 'COMMENT_REGEXP' => array( 43 //Using and Namespace directives (basic support) 44 //Please note that the alias syntax for using is not supported 45 3 => '/(?:(?<=using[\\n\\s])|(?<=namespace[\\n\\s]))[\\n\\s]*([a-zA-Z0-9_]+\\.)*[a-zA-Z0-9_]+[\n\s]*(?=[;=])/i'), 46 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, 47 'QUOTEMARKS' => array("'", '"'), 48 'HARDQUOTE' => array('"""'), 49 'HARDESCAPE' => array('"'), 50 'ESCAPE_CHAR' => '\\', 51 'KEYWORDS' => array( 52 1 => array( 53 'as', 'abstract', 'base', 'break', 'case', 'catch', 'const', 54 'construct', 'continue', 'default', 'delete', 'dynamic', 'do', 55 'else', 'ensures', 'extern', 'false', 'finally', 'for', 'foreach', 56 'get', 'if', 'in', 'inline', 'internal', 'lock', 'namespace', 57 'null', 'out', 'override', 'private', 'protected', 'public', 'ref', 58 'requires', 'return', 'set', 'static', 'switch', 'this', 'throw', 59 'throws', 'true', 'try', 'using', 'value', 'var', 'virtual', 60 'volatile', 'void', 'yield', 'yields', 'while' 61 ), 62 2 => array( 63 '#elif', '#endif', '#else', '#if' 64 ), 65 3 => array( 66 'is', 'new', 'owned', 'sizeof', 'typeof', 'unchecked', 'unowned', 'weak' 67 ), 68 4 => array( 69 'bool', 'char', 'class', 'delegate', 'double', 'enum', 70 'errordomain', 'float', 'int', 'int8', 'int16', 'int32', 'int64', 71 'interface', 'long', 'short', 'signal', 'size_t', 'ssize_t', 72 'string', 'struct', 'uchar', 'uint', 'uint8', 'uint16', 'uint32', 73 'ulong', 'unichar', 'ushort' 74 ) 75 ), 76 'SYMBOLS' => array( 77 '+', '-', '*', '?', '=', '/', '%', '&', '>', '<', '^', '!', ':', ';', 78 '(', ')', '{', '}', '[', ']', '|' 79 ), 80 'CASE_SENSITIVE' => array( 81 GESHI_COMMENTS => false, 82 1 => true, 83 2 => true, 84 3 => true, 85 4 => true, 86 ), 87 'STYLES' => array( 88 'KEYWORDS' => array( 89 1 => 'color: #0600FF;', 90 2 => 'color: #FF8000; font-weight: bold;', 91 3 => 'color: #008000;', 92 4 => 'color: #FF0000;' 93 ), 94 'COMMENTS' => array( 95 1 => 'color: #008080; font-style: italic;', 96 3 => 'color: #008080;', 97 'MULTI' => 'color: #008080; font-style: italic;' 98 ), 99 'ESCAPE_CHAR' => array( 100 0 => 'color: #008080; font-weight: bold;', 101 'HARD' => 'color: #008080; font-weight: bold;' 102 ), 103 'BRACKETS' => array( 104 0 => 'color: #000000;' 105 ), 106 'STRINGS' => array( 107 0 => 'color: #666666;', 108 'HARD' => 'color: #666666;' 109 ), 110 'NUMBERS' => array( 111 0 => 'color: #FF0000;' 112 ), 113 'METHODS' => array( 114 1 => 'color: #0000FF;', 115 2 => 'color: #0000FF;' 116 ), 117 'SYMBOLS' => array( 118 0 => 'color: #008000;' 119 ), 120 'REGEXPS' => array( 121 ), 122 'SCRIPT' => array( 123 ) 124 ), 125 'URLS' => array( 126 1 => '', 127 2 => '', 128 3 => '', 129 4 => '' 130 ), 131 'OOLANG' => true, 132 'OBJECT_SPLITTERS' => array( 133 1 => '.' 134 ), 135 'REGEXPS' => array( 136 ), 137 'STRICT_MODE_APPLIES' => GESHI_NEVER, 138 'SCRIPT_DELIMITERS' => array( 139 ), 140 'HIGHLIGHT_STRICT_BLOCK' => array( 141 ), 142 'TAB_WIDTH' => 4, 143 'PARSER_CONTROL' => array( 144 'KEYWORDS' => array( 145 'DISALLOWED_BEFORE' => "(?<![a-zA-Z0-9\$_\|\#>|^])", 146 'DISALLOWED_AFTER' => "(?![a-zA-Z0-9_<\|%\\-])" 147 ) 148 ) 149); 150