PageRenderTime 9ms CodeModel.GetById 1ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/Syntaxes/Lua.tmLanguage

http://github.com/osadchuk/Corona-SDK.tmbundle
Unknown | 336 lines | 336 code | 0 blank | 0 comment | 0 complexity | cdc1579a34623e664e871a3b065e7d73 MD5 | raw file
  1<?xml version="1.0" encoding="UTF-8"?>
  2<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  3<plist version="1.0">
  4<dict>
  5	<key>comment</key>
  6	<string>Lua Syntax: version 0.8</string>
  7	<key>fileTypes</key>
  8	<array>
  9		<string>lua</string>
 10	</array>
 11	<key>foldingStartMarker</key>
 12	<string>^\s*\b(function|local\s+function|if|for|do)\b|{[ \t]*$|\[\[|^.*= function</string>
 13	<key>foldingStopMarker</key>
 14	<string>\bend\b|^\s*}|\]\]</string>
 15	<key>keyEquivalent</key>
 16	<string>^~L</string>
 17	<key>name</key>
 18	<string>Lua</string>
 19	<key>patterns</key>
 20	<array>
 21		<dict>
 22			<key>captures</key>
 23			<dict>
 24				<key>1</key>
 25				<dict>
 26					<key>name</key>
 27					<string>keyword.control.lua</string>
 28				</dict>
 29				<key>2</key>
 30				<dict>
 31					<key>name</key>
 32					<string>entity.name.function.scope.lua</string>
 33				</dict>
 34				<key>3</key>
 35				<dict>
 36					<key>name</key>
 37					<string>entity.name.function.lua</string>
 38				</dict>
 39				<key>4</key>
 40				<dict>
 41					<key>name</key>
 42					<string>punctuation.definition.parameters.begin.lua</string>
 43				</dict>
 44				<key>5</key>
 45				<dict>
 46					<key>name</key>
 47					<string>variable.parameter.function.lua</string>
 48				</dict>
 49				<key>6</key>
 50				<dict>
 51					<key>name</key>
 52					<string>punctuation.definition.parameters.end.lua</string>
 53				</dict>
 54			</dict>
 55			<key>match</key>
 56			<string>\b(function)\s+([a-zA-Z_.:]+[.:])?([a-zA-Z_]\w*)\s*(\()([^)]*)(\))</string>
 57			<key>name</key>
 58			<string>meta.function.lua</string>
 59		</dict>
 60		<dict>
 61			<key>match</key>
 62			<string>(?&lt;![\d.])\s0x[a-fA-F\d]+|\b\d+(\.\d+)?([eE]-?\d+)?|\.\d+([eE]-?\d+)?</string>
 63			<key>name</key>
 64			<string>constant.numeric.lua</string>
 65		</dict>
 66		<dict>
 67			<key>begin</key>
 68			<string>'</string>
 69			<key>beginCaptures</key>
 70			<dict>
 71				<key>0</key>
 72				<dict>
 73					<key>name</key>
 74					<string>punctuation.definition.string.begin.lua</string>
 75				</dict>
 76			</dict>
 77			<key>end</key>
 78			<string>'</string>
 79			<key>endCaptures</key>
 80			<dict>
 81				<key>0</key>
 82				<dict>
 83					<key>name</key>
 84					<string>punctuation.definition.string.end.lua</string>
 85				</dict>
 86			</dict>
 87			<key>name</key>
 88			<string>string.quoted.single.lua</string>
 89			<key>patterns</key>
 90			<array>
 91				<dict>
 92					<key>match</key>
 93					<string>\\.</string>
 94					<key>name</key>
 95					<string>constant.character.escape.lua</string>
 96				</dict>
 97			</array>
 98		</dict>
 99		<dict>
100			<key>begin</key>
101			<string>"</string>
102			<key>beginCaptures</key>
103			<dict>
104				<key>0</key>
105				<dict>
106					<key>name</key>
107					<string>punctuation.definition.string.begin.lua</string>
108				</dict>
109			</dict>
110			<key>end</key>
111			<string>"</string>
112			<key>endCaptures</key>
113			<dict>
114				<key>0</key>
115				<dict>
116					<key>name</key>
117					<string>punctuation.definition.string.end.lua</string>
118				</dict>
119			</dict>
120			<key>name</key>
121			<string>string.quoted.double.lua</string>
122			<key>patterns</key>
123			<array>
124				<dict>
125					<key>match</key>
126					<string>\\.</string>
127					<key>name</key>
128					<string>constant.character.escape.lua</string>
129				</dict>
130			</array>
131		</dict>
132		<dict>
133			<key>begin</key>
134			<string>(?&lt;!--)\[(=*)\[</string>
135			<key>beginCaptures</key>
136			<dict>
137				<key>0</key>
138				<dict>
139					<key>name</key>
140					<string>punctuation.definition.string.begin.lua</string>
141				</dict>
142			</dict>
143			<key>end</key>
144			<string>\]\1\]</string>
145			<key>endCaptures</key>
146			<dict>
147				<key>0</key>
148				<dict>
149					<key>name</key>
150					<string>punctuation.definition.string.end.lua</string>
151				</dict>
152			</dict>
153			<key>name</key>
154			<string>string.quoted.other.multiline.lua</string>
155		</dict>
156		<dict>
157			<key>begin</key>
158			<string>--\[(=*)\[</string>
159			<key>captures</key>
160			<dict>
161				<key>0</key>
162				<dict>
163					<key>name</key>
164					<string>punctuation.definition.comment.lua</string>
165				</dict>
166			</dict>
167			<key>end</key>
168			<string>\]\1\]</string>
169			<key>name</key>
170			<string>comment.block.lua</string>
171		</dict>
172		<dict>
173			<key>captures</key>
174			<dict>
175				<key>1</key>
176				<dict>
177					<key>name</key>
178					<string>punctuation.definition.comment.lua</string>
179				</dict>
180			</dict>
181			<key>match</key>
182			<string>(--)(?!\[\[).*$\n?</string>
183			<key>name</key>
184			<string>comment.line.double-dash.lua</string>
185		</dict>
186		<dict>
187			<key>match</key>
188			<string>\b(break|do|else|for|if|elseif|return|then|repeat|while|until|end|function|local|in)\b</string>
189			<key>name</key>
190			<string>keyword.control.lua</string>
191		</dict>
192		<dict>
193			<key>match</key>
194			<string>(?&lt;![^.]\.|:)\b(false|nil|true|_G|_VERSION|math\.(pi|huge))\b|(?&lt;![.])\.{3}(?!\.)</string>
195			<key>name</key>
196			<string>constant.language.lua</string>
197		</dict>
198		<dict>
199			<key>match</key>
200			<string>(?&lt;![^.]\.|:)\b(self)\b</string>
201			<key>name</key>
202			<string>variable.language.self.lua</string>
203		</dict>
204		<dict>
205			<key>match</key>
206			<string>(?&lt;![^.]\.|:)\b(assert|collectgarbage|dofile|error|getfenv|getmetatable|ipairs|loadfile|loadstring|module|next|pairs|pcall|print|rawequal|rawget|rawset|require|select|setfenv|setmetatable|tonumber|tostring|type|unpack|xpcall)\b(?=[( {])</string>
207			<key>name</key>
208			<string>support.function.lua</string>
209		</dict>
210		<dict>
211			<key>match</key>
212			<string>(?&lt;![^.]\.|:)\b(coroutine\.(create|resume|running|status|wrap|yield)|string\.(byte|char|dump|find|format|gmatch|gsub|len|lower|match|rep|reverse|sub|upper)|table\.(concat|insert|maxn|remove|sort)|math\.(abs|acos|asin|atan2?|ceil|cosh?|deg|exp|floor|fmod|frexp|ldexp|log|log10|max|min|modf|pow|rad|random|randomseed|round|sinh?|sqrt|tanh?)|io\.(close|flush|input|lines|open|output|popen|read|tmpfile|type|write)|os\.(clock|date|difftime|execute|exit|getenv|remove|rename|setlocale|time|tmpname)|package\.(cpath|loaded|loadlib|path|preload|seeall)|debug\.(debug|[gs]etfenv|[gs]ethook|getinfo|[gs]etlocal|[gs]etmetatable|getregistry|[gs]etupvalue|traceback))\b(?=[( {])</string>
213			<key>name</key>
214			<string>support.function.library.lua</string>
215		</dict>
216		<dict>
217			<key>match</key>
218			<string>\b(and|or)\b</string>
219			<key>name</key>
220			<string>keyword.operator.lua</string>
221		</dict>
222		<dict>
223			<key>match</key>
224			<string>\+|-|%|#|\*|\/|\^|==?|~=|&lt;=?|&gt;=?|(?&lt;!\.)\.{2}(?!\.)</string>
225			<key>name</key>
226			<string>keyword.operator.lua</string>
227		</dict>
228		<dict>
229			<key>match</key>
230			<string>(?&lt;![^.]\.|:)\b(store\.(init|loadProducts|purchase|restore)|display\.(loadRemoteImage|newCircle|newGroup|newImage|newImageRect|newLine|newRect|newRoundedRect|newText|newRetinaText|captureScreen|getCurrentStage|save|setDefault|setStatusBar)|sprite\.(newSpriteSheet|newSpriteSet|newSprite|add|newSpriteSheetFromData)|analytics\.(init|logEvent)|easing\.(inExpo|inOutExpo|inOutQuad|inQuad|linear|outExpo|outExpo|outQuad)|transition\.(cancel|dissolve|from|to)|facebook\.(login|logout|request|showDialog)|media\.(pauseSound|newRecording|newEventSound|getSoundVolume|playEventSound|playSound|playVideo|setSoundVolume|show|stopSound)|native\.(cancelWebPopup|showWebPopup|newTextField|newTextBox|cancelAlert|getFontNames|newFont|setActivityIndicator|setKeyboardFocus|showAlert)|timer\.(cancel|performWithDelay|resume|pause)|openfeint\.(downloadBlob|init|launchDashboard|setHighScore|unlockAchievement|uploadBlob)|os\.(clock|date|difftime|execute|exit|remove|rename|time)|physics\.(addBody|newJoint)|store\.(finishTransaction|init|loadProducts|purchase|restore)|audio\.(dispose|fade|fadeOut|findFreeChannel|getDuration|getMaxVolume|getMinVolume|getVolume|isChannelActive|isChannelPaused|isChannelPlaying|loadSound|loadStream|pause|play|reserveChannels|resume|rewind|seek|setMaxVolume|setMinVolume|setVolume|stop|stopWithDelay)|movieclip\.(newAnim)|crypto\.(digest|hmac|isLocationVisible|isScrollEnabled|isZoomEnabled|mapType))\b(?=[( {])</string>
231			<key>name</key>
232			<string>support.function.corona.lua</string>
233		</dict>
234		<dict>
235			<key>match</key>
236			<string>(?&lt;![^.]\.|:)\b(\:(addEventListener|setTextColor|contentToLocal|dispatchEvent|getParent|localToContent|removeEventListener|removeSelf|rotate|scale|setReferencePoint|toBack|toFront|translate|setTextColor|setFillColor|setStrokeColor|getSampleRate|getTunerFrequency|getTunerVolume|isRecording|setSampleRate|startRecording|startTuner|stopRecording|stopTuner|previousFrame|reverse|setDrag|setLabels|stop|stopAtFrame|insert|remove|applyAngularImpulse|applyForce|applyLinearImpulse|applyTorque|getLinearVelocity|resetMassData|setLinearVelocity|getAnchorA|getAnchorB|getLimits|getReactionForce|getRotationLimits|setLimits|setRotationLimits|byte|char|dump|find|format|gmatch|gsub|len|lower|match|rep|reverse|sub|upper|concat|insert|maxn|remove|sort)|stage\:(setFocus)|file\:(close|flush|lines|read|seek|setvbuf|write|addMarker|setCenter|getAddressLocation|setRegion))\b(?=[( {])</string>
237			<key>name</key>
238			<string>support.function.corona.colons.lua</string>
239		</dict>
240		<dict>
241			<key>match</key>
242			<string>\b(x|xOrigin|xReference|xScale|y|yOrigin|yReference|yScale|align|font|hasBackground|size|text|inputType|isSecure|dampingRatio|frequency|isLimitEnabled|isMotorEnabled|jointAngle|jointSpeed|jointTranslation|length|length1|length2|maxForce|maxMotorForce|maxMotorTorque|maxTorque|motorForce|motorSpeed|motorTorque|store\.(canMakePurchases)|alpha|contentBounds|height|isHitTestable|isVisible|length|parent|rotation|width|numChildren|size|strokeWidth)\b</string>
243			<key>name</key>
244			<string>keyword.corona.lua</string>
245		</dict>
246		<dict>
247			<key>match</key>
248			<string>\b(storyboard\.(getPrevious|getScene|gotoScene|newScene|purgeAll|purgeScene|removeAll|removeScene))\b</string>
249			<key>name</key>
250			<string>keyword.corona.storyboard.lua</string>
251		</dict>
252		<dict>
253			<key>match</key>
254			<string>\b(display\.(actualContentWidth|actualContentHeight|contentCenterX|contentCenterY|contentHeight|contentScaleX|contentScaleY|contentWidth|currentStage|fps|imageSuffix|pixelHeight|pixelWidth|screenOriginX|screenOriginY|statusBarHeight|viewableContentHeight|viewableContentWidth|stageHeight|stageWidth|stageBounds|HiddenStatusBar|DefaultStatusBar|TranslucentStatusBar|DarkStatusBar|TopLeftReferencePoint|TopCenterReferencePoint|TopRightReferencePoint|BottomLeftReferencePoint|BottomCenterReferencePoint|BottomRightReferencePoint|CenterReferencePoint|CenterLeftReferencePoint|CenterRightReferencePoint))\b</string>
255			<key>name</key>
256			<string>keyword.corona.display.lua</string>
257		</dict>
258		<dict>
259			<key>match</key>
260			<string>\b(sprite\.(animating|currentFrame|sequence|addEventListener|pause|play|prepare|dispose))\b</string>
261			<key>name</key>
262			<string>keyword.corona.sprite.lua</string>
263		</dict>
264		<dict>
265			<key>match</key>
266			<string>\b(physics\.(angularDamping|angularVelocity|bodyType|isAwake|isBodyActive|isBullet|isFixedRotation|isSleepingAllowed|linearDamping|start|setGravity|setDrawMode|addBody|getGravity|newJoint|pause|removeBody|setPositionIterations|setScale|setVelocityIterations|stop))\b</string>
267			<key>name</key>
268			<string>keyword.corona.physics.lua</string>
269		</dict>
270		<dict>
271			<key>match</key>
272			<string>\b(audio\.(freeChannels|reservedChannels|totalChannels|unreservedFreeChannels|unreservedUsedChannels|usedChannels))\b</string>
273			<key>name</key>
274			<string>keyword.corona.audio.lua</string>
275		</dict>
276		<dict>
277			<key>match</key>
278			<string>\b(crypto\.(md4|md5|sha1|sha224|sha256|sha384|sha512))\b</string>
279			<key>name</key>
280			<string>keyword.corona.crypto.lua</string>
281		</dict>
282		<dict>
283			<key>match</key>
284			<string>\b(credits\.(init|requestUpdate|showOffers))\b</string>
285			<key>name</key>
286			<string>keyword.corona.credits.lua</string>
287		</dict>
288		<dict>
289			<key>match</key>
290			<string>\b(gameNetwork\.(init|show|request))\b</string>
291			<key>name</key>
292			<string>keyword.corona.gamenetwork.lua</string>
293		</dict>
294		<dict>
295			<key>match</key>
296			<string>\b(facebook\.(login|logout|showDialog|request))\b</string>
297			<key>name</key>
298			<string>keyword.corona.facebook.lua</string>
299		</dict>
300		<dict>
301			<key>match</key>
302			<string>\b(store\.(init|loadProducts|purchase|canMakePurchases|finishTransaction))\b</string>
303			<key>name</key>
304			<string>keyword.corona.store.lua</string>
305		</dict>
306		<dict>
307			<key>match</key>
308			<string>\b(json\.(decode|encode|null))\b</string>
309			<key>name</key>
310			<string>keyword.corona.json.lua</string>
311		</dict>
312		<dict>
313			<key>match</key>
314			<string>\b(event\.(invalidProducts|name|products|transaction|isShake|name|xGravity|xInstant|yGravity|yInstant|zGravity|zInstant|channel|completed|handle|phase|action|index|name|target|name|time|geographic|magnetic|name|accuracy|altitude|direction|errorCode|errorMessage|latitude|longitude|name|speed|time|delta|name|type|force|friction|object1|object2|other|other|phase|sprite|name|type|count|name|source|time|id|phase|time|xStart|yStart|errorCode|errorMessage|name|url|x|y))\b</string>
315			<key>name</key>
316			<string>keyword.corona.event.lua</string>
317		</dict>
318		<dict>
319			<key>match</key>
320			<string>\b(system\.(DocumentsDirectory|TemporaryDirectory|pathForFile|ResourceDirectory|activate|getInfo|getPreference|getTimer|hasEventSource|openURL|orientation|setAccelerometerInterval|setGyroscopeInterval|setIdleTimer|setLocationAccuracy|setLocationThreshold|vibrate))\b</string>
321			<key>name</key>
322			<string>keyword.corona.system.lua</string>
323		</dict>
324		<dict>
325			<key>match</key>
326			<string>\b(widget\.(newButton|newEmbossedText|newPickerWheel|newScrollView|newSegmentedControl|newSlider|newTableView|newToolbar))\b</string>
327			<key>name</key>
328			<string>keyword.corona.widget.lua</string>
329		</dict>
330	</array>
331	<key>scopeName</key>
332	<string>source.lua</string>
333	<key>uuid</key>
334	<string>93E017CC-6F27-11D9-90EB-000D93589AF7</string>
335</dict>
336</plist>