Last active
August 29, 2015 14:10
-
-
Save SquidDev/6980ceb579a2608666db to your computer and use it in GitHub Desktop.
Sublime Language for LuaAssemblyTools (https://github.com/mlnlover11/LuaAssemblyTools)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// [PackageDev] target_format: plist, ext: tmLanguage | |
{ | |
"name": "Lua Assembly", | |
"scopeName": "source.lasm", | |
"fileTypes": ["lasm"], | |
"uuid": "3507f71d-f02d-4af7-ab7d-027c8e7313de", | |
"patterns": [ | |
{ | |
"beginCaptures": { | |
"0": { | |
"name": "punctuation.definition.string.begin.lua" | |
} | |
}, | |
"endCaptures": { | |
"0": { | |
"name": "punctuation.definition.string.end.lua" | |
} | |
}, | |
"end": "'", | |
"name": "string.quoted.single.lua", | |
"begin": "'", | |
"patterns": [ | |
{ | |
"match": "\\\\\"", | |
"name": "constant.character.escape.lua" | |
} | |
] | |
}, | |
{ | |
"beginCaptures": { | |
"0": { | |
"name": "punctuation.definition.string.begin.lua" | |
} | |
}, | |
"endCaptures": { | |
"0": { | |
"name": "punctuation.definition.string.end.lua" | |
} | |
}, | |
"end": "\"", | |
"name": "string.quoted.double.lua", | |
"begin": "\"", | |
"patterns": [ | |
{ | |
"match": "\\\\\"", | |
"name": "constant.character.escape.lua" | |
} | |
] | |
}, | |
{ | |
"match": "(?<![^.]\\.|:)\\b(false|nil|true|_G|_VERSION|math\\.(pi|huge))\\b|(?<![.])\\.{3}(?!\\.)", | |
"name": "constant.language.lua" | |
}, | |
{ | |
"match": "(?<![\\d.])\\s0x[a-fA-F\\d]+|\\b\\d+(\\.\\d+)?([eE]-?\\d+)?|\\.\\d+([eE]-?\\d+)?", | |
"name": "constant.numeric.lua", | |
"comment": "Number" | |
}, | |
// Custom LASM code | |
{ | |
"match": "(?:\\n|^)\\s*([a-z]+)", | |
"name": "source.lasm", | |
"captures": { | |
"1": { "name": "keyword.source.lua" } | |
}, | |
"comment": "Instructions" | |
}, | |
{ | |
"match": "(?:\\n|^)\\s*(\\.[a-z]+)", | |
"name": "source.lasm", // Just a 'void' type | |
"captures": { | |
"1": { "name": "entity.name.tag.lasm" } | |
}, | |
"comment": "Anything starting with a ." | |
}, | |
{ | |
"match": ";[^\\n]*", | |
"name": "comment.line.lua", | |
"comment": "Anything starting with a ;" | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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>fileTypes</key> | |
<array> | |
<string>lasm</string> | |
</array> | |
<key>name</key> | |
<string>Lua Assembly</string> | |
<key>patterns</key> | |
<array> | |
<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>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>comment</key> | |
<string>Number</string> | |
<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>captures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>keyword.source.lua</string> | |
</dict> | |
</dict> | |
<key>comment</key> | |
<string>Instructions</string> | |
<key>match</key> | |
<string>(?:\n|^)\s*([a-z]+)</string> | |
<key>name</key> | |
<string>source.lasm</string> | |
</dict> | |
<dict> | |
<key>captures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>entity.name.tag.lasm</string> | |
</dict> | |
</dict> | |
<key>comment</key> | |
<string>Anything starting with a .</string> | |
<key>match</key> | |
<string>(?:\n|^)\s*(\.[a-z]+)</string> | |
<key>name</key> | |
<string>source.lasm</string> | |
</dict> | |
<dict> | |
<key>comment</key> | |
<string>Anything starting with a ;</string> | |
<key>match</key> | |
<string>;[^\n]*</string> | |
<key>name</key> | |
<string>comment.line.lua</string> | |
</dict> | |
</array> | |
<key>scopeName</key> | |
<string>source.lasm</string> | |
<key>uuid</key> | |
<string>3507f71d-f02d-4af7-ab7d-027c8e7313de</string> | |
</dict> | |
</plist> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment