2
/*************************************************************************************
5
* Author: Archimmersion ( based on ruby.php by Moises Deniz )
6
* Copyright: (c) 2011 Archimmersion ( http://www.archimmersion.com )
7
* Release Version: 1.0.8.11
8
* Date Started: 2011/03/30
10
* StoneScript language file for GeSHi.
12
* StonesCript is a Lua based script language for the ShiVa3D game engine ( http://www.stonetrip.com )
14
* More information can be found at http://www.stonetrip.com/developer/doc/api/introduction
18
* 2011/04/18 (1.0.8.11)
21
*************************************************************************************
23
* This file is part of GeSHi.
25
* GeSHi is free software; you can redistribute it and/or modify
26
* it under the terms of the GNU General Public License as published by
27
* the Free Software Foundation; either version 2 of the License, or
28
* (at your option) any later version.
30
* GeSHi is distributed in the hope that it will be useful,
31
* but WITHOUT ANY WARRANTY; without even the implied warranty of
32
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33
* GNU General Public License for more details.
35
* You should have received a copy of the GNU General Public License
36
* along with GeSHi; if not, write to the Free Software
37
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
39
************************************************************************************/
41
$language_data = array (
42
'LANG_NAME' => 'StoneScript',
43
'COMMENT_SINGLE' => array(1 => "--"),
44
'COMMENT_MULTI' => array("--[[" => "]]"),
45
'COMMENT_REGEXP' => array(
46
4 => '/<<\s*?(\w+)\\n.*?\\n\\1(?![a-zA-Z0-9])/si',
48
'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
49
'QUOTEMARKS' => array('"', '`','\''),
50
'ESCAPE_CHAR' => '\\',
52
// Blue - General Keywords
54
'and', 'begin', 'break', 'do', 'else', 'elseif', 'end',
55
'for', 'if', 'in', 'while', 'next', 'not', 'or', 'redo',
56
'then', 'unless', 'until', 'when', 'false', 'nil', 'self',
57
'true', 'local', 'this', 'return',
59
// Dark Blue - Main API names
61
'animation', 'application', 'cache', 'camera', 'debug',
62
'dynamics', 'group', 'hashtable', 'hud', 'input', 'light',
63
'log', 'math', 'mesh', 'microphone', 'music', 'navigation',
64
'network', 'object', 'pixelmap', 'projector', 'scene',
65
'sensor', 'server', 'session', 'sfx', 'shape', 'sound',
66
'string', 'system', 'table', 'user', 'video', 'xml',
70
'ActionSheet', 'Alert', 'Mail', 'Picker', 'StatusBar',
73
// Can be commented out if performance is crucial -> then these keywords will appear in a slightly lighter color
76
'kPlaybackModeLoop', 'kPlaybackModeLoopMirrored', 'kPlaybackModeLoopReversed',
77
'kPlaybackModeOnce', 'kPlaybackModeOnceReversed',
78
//Application - Environment
79
'kStatusLoading', 'kStatusReady', 'kStatusSaving', // 'kStatusNone'
80
//Application - Options
81
'kOptionAudioMasterVolume', 'kOptionAutomaticVirtualKeyboard', 'kOptionDynamicShadowsBufferCount',
82
'kOptionDynamicShadowsBufferSize', 'kOptionDynamicShadowsConstantSampling', 'kOptionDynamicShadowsPCFSampleCount',
83
'kOptionDynamicShadowsQuality', 'kOptionDynamicShadowsScreenSpaceBlur', 'kOptionFullscreen',
84
'kOptionFullscreenHeight', 'kOptionFullscreenWidth', 'kOptionHardwareOcclusion',
85
'kOptionMaxEventBouncesPerFrame', 'kOptionNetworkStreams', 'kOptionNetworkStreamsUseBrowser',
86
'kOptionPrioritizeEventBounces', 'kOptionRenderingEnabled', 'kOptionShadersQuality',
87
'kOptionSwapInterval', 'kOptionTerrainsQuality', 'kOptionTexturesAnisotropyLevel',
88
'kOptionTexturesMipmapBias', 'kOptionTexturesQuality', 'kOptionViewportRotation',
89
//Application - Resource Types
90
'kResourceTypeAnimBank', 'kResourceTypeFont', 'kResourceTypeHUD',
91
'kResourceTypeMaterial', 'kResourceTypeMesh', 'kResourceTypeParticle',
92
'kResourceTypePixelMap', 'kResourceTypeSoundBank', 'kResourceTypeTexture',
93
'kResourceTypeTextureClip', 'kResourceTypeTrail',
95
'kPropertyHeight', 'kPropertySize', 'kPropertyWidth',
97
'kAxisX', 'kAxisY', 'kAxisZ',
98
'kTypeBox', 'kTypeCapsule', 'kTypeSphere',
100
'kAddressingModeClamp', 'kAddressingModeRepeat', 'kAlignCenter', 'kAlignJustify','kAlignLeft', 'kAlignRight',
101
'kAlignTop', 'kBlendModeAdd', 'kBlendModeDefault', 'kBlendModeModulate', 'kCaseFixed', 'kCaseVariable',
102
'kCommandTypeCallAction', 'kCommandTypeCopyCheckStateToRegister', 'kCommandTypeCopyEditTextToRegister',
103
'kCommandTypeCopyListItemTextToRegister', 'kCommandTypeCopyListLastSelectedItemToRegister',
104
'kCommandTypeCopyProgressValueToRegister', 'kCommandTypeCopySliderValueToRegister', 'kCommandTypeCopyTagToRegister',
105
'kCommandTypeEnterModalMode', 'kCommandTypeInterpolateBackgroundColor', 'kCommandTypeInterpolateBorderColor',
106
'kCommandTypeInterpolateForegroundColor', 'kCommandTypeInterpolateHeight', 'kCommandTypeInterpolateOpacity',
107
'kCommandTypeInterpolatePosition', 'kCommandTypeInterpolateProgressValue', 'kCommandTypeInterpolateRotation',
108
'kCommandTypeInterpolateSize', 'kCommandTypeInterpolateWidth', 'kCommandTypeLeaveModalMode',
109
'kCommandTypeMatchScreenSpaceBottomLeftCorner', 'kCommandTypeMatchScreenSpaceBottomRightCorner',
110
'kCommandTypeMatchScreenSpaceCenter', 'kCommandTypeMatchScreenSpaceHeight', 'kCommandTypeMatchScreenSpaceTopLeftCorner',
111
'kCommandTypeMatchScreenSpaceTopRightCorner', 'kCommandTypeMatchScreenSpaceWidth', 'kCommandTypePauseMovie',
112
'kCommandTypePauseSound', 'kCommandTypePauseTimer', 'kCommandTypePlayMovie', 'kCommandTypePlaySound',
113
'kCommandTypePlaySoundLoop', 'kCommandTypeResumeSound', 'kCommandTypeSendEventToUser', 'kCommandTypeSetActive',
114
'kCommandTypeSetBackgroundColor', 'kCommandTypeSetBackgroundImage', 'kCommandTypeSetBackgroundImageUVOffset',
115
'kCommandTypeSetBackgroundImageUVScale', 'kCommandTypeSetBorderColor', 'kCommandTypeSetButtonText',
116
'kCommandTypeSetCheckState', 'kCommandTypeSetCheckText', 'kCommandTypeSetCursorPosition', 'kCommandTypeSetCursorVisible',
117
'kCommandTypeSetEditText', 'kCommandTypeSetFocus', 'kCommandTypeSetForegroundColor', 'kCommandTypeSetHeight',
118
'kCommandTypeSetLabelText', 'kCommandTypeSetOpacity', 'kCommandTypeSetPosition', 'kCommandTypeSetRotation',
119
'kCommandTypeSetSize', 'kCommandTypeSetVisible', 'kCommandTypeSetWidth', 'kCommandTypeSleep', 'kCommandTypeStartTimer',
120
'kCommandTypeStopAction', 'kCommandTypeStopMovie', 'kCommandTypeStopSound', 'kCommandTypeStopTimer',
121
'kComponentTypeButton', 'kComponentTypeCheck', 'kComponentTypeContainer', 'kComponentTypeEdit', 'kComponentTypeLabel',
122
'kComponentTypeList', 'kComponentTypeMovie', 'kComponentTypePicture', 'kComponentTypePixelMap', 'kComponentTypeProgress',
123
'kComponentTypeRenderMap', 'kComponentTypeSlider', 'kCursorShapeCross', 'kCursorShapeDefault', 'kCursorShapeHandPointing',
124
'kCursorShapeIBeam', 'kCursorShapeNone', 'kCursorShapeWaiting', 'kDirectionLeftToRight', 'kDirectionRightToLeft',
125
'kEncodingASCII', 'kEncodingUTF8', 'kEventTypeGainFocus', 'kEventTypeLooseFocus', 'kEventTypeMouseEnter',
126
'kEventTypeMouseLeave', 'kFillModeSolid', 'kInterpolatorTypeLinear', 'kInterpolatorTypePower2', 'kInterpolatorTypePower3',
127
'kInterpolatorTypePower4', 'kInterpolatorTypeRoot2', 'kInterpolatorTypeRoot3', 'kInterpolatorTypeRoot4',
128
'kInterpolatorTypeSpring1', 'kInterpolatorTypeSpring2', 'kInterpolatorTypeSpring3', 'kInterpolatorTypeSpring4',
129
'kInterpolatorTypeSpring5', 'kInterpolatorTypeSpring6',
130
'kOriginBottom', 'kOriginBottomLeft', 'kOriginBottomRight', 'kOriginCenter', 'kOriginLeft', 'kOriginRight',
131
'kOriginTop', 'kOriginTopLeft', 'kOriginTopRight', 'kProgressTypeBottomToTop', 'kProgressTypeLeftToRight',
132
'kProgressTypeRightToLeft', 'kProgressTypeTopToBottom', 'kRuntimeValueCallArgument0', 'kRuntimeValueCallArgument1',
133
'kRuntimeValueCallArgument2', 'kRuntimeValueCallArgument3', 'kRuntimeValueCurrentUser', 'kRuntimeValueCurrentUserMainCamera',
134
'kRuntimeValueRegister0', 'kRuntimeValueRegister1', 'kRuntimeValueRegister2', 'kRuntimeValueRegister3',
135
'kShapeTypeEllipsoid', 'kShapeTypeRectangle', 'kShapeTypeRoundRectangle', 'kSliderTypeBottomToTop',
136
'kSliderTypeLeftToRight', 'kSliderTypeRightToLeft', 'kSliderTypeTopToBottom', 'kWaveTypeConstant',
137
'kWaveTypeSawtooth', 'kWaveTypeSawtoothInv', 'kWaveTypeSinus', 'kWaveTypeSinusNoise', 'kWaveTypeSquare', 'kWaveTypeTriangle',
139
'kJoypadTypeIPhone', 'kJoypadTypeNone', 'kJoypadTypePhone', 'kJoypadTypeStandard', 'kJoypadTypeWiimote',
140
'kKey0', 'kKey1', 'kKey2', 'kKey3', 'kKey4', 'kKey5', 'kKey6', 'kKey7', 'kKey8', 'kKey9', 'kKeyA', 'kKeyB',
141
'kKeyBackspace', 'kKeyC', 'kKeyD', 'kKeyDelete', 'kKeyDown', 'kKeyE', 'kKeyEnd', 'kKeyEscape', 'kKeyF',
142
'kKeyF1', 'kKeyF10', 'kKeyF11', 'kKeyF12', 'kKeyF2', 'kKeyF3', 'kKeyF4', 'kKeyF5', 'kKeyF6', 'kKeyF7',
143
'kKeyF8', 'kKeyF9', 'kKeyG', 'kKeyH', 'kKeyHome', 'kKeyI', 'kKeyInsert', 'kKeyJ', 'kKeyK', 'kKeyL',
144
'kKeyLAlt', 'kKeyLControl', 'kKeyLeft', 'kKeyLShift', 'kKeyM', 'kKeyN', 'kKeyO', 'kKeyP', 'kKeyPageDown',
145
'kKeyPageUp', 'kKeyQ', 'kKeyR', 'kKeyRAlt', 'kKeyRControl', 'kKeyReturn', 'kKeyRight', 'kKeyRShift',
146
'kKeyS', 'kKeySpace', 'kKeyT', 'kKeyTab', 'kKeyU', 'kKeyUp', 'kKeyV', 'kKeyW', 'kKeyX', 'kKeyY',
147
'kKeyZ', 'kJoypadButtonPSPCircle', 'kJoypadButtonPSPCross', 'kJoypadButtonPSPDown', 'kJoypadButtonPSPL',
148
'kJoypadButtonPSPLeft', 'kJoypadButtonPSPR', 'kJoypadButtonPSPRight', 'kJoypadButtonPSPSelect',
149
'kJoypadButtonPSPSquare', 'kJoypadButtonPSPStart', 'kJoypadButtonPSPTriangle', 'kJoypadButtonPSPUp',
150
'kJoypadTypePSP', 'kJoypadButtonWiimoteA', 'kJoypadButtonWiimoteB', 'kJoypadButtonWiimoteC',
151
'kJoypadButtonWiimoteDown', 'kJoypadButtonWiimoteHome', 'kJoypadButtonWiimoteLeft',
152
'kJoypadButtonWiimoteMinus', 'kJoypadButtonWiimoteOne', 'kJoypadButtonWiimotePlus',
153
'kJoypadButtonWiimoteRight', 'kJoypadButtonWiimoteTwo', 'kJoypadButtonWiimoteUp', 'kJoypadButtonWiimoteZ',
155
'kTypeDirectional', 'kTypePoint',
157
'kEpsilon', 'kInfinity', 'kPi',
159
'kLockModeRead', 'kLockModeWrite', 'kLockReadWrite',
161
'kBluetoothServerPort', 'kDefaultServerPort', 'kStatusAuthenticated', 'kStatusSearchFinished', // 'kStatusNone', 'kStatusPending',
163
'kControllerTypeAI', 'kControllerTypeAnimation', 'kControllerTypeAny', 'kControllerTypeDynamics',
164
'kControllerTypeNavigation', 'kControllerTypeSound', 'kGlobalSpace', 'kLocalSpace', 'kParentSpace',
165
'kTransformOptionInheritsParentRotation', 'kTransformOptionInheritsParentScale', 'kTransformOptionInheritsParentTranslation',
166
'kTransformOptionTranslationAffectedByParentRotation', 'kTransformOptionTranslationAffectedByParentScale', 'kTypeCamera',
167
'kTypeCollider', 'kTypeDummy', 'kTypeGroup', 'kTypeLight', 'kTypeOccluder', 'kTypeProjector', 'kTypeReflector',
168
'kTypeSensor', 'kTypeSfx', 'kTypeShape',
170
'kBlendModeDecal', 'kBlendModeReplace', 'kFillModeBrush', 'kFillModeNone', 'kPenModeBrush', // 'kFillModeSolid',
171
'kPenModeNone', 'kPenModeSolid',
173
'kMapTypeMovie', 'kMapTypePixelMap', 'kMapTypeRenderMap', 'kMapTypeTexture', 'kMapTypeTextureClip',
175
'kFilteringModeBilinear', 'kFilteringModeNearest', 'kFilteringModeTrilinear', // 'kAddressingModeClamp', 'kAddressingModeRepeat',
176
'kSkyBoxFaceBack', 'kSkyBoxFaceBottom', 'kSkyBoxFaceFront', 'kSkyBoxFaceLeft', 'kSkyBoxFaceRight', 'kSkyBoxFaceTop',
178
'kShapeTypeBox', 'kShapeTypeSphere',
180
'kStatusConnected', 'kStatusNone', 'kStatusPending',
181
//Session - duplicate keywords
182
//'kStatusConnected', 'kStatusNone', 'kStatusPending',
184
'kMapTypeUnknown', 'kCurveTypeBezier', 'kCurveTypeBSpline', 'kCurveTypeCatmullRom', 'kCurveTypePolyLine',
185
// 'kMapTypeMovie', 'kMapTypePixelMap', 'kMapTypeRenderMap', 'kMapTypeTexture', 'kMapTypeTextureClip',
188
'kOSType3DS', 'kOSTypeBada', 'kOSTypeBrew', 'kOSTypePalm', 'kOSTypePS3',
189
'kClientTypeEditor', 'kClientTypeEmbedded', 'kClientTypeStandalone',
190
'kGPUCapabilityBloomFilterSupport', 'kGPUCapabilityContrastFilterSupport', 'kGPUCapabilityDepthBlurFilterSupport',
191
'kGPUCapabilityDistortionFilterSupport', 'kGPUCapabilityDynamicShadowsSupport', 'kGPUCapabilityHardwareOcclusionSupport',
192
'kGPUCapabilityHardwareRenderingSupport', 'kGPUCapabilityMonochromeFilterSupport', 'kGPUCapabilityMotionBlurFilterSupport',
193
'kGPUCapabilityPixelShaderSupport', 'kGPUCapabilityVelocityBlurFilterSupport', 'kGPUCapabilityVertexShaderSupport',
194
'kLanguageAlbanian', 'kLanguageArabic', 'kLanguageBulgarian', 'kLanguageCatalan', 'kLanguageCzech', 'kLanguageDanish',
195
'kLanguageDutch', 'kLanguageEnglish', 'kLanguageFinnish', 'kLanguageFrench', 'kLanguageGerman', 'kLanguageGreek',
196
'kLanguageHebrew', 'kLanguageHungarian', 'kLanguageIcelandic', 'kLanguageItalian', 'kLanguageJapanese', 'kLanguageKorean',
197
'kLanguageNorwegian', 'kLanguagePolish', 'kLanguagePortuguese', 'kLanguageRomanian', 'kLanguageRussian',
198
'kLanguageSerboCroatian', 'kLanguageSlovak', 'kLanguageSpanish', 'kLanguageSwedish', 'kLanguageThai',
199
'kLanguageTurkish', 'kLanguageUnknown', 'kLanguageUrdu', 'kOSTypeAndroid', 'kOSTypeAngstrom', 'kOSTypeIPhone',
200
'kOSTypeLinux', 'kOSTypeMac', 'kOSTypePSP', 'kOSTypeSymbian', 'kOSTypeWii', 'kOSTypeWindows', 'kOSTypeWindowsCE',
208
'(', ')', '[', ']', '{', '}', '%', '&', '*', '|', '/', '<', '>',
211
'CASE_SENSITIVE' => array(
212
GESHI_COMMENTS => false,
220
1 => 'color:#0000FF; font-weight:bold;',
221
2 => 'color:#000088; font-weight:bold;',
222
3 => 'color:#C088C0; font-weight:bold;',
223
4 => 'color:#00FEFE; font-weight:bold;',
226
1 => 'color:#008000; font-style:italic;',
227
4 => 'color: #cc0000; font-style: italic;',
228
'MULTI' => 'color:#008000; font-style:italic;'
230
'ESCAPE_CHAR' => array(
231
0 => 'color:#000099;'
234
0 => 'color:#000000; font-weight:bold;'
237
0 => 'color:#888800;'
240
0 => 'color:#AA0000;'
244
1 => 'color:#FF00FF; font-weight:bold;'
247
0 => 'color:#000000; font-weight:bold;'
250
0 => 'color:#ff6633; font-weight:bold;',
251
1 => 'color:#0066ff; font-weight:bold;',
252
2 => 'color:#6666ff; font-weight:bold;',
253
3 => 'color:#ff3333; font-weight:bold;'
268
'OBJECT_SPLITTERS' => array(
272
0 => array(//Variables
273
GESHI_SEARCH => "([[:space:]])(\\$[a-zA-Z_][a-zA-Z0-9_]*)",
274
GESHI_REPLACE => '\\2',
275
GESHI_MODIFIERS => '',
276
GESHI_BEFORE => '\\1',
280
GESHI_SEARCH => "([[:space:]])(@[a-zA-Z_][a-zA-Z0-9_]*)",
281
GESHI_REPLACE => '\\2',
282
GESHI_MODIFIERS => '',
283
GESHI_BEFORE => '\\1',
286
2 => "([A-Z][a-zA-Z0-9_]*::)+[A-Z][a-zA-Z0-9_]*",//Static OOP symbols
288
GESHI_SEARCH => "([[:space:]]|\[|\()(:[a-zA-Z_][a-zA-Z0-9_]*)",
289
GESHI_REPLACE => '\\2',
290
GESHI_MODIFIERS => '',
291
GESHI_BEFORE => '\\1',
295
'STRICT_MODE_APPLIES' => GESHI_MAYBE,
296
'SCRIPT_DELIMITERS' => array(
301
'HIGHLIGHT_STRICT_BLOCK' => array(
b'\\ No newline at end of file'