/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
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
- <plist version="1.0">
- <dict>
- <key>comment</key>
- <string>Lua Syntax: version 0.8</string>
- <key>fileTypes</key>
- <array>
- <string>lua</string>
- </array>
- <key>foldingStartMarker</key>
- <string>^\s*\b(function|local\s+function|if|for|do)\b|{[ \t]*$|\[\[|^.*= function</string>
- <key>foldingStopMarker</key>
- <string>\bend\b|^\s*}|\]\]</string>
- <key>keyEquivalent</key>
- <string>^~L</string>
- <key>name</key>
- <string>Lua</string>
- <key>patterns</key>
- <array>
- <dict>
- <key>captures</key>
- <dict>
- <key>1</key>
- <dict>
- <key>name</key>
- <string>keyword.control.lua</string>
- </dict>
- <key>2</key>
- <dict>
- <key>name</key>
- <string>entity.name.function.scope.lua</string>
- </dict>
- <key>3</key>
- <dict>
- <key>name</key>
- <string>entity.name.function.lua</string>
- </dict>
- <key>4</key>
- <dict>
- <key>name</key>
- <string>punctuation.definition.parameters.begin.lua</string>
- </dict>
- <key>5</key>
- <dict>
- <key>name</key>
- <string>variable.parameter.function.lua</string>
- </dict>
- <key>6</key>
- <dict>
- <key>name</key>
- <string>punctuation.definition.parameters.end.lua</string>
- </dict>
- </dict>
- <key>match</key>
- <string>\b(function)\s+([a-zA-Z_.:]+[.:])?([a-zA-Z_]\w*)\s*(\()([^)]*)(\))</string>
- <key>name</key>
- <string>meta.function.lua</string>
- </dict>
- <dict>
- <key>match</key>
- <string>(?<![\d.])\s0x[a-fA-F\d]+|\b\d+(\.\d+)?([eE]-?\d+)?|\.\d+([eE]-?\d+)?</string>
- <key>name</key>
- <string>constant.numeric.lua</string>
- </dict>
- <dict>
- <key>begin</key>
- <string>'</string>
- <key>beginCaptures</key>
- <dict>
- <key>0</key>
- <dict>
- <key>name</key>
- <string>punctuation.definition.string.begin.lua</string>
- </dict>
- </dict>
- <key>end</key>
- <string>'</string>
- <key>endCaptures</key>
- <dict>
- <key>0</key>
- <dict>
- <key>name</key>
- <string>punctuation.definition.string.end.lua</string>
- </dict>
- </dict>
- <key>name</key>
- <string>string.quoted.single.lua</string>
- <key>patterns</key>
- <array>
- <dict>
- <key>match</key>
- <string>\\.</string>
- <key>name</key>
- <string>constant.character.escape.lua</string>
- </dict>
- </array>
- </dict>
- <dict>
- <key>begin</key>
- <string>"</string>
- <key>beginCaptures</key>
- <dict>
- <key>0</key>
- <dict>
- <key>name</key>
- <string>punctuation.definition.string.begin.lua</string>
- </dict>
- </dict>
- <key>end</key>
- <string>"</string>
- <key>endCaptures</key>
- <dict>
- <key>0</key>
- <dict>
- <key>name</key>
- <string>punctuation.definition.string.end.lua</string>
- </dict>
- </dict>
- <key>name</key>
- <string>string.quoted.double.lua</string>
- <key>patterns</key>
- <array>
- <dict>
- <key>match</key>
- <string>\\.</string>
- <key>name</key>
- <string>constant.character.escape.lua</string>
- </dict>
- </array>
- </dict>
- <dict>
- <key>begin</key>
- <string>(?<!--)\[(=*)\[</string>
- <key>beginCaptures</key>
- <dict>
- <key>0</key>
- <dict>
- <key>name</key>
- <string>punctuation.definition.string.begin.lua</string>
- </dict>
- </dict>
- <key>end</key>
- <string>\]\1\]</string>
- <key>endCaptures</key>
- <dict>
- <key>0</key>
- <dict>
- <key>name</key>
- <string>punctuation.definition.string.end.lua</string>
- </dict>
- </dict>
- <key>name</key>
- <string>string.quoted.other.multiline.lua</string>
- </dict>
- <dict>
- <key>begin</key>
- <string>--\[(=*)\[</string>
- <key>captures</key>
- <dict>
- <key>0</key>
- <dict>
- <key>name</key>
- <string>punctuation.definition.comment.lua</string>
- </dict>
- </dict>
- <key>end</key>
- <string>\]\1\]</string>
- <key>name</key>
- <string>comment.block.lua</string>
- </dict>
- <dict>
- <key>captures</key>
- <dict>
- <key>1</key>
- <dict>
- <key>name</key>
- <string>punctuation.definition.comment.lua</string>
- </dict>
- </dict>
- <key>match</key>
- <string>(--)(?!\[\[).*$\n?</string>
- <key>name</key>
- <string>comment.line.double-dash.lua</string>
- </dict>
- <dict>
- <key>match</key>
- <string>\b(break|do|else|for|if|elseif|return|then|repeat|while|until|end|function|local|in)\b</string>
- <key>name</key>
- <string>keyword.control.lua</string>
- </dict>
- <dict>
- <key>match</key>
- <string>(?<![^.]\.|:)\b(false|nil|true|_G|_VERSION|math\.(pi|huge))\b|(?<![.])\.{3}(?!\.)</string>
- <key>name</key>
- <string>constant.language.lua</string>
- </dict>
- <dict>
- <key>match</key>
- <string>(?<![^.]\.|:)\b(self)\b</string>
- <key>name</key>
- <string>variable.language.self.lua</string>
- </dict>
- <dict>
- <key>match</key>
- <string>(?<![^.]\.|:)\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>
- <key>name</key>
- <string>support.function.lua</string>
- </dict>
- <dict>
- <key>match</key>
- <string>(?<![^.]\.|:)\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>
- <key>name</key>
- <string>support.function.library.lua</string>
- </dict>
- <dict>
- <key>match</key>
- <string>\b(and|or)\b</string>
- <key>name</key>
- <string>keyword.operator.lua</string>
- </dict>
- <dict>
- <key>match</key>
- <string>\+|-|%|#|\*|\/|\^|==?|~=|<=?|>=?|(?<!\.)\.{2}(?!\.)</string>
- <key>name</key>
- <string>keyword.operator.lua</string>
- </dict>
- <dict>
- <key>match</key>
- <string>(?<![^.]\.|:)\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>
- <key>name</key>
- <string>support.function.corona.lua</string>
- </dict>
- <dict>
- <key>match</key>
- <string>(?<![^.]\.|:)\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>
- <key>name</key>
- <string>support.function.corona.colons.lua</string>
- </dict>
- <dict>
- <key>match</key>
- <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>
- <key>name</key>
- <string>keyword.corona.lua</string>
- </dict>
- <dict>
- <key>match</key>
- <string>\b(storyboard\.(getPrevious|getScene|gotoScene|newScene|purgeAll|purgeScene|removeAll|removeScene))\b</string>
- <key>name</key>
- <string>keyword.corona.storyboard.lua</string>
- </dict>
- <dict>
- <key>match</key>
- <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>
- <key>name</key>
- <string>keyword.corona.display.lua</string>
- </dict>
- <dict>
- <key>match</key>
- <string>\b(sprite\.(animating|currentFrame|sequence|addEventListener|pause|play|prepare|dispose))\b</string>
- <key>name</key>
- <string>keyword.corona.sprite.lua</string>
- </dict>
- <dict>
- <key>match</key>
- <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>
- <key>name</key>
- <string>keyword.corona.physics.lua</string>
- </dict>
- <dict>
- <key>match</key>
- <string>\b(audio\.(freeChannels|reservedChannels|totalChannels|unreservedFreeChannels|unreservedUsedChannels|usedChannels))\b</string>
- <key>name</key>
- <string>keyword.corona.audio.lua</string>
- </dict>
- <dict>
- <key>match</key>
- <string>\b(crypto\.(md4|md5|sha1|sha224|sha256|sha384|sha512))\b</string>
- <key>name</key>
- <string>keyword.corona.crypto.lua</string>
- </dict>
- <dict>
- <key>match</key>
- <string>\b(credits\.(init|requestUpdate|showOffers))\b</string>
- <key>name</key>
- <string>keyword.corona.credits.lua</string>
- </dict>
- <dict>
- <key>match</key>
- <string>\b(gameNetwork\.(init|show|request))\b</string>
- <key>name</key>
- <string>keyword.corona.gamenetwork.lua</string>
- </dict>
- <dict>
- <key>match</key>
- <string>\b(facebook\.(login|logout|showDialog|request))\b</string>
- <key>name</key>
- <string>keyword.corona.facebook.lua</string>
- </dict>
- <dict>
- <key>match</key>
- <string>\b(store\.(init|loadProducts|purchase|canMakePurchases|finishTransaction))\b</string>
- <key>name</key>
- <string>keyword.corona.store.lua</string>
- </dict>
- <dict>
- <key>match</key>
- <string>\b(json\.(decode|encode|null))\b</string>
- <key>name</key>
- <string>keyword.corona.json.lua</string>
- </dict>
- <dict>
- <key>match</key>
- <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>
- <key>name</key>
- <string>keyword.corona.event.lua</string>
- </dict>
- <dict>
- <key>match</key>
- <string>\b(system\.(DocumentsDirectory|TemporaryDirectory|pathForFile|ResourceDirectory|activate|getInfo|getPreference|getTimer|hasEventSource|openURL|orientation|setAccelerometerInterval|setGyroscopeInterval|setIdleTimer|setLocationAccuracy|setLocationThreshold|vibrate))\b</string>
- <key>name</key>
- <string>keyword.corona.system.lua</string>
- </dict>
- <dict>
- <key>match</key>
- <string>\b(widget\.(newButton|newEmbossedText|newPickerWheel|newScrollView|newSegmentedControl|newSlider|newTableView|newToolbar))\b</string>
- <key>name</key>
- <string>keyword.corona.widget.lua</string>
- </dict>
- </array>
- <key>scopeName</key>
- <string>source.lua</string>
- <key>uuid</key>
- <string>93E017CC-6F27-11D9-90EB-000D93589AF7</string>
- </dict>
- </plist>