Compare commits
60 Commits
Author | SHA1 | Date |
---|---|---|
Derek Schmidt | 41dca29833 | |
theRemix | 9bacfaa695 | |
theRemix | 77e901fab7 | |
Jon Borgonia | 510965fefe | |
theRemix | 65b71e0494 | |
tong | b4a0bd085d | |
Jon Borgonia | 7ec41ac94b | |
theRemix | 2a2fc2fd3f | |
tong | 00d843fe8a | |
tong | f1c0f0ebe2 | |
tong | 0281d182e4 | |
tong | ced3ed06a5 | |
tong | ec8ec0f138 | |
tong | 09ca683171 | |
tong | 350f2d2e75 | |
tong | 12d4e775a9 | |
tong | 086a9dfed3 | |
Jon Borgonia | 2477c22882 | |
theRemix | 5a1571b1e8 | |
tong | 3eb5f1cb1e | |
tong | 3b62a6d844 | |
tong | 97ac2f9ee4 | |
tong | 30e951f2ac | |
tong | 5c51440547 | |
tong | b631dd3bf8 | |
tong | 20527cab89 | |
Jon Borgonia | 19a9b2ec54 | |
Jon Borgonia | 488c45b22a | |
theRemix | 4345a46b63 | |
tong | 6ddbc00a42 | |
tong | c7aaeb74f8 | |
tong | 788bf02125 | |
tong | 19baad41e4 | |
tong | cf4926f9e4 | |
Jon Borgonia | 631cbd76aa | |
Jon Borgonia | 03fe6419f9 | |
theRemix | f9496ab737 | |
tong | 8c441f0fb6 | |
tong | 8280640317 | |
tong | e02988158f | |
tong | 42f9e22bc3 | |
tong | 0f3d2407cd | |
tong | 12494887df | |
Jon Borgonia | c2cb09d6fe | |
theRemix | b66d3144bf | |
Jon Borgonia | f08cbf2e00 | |
theRemix | b0ac7933f7 | |
theRemix | 0ab0a32215 | |
theRemix | 1b9460a231 | |
tong | 181a169291 | |
tong | eab7303aaa | |
tong | c0965fa59e | |
tong | ec8a43a77f | |
tong | 4b0a747343 | |
tong | 2b546c37f9 | |
tong | 0e800a195c | |
tong | d6ba81c003 | |
tong | 45c50eec40 | |
tong | 1283a6b390 | |
tong | 4df30decaf |
|
@ -0,0 +1,13 @@
|
|||
language: objective-c
|
||||
|
||||
notifications:
|
||||
email:
|
||||
on_success: never
|
||||
on_failure: change
|
||||
|
||||
script: 'curl -s https://raw.githubusercontent.com/atom/ci/master/build-package.sh | sh'
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- dev
|
33
CHANGELOG.md
33
CHANGELOG.md
|
@ -1,3 +1,36 @@
|
|||
## 0.6.0
|
||||
* Snippets: cast, dynamic, using
|
||||
* Snippets: std library top level definitions
|
||||
* Grammars: recognises interpreter directives, emacs modelines, vim modelines
|
||||
|
||||
## 0.5.4
|
||||
* Update grammar to haxe 3.4.0-rc.1
|
||||
|
||||
## 0.5.3
|
||||
* Snippets: remove unnecessary line endings
|
||||
* Snippets: description urls for Array/List/Map
|
||||
* Snippets: remove Array/List/Map parentheses
|
||||
|
||||
## 0.5.2
|
||||
* Fix scope name
|
||||
* Snippets: null
|
||||
* Snippets: hxml -D <v> definitions
|
||||
* Spec: fixes "tokenizes the #{keyword} keyword"
|
||||
|
||||
## 0.5.1
|
||||
* Grammars cleanup
|
||||
* Remove std lib grammars
|
||||
* More snippet descriptions
|
||||
* Add snippet for true/false
|
||||
* Spec: add all keywords
|
||||
|
||||
## 0.5.0
|
||||
* Fixed hxml grammar comment definition
|
||||
* Added descriptions and urls to snippets
|
||||
* Snippet for haxelib.json
|
||||
* Spec tests
|
||||
* TravisCI integration
|
||||
|
||||
## 0.4.5
|
||||
* Grammar: remove flash specific std grammar definitions
|
||||
* Fix hxml snippet
|
||||
|
|
22
README.md
22
README.md
|
@ -1,5 +1,7 @@
|
|||
# Haxe language support in Atom
|
||||
|
||||
[![Package version!](https://img.shields.io/apm/v/language-haxe.svg?style=flat-square)](https://atom.io/packages/language-haxe) [![Plugin installs!](https://img.shields.io/apm/dm/language-haxe.svg?style=flat-square)](https://atom.io/packages/language-haxe) [![Build Status](https://travis-ci.org/theRemix/language-haxe.svg?branch=master)](https://travis-ci.org/theRemix/language-haxe)
|
||||
|
||||
Adds syntax highlighting and snippets to Haxe files in Atom (`hx`,`hxml`).
|
||||
|
||||
Originally [converted](http://atom.io/docs/latest/converting-a-text-mate-bundle)
|
||||
|
@ -13,32 +15,32 @@ See the [Changelog](https://github.com/theRemix/language-haxe/blob/master/CHANGE
|
|||
|
||||
***
|
||||
|
||||
**'v'**
|
||||
`v`
|
||||
![v](http://i.imgur.com/J3ytuSc.gif)
|
||||
|
||||
**'var'**
|
||||
`var`
|
||||
![var](http://i.imgur.com/c7oiRUj.gif)
|
||||
|
||||
**'fn'**
|
||||
`fn`
|
||||
![fn](http://i.imgur.com/9sSup2a.gif)
|
||||
|
||||
**'fun'**
|
||||
`fun`
|
||||
![fun](http://i.imgur.com/F8GOyD5.gif)
|
||||
|
||||
**'pf'**
|
||||
`pf`
|
||||
![pf](http://i.imgur.com/JTlbPa9.gif)
|
||||
|
||||
**'prf'**
|
||||
`prf`
|
||||
![prf](http://i.imgur.com/2ytFnNt.gif)
|
||||
|
||||
**'prsif' 'ret'**
|
||||
`prsif` `ret`
|
||||
![prsif ret](http://i.imgur.com/EpRCRCG.gif)
|
||||
|
||||
**'switch' 'case' 'def'**
|
||||
`switch` `case` `def`
|
||||
![switch case def](http://i.imgur.com/5oFnPTg.gif)
|
||||
|
||||
**'fori' 'tr'**
|
||||
`fori` `tr`
|
||||
![fori tr](http://i.imgur.com/jD1IQtt.gif)
|
||||
|
||||
**'for' 'trace'**
|
||||
`for` `trace`
|
||||
![for trace](http://i.imgur.com/HocLlST.gif)
|
||||
|
|
|
@ -1,6 +1,26 @@
|
|||
'scopeName': 'source.haxe'
|
||||
'name': 'Haxe'
|
||||
'comment': 'Haxe Syntax: version 3.3.0'
|
||||
'fileTypes': ['hx']
|
||||
'firstLineMatch': '''(?x)
|
||||
# Hashbang
|
||||
^\\#!.*(?:\\s|\\/)
|
||||
haxe
|
||||
(?:$|\\s)
|
||||
|
|
||||
# Modeline
|
||||
(?i:
|
||||
# Emacs
|
||||
-\\*-(?:\\s*(?=[^:;\\s]+\\s*-\\*-)|(?:.*?[;\\s]|(?<=-\\*-))mode\\s*:\\s*)
|
||||
haxe
|
||||
(?=[\\s;]|(?<![-*])-\\*-).*?-\\*-
|
||||
|
|
||||
# Vim
|
||||
(?:(?:\\s|^)vi(?:m[<=>]?\\d+|m)?|\\sex)(?=:(?=\\s*set?\\s[^\\n:]+:)|:(?!\\s*set?\\s))(?:(?:\\s|\\s*:\\s*)\\w*(?:\\s*=(?:[^\\n\\\\\\s]|\\\\.)*)?)*[\\s:](?:filetype|ft|syntax)\\s*=
|
||||
haxe
|
||||
(?=\\s|:|$)
|
||||
)
|
||||
'''
|
||||
'foldingStartMarker': '(\\{\\s*(//.*)?$|^\\s*// \\{\\{\\{|#if)'
|
||||
'foldingStopMarker': '^\\s*(\\}|// \\}\\}\\}$|#end)'
|
||||
'patterns': [
|
||||
|
@ -38,90 +58,6 @@
|
|||
'match': '#(if|else|elseif|end|error)\\b'
|
||||
'name': 'keyword.preprocessor.macro.haxe'
|
||||
}
|
||||
{
|
||||
'match': '\\b(Array|ArrayAccess|Bool|Class|Date|DateTools|Dynamic|EReg|Enum|Float|Hash|Int|IntHash|IntIter|Iterable|Iterator|Lambda|List|Math|Null|Reflect|Std|String|StringBuf|StringTools|Type|UInt|ValueType|Void|Xml|XmlType)\\b'
|
||||
'name': 'support.class.haxe'
|
||||
}
|
||||
{
|
||||
'match': '\\b(FastCell|FastList|Firebug|Http|Int32|Log|Md5|PosInfos|Public|Resource|Serializer|Stack|StackItem|Template|Timer|TimerQueue|TypeResolver|Unserializer)\\b'
|
||||
'name': 'support.class.haxe.haxe'
|
||||
}
|
||||
{
|
||||
'match': '\\b(Bytes|BytesBuffer|BytesData|BytesInput|BytesOutput|Eof|Error|Input|Output|StringInput)\\b'
|
||||
'name': 'support.class.haxe.io'
|
||||
}
|
||||
{
|
||||
'match': '\\b(AMFConnection|AsyncAdapter|AsyncConnection|AsyncDebugConnection|AsyncProxy|Connection|Context|ContextAll|DelayedConnection|ExternalConnection|FlashJsConnection|HttpAsyncConnection|HttpConnection|LocalConnection|Proxy|Socket|SocketConnection|SocketProtocol|SocketWrapper|SyncSocketConnection)\\b'
|
||||
'name': 'support.class.haxe.haxe.remoting'
|
||||
}
|
||||
{
|
||||
'match': '\\b(CType|ClassField|Classdef|EnumField|Enumdef|Generic|Infos|Path|PathParams|Platforms|Rights|TypeApi|TypeInfos|TypeParams|TypeRoot|TypeTree|Typedef|XmlParser)\\b'
|
||||
'name': 'support.class.haxe.haxe.rtti'
|
||||
}
|
||||
{
|
||||
'match': '\\b(TestCase|TestResult|TestRunner|TestStatus)\\b'
|
||||
'name': 'support.class.haxe.haxe.unit'
|
||||
}
|
||||
{
|
||||
'match': '\\b(Attrib|Check|Fast|Filter|Proxy|Rule)\\b'
|
||||
'name': 'support.class.haxe.haxe.xml'
|
||||
}
|
||||
{
|
||||
'match': '\\b(Anchor|Body|Boot|Button|Checkbox|Document|Dom|Event|FileUpload|Form|FormElement|Frame|Frameset|Hidden|History|HtmlCollection|HtmlDom|IFrame|Image|Lib|Link|Location|MetaDom|Navigator|Option|Password|Radio|Reset|SWFObject|Screen|Select|Selection|Style|StyleSheet|Submit|Text|Textarea|Window|XMLHttpRequest|XMLSocket)\\b'
|
||||
'name': 'support.class.haxe.js'
|
||||
}
|
||||
{
|
||||
'match': '\\b(Boot|FileKind|FileStat|FileSystem|Lib|Random|Sys|Utf8|Web)\\b'
|
||||
'name': 'support.class.haxe.neko'
|
||||
}
|
||||
{
|
||||
'match': '\\b(Connection|Manager|MySql|Object|ResultSet|Sqlite|Transaction)\\b'
|
||||
'name': 'support.class.haxe.neko.db'
|
||||
}
|
||||
{
|
||||
'match': '\\b(File|FileHandle|FileInput|FileOutput|FileSeek|Path|Process)\\b'
|
||||
'name': 'support.class.haxe.neko.io'
|
||||
}
|
||||
{
|
||||
'match': '\\b(Host|Poll|ProxyDetect|Proxysettings|ServerLoop|Socket|SocketHandle|SocketInput|SocketOutput|ThreadRemotingServer|ThreadServer)\\b'
|
||||
'name': 'support.class.haxe.neko.net'
|
||||
}
|
||||
{
|
||||
'match': '\\b(Deque|Gc|Loader|LoaderHandle|Lock|Module|ModuleHandle|Mutex|Thread|ThreadHandle|Tls|Ui)\\b'
|
||||
'name': 'support.class.haxe.neko.vm'
|
||||
}
|
||||
{
|
||||
'match': '\\b(CRC32|Compress|Flush|Reader|Uncompress|Writer|ZipEntry)\\b'
|
||||
'name': 'support.class.haxe.neko.zip'
|
||||
}
|
||||
{
|
||||
'match': '\\b(Boot|CacheLimiter|Exception|FileKind|FileStat|FileSystem|HException|IniHash|Lib|Session|Sys|Utf8|Web)\\b'
|
||||
'name': 'support.class.haxe.php'
|
||||
}
|
||||
{
|
||||
'match': '\\b(Connection|DBase|Field|FieldType|Manager|Mysql|Object|ResultSet|Sqlite)\\b'
|
||||
'name': 'support.class.haxe.php.db'
|
||||
}
|
||||
{
|
||||
'match': '\\b(File|FileHandle|FileInput|FileOutput|FileSeek|Path|Process)\\b'
|
||||
'name': 'support.class.haxe.php.io'
|
||||
}
|
||||
{
|
||||
'match': '\\b(Host|Socket|SocketDomain|SocketHandle|SocketInput|SocketOutput|Process)\\b'
|
||||
'name': 'support.class.haxe.php.net'
|
||||
}
|
||||
{
|
||||
'match': '\\b(HtmlPrinter|Main)\\b'
|
||||
'name': 'support.class.haxe.tools.haxedoc'
|
||||
}
|
||||
{
|
||||
'match': '\\b(Answer|Datas|Developer|Main|Progress|ProgressIn|Project|ProjectInfos|ProjectManager|Remoting_SiteApi|Site|SiteApi|SiteDb|SiteProxy|User|UserInfos|Version|VersionInfos|VersionManager|XmlInfos)\\b'
|
||||
'name': 'support.class.haxe.tools.haxelib'
|
||||
}
|
||||
{
|
||||
'match': '\\b(Main|Progress)\\b'
|
||||
'name': 'support.class.haxe.tools.hxinst'
|
||||
}
|
||||
{
|
||||
'match': '\\b(trace|this|super|untyped)\\b'
|
||||
'name': 'support.function.haxe'
|
||||
|
@ -448,10 +384,6 @@
|
|||
'match': '\\b__(init|name|ename|super|unprotect|constructs|class|enum)__\\b'
|
||||
'name': 'support.variable.magic.haxe'
|
||||
}
|
||||
{
|
||||
'match': '\\b(Array|ArrayAccess|Bool|Class|Date|DateTools|Dynamic|EReg|Enum|EnumValue|Float|IMap|Int|IntIterator|Iterable|Iterator|Lambda|List|Math|Null|Reflect|Single|Std|String|StringBuf|StringTools|Sys|Type|UInt|ValueType|Void|Xml|XmlType|TBool|TInt|TFloat|TFunction|TObject|TEnum|TClass|TNull|TUnknown)\\b'
|
||||
'name': 'support.class.haxe'
|
||||
}
|
||||
{
|
||||
'include': '#storage'
|
||||
}
|
||||
|
@ -527,4 +459,3 @@
|
|||
]
|
||||
}
|
||||
]
|
||||
'scopeName': 'source.haxe'
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
'scopeName': 'source.haxelib'
|
||||
'fileTypes': ['json']
|
||||
'name': 'haxelib'
|
||||
'patterns': [
|
||||
{ 'include': 'source.json' }
|
||||
]
|
|
@ -1,6 +1,5 @@
|
|||
'fileTypes': [
|
||||
'hxml'
|
||||
]
|
||||
'scopeName': 'source.hxml'
|
||||
'fileTypes': ['hxml']
|
||||
'foldingStartMarker': '/\\*\\*|\\{\\s*$'
|
||||
'foldingStopMarker': '\\*\\*/|^\\s*\\}'
|
||||
'name': 'Hxml'
|
||||
|
@ -10,15 +9,14 @@
|
|||
'name': 'keyword.compiler.arguments.hxml'
|
||||
}
|
||||
{
|
||||
'match': '(absolute-path|advanced-telemetry|annotate-source|as3|check-xml-proxy|core-api|core-api-serialize|cppia|dce|dce-debug|debug|display|display-stdin|dll-export|dll-import|doc-gen|dump|dump-dependencies|dump-ignore-var-ids|dynamic-interface-closures|erase-generics|fast-cast|fdb|file-extension|flash-strict|flash-use-stage|force-lib-check|force-native-property|format-warning|gencommon-debug|haxe-boot|haxe-ver|hxcpp-api-level|include-prefix|interp|java-ver|jquery-ver|js-classic|js-es5|js-unflatten|keep-old-output|loop-unroll-max-cost|lua-jit|lua-ver|macro|macro-times|neko-source|neko-v1|net-target|net-ver|network-sandbox|no-analyzer|no-compilation|no-copt|no-debug|no-deprecation-warnings|no-flash-override|no-inline|no-macro-cache|no-opt|no-pattern-matching|no-root|no-simplify|no-swf-compress|no-traces|objc|php-prefix|real-position|replace-files|scriptable|shallow-expose|source-header|source-map-content|swc|swf-compress-level|swf-debug-password|swf-direct-blit|swf-gpu|swf-metadata|swf-preloader-frame|swf-protected|swf-script-timeout|swf-use-doabc|sys|unsafe|use-nekoc|use-rtti-doc|vcproj)'
|
||||
'match': '(absolute-path|advanced-telemetry|annotate-source|as3|check-xml-proxy|core-api|core-api-serialize|cppia|dce|dce-debug|debug|display|display-stdin|dll-export|dll-import|doc-gen|dump|dump-dependencies|dump-ignore-var-ids|dynamic-interface-closures|erase-generics|fast-cast|fdb|file-extension|flash-strict|flash-use-stage|force-lib-check|force-native-property|format-warning|gencommon-debug|haxe-boot|haxe-ver|hxcpp-api-level|include-prefix|interp|java-ver|jquery-ver|js-classic|js-es|js-source-map|js-unflatten|keep-old-output|loop-unroll-max-cost|lua-jit|lua-ver|macro|macro-debug|macro-times|neko-source|neko-v1|net-target|net-ver|network-sandbox|no-analyzer|no-compilation|no-copt|no-debug|no-deprecation-warnings|no-flash-override|no-inline|no-macro-cache|no-opt|no-pattern-matching|no-root|no-swf-compress|no-traces|objc|php-prefix|real-position|replace-files|scriptable|shallow-expose|source-header|source-map-content|swc|swf-compress-level|swf-debug-password|swf-direct-blit|swf-gpu|swf-metadata|swf-preloader-frame|swf-protected|swf-script-timeout|swf-use-doabc|sys|unsafe|use-nekoc|use-rtti-doc|vcproj)'
|
||||
'name': 'keyword.compiler.flags.hxml'
|
||||
}
|
||||
{
|
||||
'captures':
|
||||
'1':
|
||||
'name': 'punctuation.definition.comment.actionscript'
|
||||
'name': 'punctuation.definition.comment.haxe'
|
||||
'match': '(#).*$\\n?'
|
||||
'name': 'comment.line.number-sign.hxml'
|
||||
}
|
||||
]
|
||||
'scopeName': 'source.hxml'
|
||||
|
|
|
@ -0,0 +1,63 @@
|
|||
name: 'Haxe'
|
||||
scopeName: 'source.haxe'
|
||||
type: 'tree-sitter'
|
||||
parser: 'tree-sitter-haxe'
|
||||
fileTypes: ['hx']
|
||||
firstLineMatch: '''(?x)
|
||||
# Hashbang
|
||||
^\\#!.*(?:\\s|\\/)
|
||||
haxe
|
||||
(?:$|\\s)
|
||||
|
|
||||
# Modeline
|
||||
(?i:
|
||||
# Emacs
|
||||
-\\*-(?:\\s*(?=[^:;\\s]+\\s*-\\*-)|(?:.*?[;\\s]|(?<=-\\*-))mode\\s*:\\s*)
|
||||
haxe
|
||||
(?=[\\s;]|(?<![-*])-\\*-).*?-\\*-
|
||||
|
|
||||
# Vim
|
||||
(?:(?:\\s|^)vi(?:m[<=>]?\\d+|m)?|\\sex)(?=:(?=\\s*set?\\s[^\\n:]+:)|:(?!\\s*set?\\s))(?:(?:\\s|\\s*:\\s*)\\w*(?:\\s*=(?:[^\\n\\\\\\s]|\\\\.)*)?)*[\\s:](?:filetype|ft|syntax)\\s*=
|
||||
haxe
|
||||
(?=\\s|:|$)
|
||||
)
|
||||
'''
|
||||
|
||||
folds: [
|
||||
{ type: 'comment' }
|
||||
]
|
||||
|
||||
comments:
|
||||
start: '// '
|
||||
|
||||
scopes:
|
||||
'module': 'source.haxe'
|
||||
|
||||
'comment': 'comment.line.double-slash.haxe'
|
||||
'keyword': 'keyword.control'
|
||||
|
||||
'package_statement > keyword': 'keyword.package.haxe'
|
||||
'import_statement > keyword': 'storage.import.haxe'
|
||||
'import_statement > attribute > identifier': 'entity.name.type.import.haxe'
|
||||
|
||||
'class_declaration > keyword': 'storage.class.haxe'
|
||||
'class_declaration > identifier': 'entity.name.type.class.haxe'
|
||||
'class_declaration > attribute > identifier': 'entity.other.inherited-class.haxe'
|
||||
|
||||
'function_declaration > keyword': 'keyword.function.haxe'
|
||||
'function_declaration > identifier': 'entity.name.type.function.haxe'
|
||||
|
||||
'variable_declaration > keyword': 'keyword.variable.haxe'
|
||||
|
||||
'call > attribute:nth-child(0) > identifier': [
|
||||
{ match: 'super|trace', scopes: 'support.function.haxe'},
|
||||
{ match: '^[A-Z]', scopes: 'support.type.contructor' },
|
||||
'entity.name.function',
|
||||
]
|
||||
|
||||
'attribute > identifier': [
|
||||
{ match: '^[A-Z]', scopes: 'entity.name.type.package' },
|
||||
{ match: 'this|super', scopes: 'variable.language.haxe' },
|
||||
]
|
||||
|
||||
'type > identifier': 'support.storage.type'
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"name": "language-haxe",
|
||||
"version": "0.6.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"nan": {
|
||||
"version": "2.15.0",
|
||||
"resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz",
|
||||
"integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ=="
|
||||
},
|
||||
"tree-sitter-haxe": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/tree-sitter-haxe/-/tree-sitter-haxe-0.1.0.tgz",
|
||||
"integrity": "sha512-uhzG4GtA21mZhc38dstae3XLmiFYF0HfW82PLqIZ7E7nUZV3un208BiB0iOTv/uLHv3VyvNPOAVeEQ1eNL+ulQ==",
|
||||
"requires": {
|
||||
"nan": "^2.14.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "language-haxe",
|
||||
"version": "0.4.5",
|
||||
"version": "0.6.0",
|
||||
"description": "Haxe language support in Atom",
|
||||
"keywords": [
|
||||
"haxe",
|
||||
|
@ -19,5 +19,7 @@
|
|||
"atom": ">=1.5.0 <2.0.0",
|
||||
"node": "*"
|
||||
},
|
||||
"dependencies": {}
|
||||
"dependencies": {
|
||||
"tree-sitter-haxe": "^0.1.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
'.source.hx':
|
||||
'.source.haxe':
|
||||
'editor':
|
||||
'commentStart': '// '
|
||||
'foldEndPattern': '^\\s*\\}|^\\s*\\]|^\\s*\\)'
|
||||
|
|
|
@ -1,215 +1,353 @@
|
|||
'.source.haxe':
|
||||
|
||||
'trace':
|
||||
'prefix': 'trace'
|
||||
'body': 'trace( $1 );$0'
|
||||
'#if':
|
||||
'prefix': '#if'
|
||||
'body': '#if ${1:<flag>}\n#end$0'
|
||||
'description': 'Conditional Compilation'
|
||||
'descriptionMoreURL': 'http://haxe.org/manual/lf-condition-compilation.html'
|
||||
'#else':
|
||||
'prefix': '#else'
|
||||
'body': '#else$0'
|
||||
'description': 'Conditional Compilation'
|
||||
'descriptionMoreURL': 'http://haxe.org/manual/lf-condition-compilation.html'
|
||||
'#elseif':
|
||||
'prefix': '#elseif'
|
||||
'body': '#elseif ${1:<flag>}$0'
|
||||
'description': 'Conditional Compilation'
|
||||
'descriptionMoreURL': 'http://haxe.org/manual/lf-condition-compilation.html'
|
||||
'#end':
|
||||
'prefix': '#end'
|
||||
'body': '#end$0'
|
||||
'description': 'Conditional Compilation'
|
||||
'descriptionMoreURL': 'http://haxe.org/manual/lf-condition-compilation.html'
|
||||
'#else error':
|
||||
'prefix': '#error'
|
||||
'body': '#error "${1:<flag>}"$0'
|
||||
'description': 'Conditional Compilation'
|
||||
'descriptionMoreURL': 'http://haxe.org/manual/lf-condition-compilation.html'
|
||||
|
||||
'#if':
|
||||
'prefix': '#if'
|
||||
'body': '#if ${1:define}'
|
||||
'#else':
|
||||
'prefix': '#else'
|
||||
'body': '#else '
|
||||
'#elseif':
|
||||
'prefix': '#elseif'
|
||||
'body': '#elseif ${1:define}'
|
||||
'#end':
|
||||
'prefix': '#end'
|
||||
'body': '#end\n'
|
||||
'#else error':
|
||||
'prefix': '#error'
|
||||
'body': '#else error #end\n'
|
||||
'Line Comment Start':
|
||||
'prefix': '//'
|
||||
'body': '// ${1:}$0'
|
||||
'Block Comment Start':
|
||||
'prefix': '/**'
|
||||
'body': '/**\n\t$1\n*/$0'
|
||||
'description': 'Block comment'
|
||||
|
||||
'try':
|
||||
'prefix': 'try'
|
||||
'body': 'try {\n\t$1\n} catch(${2:e:Dynamic}) {\n\t${3:trace(e);}\n}\n$0'
|
||||
'catch':
|
||||
'prefix': 'catch'
|
||||
'body': 'catch(${1:e:Dynamic}) {\n\t${2:trace(e);}\n}\n$0'
|
||||
'throw':
|
||||
'prefix': 'throw'
|
||||
'body': 'throw ${1:expr};\n$0'
|
||||
'trace':
|
||||
'prefix': 'trace'
|
||||
'body': 'trace( $1 )$0'
|
||||
'description': 'Print information'
|
||||
'descriptionMoreURL': 'http://haxe.org/manual/lf-trace-log.html'
|
||||
|
||||
'while':
|
||||
'prefix': 'while'
|
||||
'body': 'while( ${1:true} ) {\n\t$2\n}$0'
|
||||
'do..while':
|
||||
'prefix': 'do '
|
||||
'body': 'do {\n\t$0\n} while( ${1:true} );'
|
||||
'continue':
|
||||
'prefix': 'continue'
|
||||
'body': 'continue;'
|
||||
'break':
|
||||
'prefix': 'break'
|
||||
'body': 'break;'
|
||||
'true':
|
||||
'prefix': 'true'
|
||||
'body': 'true'
|
||||
'false':
|
||||
'prefix': 'false'
|
||||
'body': 'false'
|
||||
'null':
|
||||
'prefix': 'null'
|
||||
'body': 'null'
|
||||
|
||||
'if':
|
||||
'prefix': 'if'
|
||||
'body': 'if( ${1:condition} ) {\n\t$0\n}'
|
||||
'else':
|
||||
'prefix': 'else'
|
||||
'body': 'else {\n\t$0\n}'
|
||||
'else..if':
|
||||
'prefix': 'elseif'
|
||||
'body': 'else if( ${1:condition} ) {\n\t$0\n}'
|
||||
'if..else':
|
||||
'prefix': 'ifelse'
|
||||
'body': 'if( ${1:condition} ) \{\n\t${2:expression}\n\} else \{\n\t${3:expression}\n\}'
|
||||
'switch':
|
||||
'prefix': 'switch'
|
||||
'body': 'switch $1 \{\ncase ${2:expression}:\n\t$0\n}\n'
|
||||
'case':
|
||||
'prefix': 'case '
|
||||
'body': 'case ${1:expression}:\n\t${2:statement}\n'
|
||||
'default':
|
||||
'prefix': 'default:'
|
||||
'body': 'default:\n\t${1:statement}'
|
||||
'return':
|
||||
'prefix': 'ret'
|
||||
'body': 'return $1;$0'
|
||||
'Regular Expression':
|
||||
'prefix': '~/'
|
||||
'body': '~/${1:<pattern>}/${2:<modifier>};$0'
|
||||
'description': 'Regular expression'
|
||||
'descriptionMoreURL': 'https://haxe.org/manual/std-regex.html'
|
||||
|
||||
'Block Comment Start':
|
||||
'prefix': '/**'
|
||||
'body': '/**\n\t$1\n*/$0'
|
||||
'package':
|
||||
'prefix': 'package '
|
||||
'body': 'package ${1:<name>};$0'
|
||||
'import':
|
||||
'prefix': 'import'
|
||||
'body': 'import ${1:<package>};$0'
|
||||
'description': 'Allow omitting the package name when using a type'
|
||||
'descriptionMoreURL': 'http://haxe.org/manual/type-system-import.html'
|
||||
'using':
|
||||
'prefix': 'using'
|
||||
'body': 'using ${1:<package>};$0'
|
||||
'description': 'Pseudo-extend existing types without modifying their source'
|
||||
'descriptionMoreURL': 'https://haxe.org/manual/lf-static-extension.html'
|
||||
'private':
|
||||
'prefix': 'private'
|
||||
'body': 'private '
|
||||
'public':
|
||||
'prefix': 'public'
|
||||
'body': 'public '
|
||||
'inline':
|
||||
'prefix': 'inline'
|
||||
'body': 'inline '
|
||||
'description': 'Allow insert function body in place'
|
||||
'descriptionMoreURL': 'https://haxe.org/manual/class-field-inline.html'
|
||||
'static':
|
||||
'prefix': 'static'
|
||||
'body': 'static '
|
||||
|
||||
'package':
|
||||
'prefix': 'package '
|
||||
'body': 'package ${1:name};\n\n$0'
|
||||
'class':
|
||||
'prefix': 'class '
|
||||
'body': '\nclass ${1:Name} ${2:extends ${3:SuperClass}} ${4:implements ${5:Interface}} \{\n\n\tpublic function new() \{\n\t\t${6:super();\n\t\t}$7\n\t\}\n\t$8\n\}\n$0'
|
||||
'enum':
|
||||
'prefix': 'enum'
|
||||
'body': 'enum ${1:Name} {\n\t$0\n}'
|
||||
'extern':
|
||||
'prefix': 'extern'
|
||||
'body': 'extern '
|
||||
'import':
|
||||
'prefix': 'import'
|
||||
'body': 'import ${1:package};$0'
|
||||
'interface':
|
||||
'prefix': 'interface'
|
||||
'body': 'interface ${1:Interface} ${2:implements ${3:Interface}} {\n\t$0\n}'
|
||||
'macro function':
|
||||
'prefix': 'macro'
|
||||
'body': 'macro public static function ${1:name}( ${2:e : haxe.macro.Expr} ) : haxe.macro.Expr \{\n\t$0\n\}'
|
||||
'if':
|
||||
'prefix': 'if'
|
||||
'body': 'if( ${1:condition} ) {\n\t$0\n}'
|
||||
'else':
|
||||
'prefix': 'else '
|
||||
'body': 'else {\n\t$0\n}'
|
||||
'else..if':
|
||||
'prefix': 'elseif'
|
||||
'body': 'else if( ${1:condition} ) {\n\t$0\n}'
|
||||
'if..else':
|
||||
'prefix': 'ifelse'
|
||||
'body': 'if( ${1:condition} ) \{\n\t${2:expr}\n\} else \{\n\t${3:expr}\n\}'
|
||||
|
||||
'main class':
|
||||
'prefix': 'class'
|
||||
'body': 'class ${1:Class} \{\n\n\tpublic function new() {\n\t\t$0\n\t\}\n\n\tstatic function main() \{\n\t\tnew ${1:Class}();\n\t\}\n\}'
|
||||
'switch..case':
|
||||
'prefix': 'switch '
|
||||
'body': 'switch $1 \{\ncase ${2:expr}:\n\t$0\n}\n'
|
||||
'case':
|
||||
'prefix': 'case '
|
||||
'body': 'case ${1:expr}:\n\t${2:statement}\n'
|
||||
'default':
|
||||
'prefix': 'default:'
|
||||
'body': 'default:\n\t${1:statement}'
|
||||
'return':
|
||||
'prefix': 'return'
|
||||
'body': 'return$0'
|
||||
|
||||
'for var in 0...end':
|
||||
'prefix': 'fori'
|
||||
'body': 'for( ${1:var} in ${2:0}...${3:end} ) {\n\t${4:expression}\n}\n$0'
|
||||
'for in':
|
||||
'prefix': 'for'
|
||||
'body': 'for( $1 in $2 ) {\n\t$3\n}\n$0'
|
||||
'while':
|
||||
'prefix': 'while'
|
||||
'body': 'while( ${1:true} ) {\n\t$2\n}$0'
|
||||
'do..while':
|
||||
'prefix': 'do '
|
||||
'body': 'do {\n\t$1\n} while( ${2:true} );$0'
|
||||
'continue':
|
||||
'prefix': 'continue'
|
||||
'body': 'continue;$0'
|
||||
'break':
|
||||
'prefix': 'break'
|
||||
'body': 'break;'
|
||||
|
||||
'main':
|
||||
'prefix': 'main'
|
||||
'body': 'static function main() \n{\n\t$0\n}'
|
||||
'function':
|
||||
'prefix': 'function'
|
||||
'body': 'function ${1:name}( ${2:params} )${3: : ${4:Void}} \{\n\t$0\n\}'
|
||||
'method':
|
||||
'prefix': 'function'
|
||||
'body': '${1:static }${2:inline }function ${3:name}($4)${5: : ${6:Void}} \{\n\t$0\n\}'
|
||||
'for i in 0...end':
|
||||
'prefix': 'fori'
|
||||
'body': 'for( ${1:var} in ${2:0}...${3:end} ) {\n\t${4:expr}\n}$0'
|
||||
'for a in b':
|
||||
'prefix': 'for'
|
||||
'body': 'for( ${1:value} in ${2:iterable} ) {\n\t$3\n}\n$0'
|
||||
|
||||
'private':
|
||||
'prefix': 'private'
|
||||
'body': 'private '
|
||||
'public':
|
||||
'prefix': 'public'
|
||||
'body': 'public '
|
||||
'inline':
|
||||
'prefix': 'inline'
|
||||
'body': 'inline '
|
||||
'static':
|
||||
'prefix': 'static'
|
||||
'body': 'static '
|
||||
'try':
|
||||
'prefix': 'try'
|
||||
'body': 'try {\n\t$1\n} catch(${2:e:Dynamic}) {\n\t${3:trace(e);}\n}$0'
|
||||
'catch':
|
||||
'prefix': 'catch'
|
||||
'body': 'catch(${1:e:Dynamic}) {\n\t${2:trace(e);}\n}\n$0'
|
||||
'throw':
|
||||
'prefix': 'throw'
|
||||
'body': 'throw ${1:expr};$0'
|
||||
|
||||
'private function':
|
||||
'prefix': 'prf'
|
||||
'body': 'private function ${1:name}($2)${3: : ${4:Void}} {\n\t$0\n}\n'
|
||||
'private inline function':
|
||||
'prefix': 'prif'
|
||||
'body': 'private inline function ${1:name}($2)${3: : ${4:Void}} {\n\t$0\n}\n'
|
||||
'private static function':
|
||||
'prefix': 'prsf'
|
||||
'body': 'private static function ${1:name}($2)${3: : ${4:Void}} {\n\t$0\n}\n'
|
||||
'private static inline function':
|
||||
'prefix': 'prsif'
|
||||
'body': 'private static inline function ${1:name}($2)${3: : ${4:Void}} {\n\t$0\n}\n'
|
||||
'cast':
|
||||
'prefix': 'cast'
|
||||
'body': 'cast( ${1:expr}, ${2:type} )$0'
|
||||
'cast ':
|
||||
'prefix': 'cast '
|
||||
'body': 'cast ${1:expr}$0'
|
||||
|
||||
'public function':
|
||||
'prefix': 'pf'
|
||||
'body': 'public function ${1:name}($2)${3: : ${4:Void}} {\n\t$0\n}\n'
|
||||
'public inline function':
|
||||
'prefix': 'pif'
|
||||
'body': 'public inline function ${1:name}($2)${3: : ${4:Void}}\n{\n\t$0\n}\n'
|
||||
'public static function':
|
||||
'prefix': 'psf'
|
||||
'body': 'public static function ${1:name}($2)${3: : ${4:Void}}\n{\n\t$0\n}\n'
|
||||
'public static inline function':
|
||||
'prefix': 'psif'
|
||||
'body': 'public static inline function ${1:name}($2)${3: : ${4:Void}}\n{\n\t$0\n}\n'
|
||||
'autotyped var':
|
||||
'prefix': 'v'
|
||||
'body': 'var ${1:name} ${2:: ${3:Type}}${4: = }$5;$0'
|
||||
'typed var':
|
||||
'prefix': 'var'
|
||||
'body': 'var ${1:name} : ${2:Type} ${3:= }$4;$0'
|
||||
'private var':
|
||||
'prefix': 'prv'
|
||||
'body': 'private var $1 ${2:: ${3:Type}};$0'
|
||||
'private static var':
|
||||
'prefix': 'prsv'
|
||||
'body': 'private static var $1 ${2:: ${3:Type}};$0'
|
||||
'private static inline var':
|
||||
'prefix': 'prsiv'
|
||||
'body': 'private static inline var $1 ${2:: ${3:Type}} = $4;$0'
|
||||
'public var':
|
||||
'prefix': 'pv'
|
||||
'body': 'public var $1 ${2:: ${3:Type}};$0'
|
||||
'public static var':
|
||||
'prefix': 'psv'
|
||||
'body': 'public static var $1 ${2:: ${3:Type}};$0'
|
||||
'public static inline var':
|
||||
'prefix': 'psiv'
|
||||
'body': 'public static inline var ${1:NAME} ${2:: ${3:Type}} = $4;$0'
|
||||
|
||||
'autotyped variable':
|
||||
'prefix': 'v'
|
||||
'body': 'var ${1:name} ${2:: ${3:Type}}${4: = }$5;$0'
|
||||
'typed variable':
|
||||
'prefix': 'var'
|
||||
'body': 'var $1:${2:Type} ${3:= }$4;$0'
|
||||
'private variable':
|
||||
'prefix': 'prv'
|
||||
'body': 'private var $1 ${2:: ${3:Type}};$0'
|
||||
'private static variable':
|
||||
'prefix': 'prsv'
|
||||
'body': 'private static var $1 ${2:: ${3:Type}};$0'
|
||||
'private static inline variable':
|
||||
'prefix': 'prsiv'
|
||||
'body': 'private static inline var $1 ${2:: ${3:Type}} = $4;$0'
|
||||
'public variable':
|
||||
'prefix': 'pv'
|
||||
'body': 'public var $1 ${2:: ${3:Type}};$0'
|
||||
'public static variable':
|
||||
'prefix': 'psv'
|
||||
'body': 'public static var $1 ${2:: ${3:Type}};$0'
|
||||
'public static inline variable':
|
||||
'prefix': 'psiv'
|
||||
'body': 'public static inline var ${1:NAME} ${2:: ${3:Type}} = $4;$0'
|
||||
'property':
|
||||
'prefix': 'prop'
|
||||
'body': 'public var ${1:name}(${2:get},${3:set}) : ${4:Type};$0'
|
||||
'getter':
|
||||
'prefix': 'get_'
|
||||
'body': 'function get_${1:name}() : ${2:Type} \{\n\treturn $3;\n\}$0'
|
||||
'setter':
|
||||
'prefix': 'set_'
|
||||
'body': 'function set_${1:name}(${2:v}:${3:Type}) : ${3:Type} \{\n\treturn $4;\n\}$0'
|
||||
|
||||
'property':
|
||||
'prefix': 'prop'
|
||||
'body': 'public var ${1:name}(${2:get},${3:set}) : ${4:Type};$0'
|
||||
'getter':
|
||||
'prefix': 'get_'
|
||||
'body': 'function get_${1:name}() : ${2:Type} \{\n\treturn $3;\n\}$0'
|
||||
'setter':
|
||||
'prefix': 'set_'
|
||||
'body': 'function set_${1:name}(${2:v}:${3:Type}) : ${3:Type} \{\n\treturn $4;\n\}$0'
|
||||
'dynamic':
|
||||
'prefix': 'dynamic function'
|
||||
'body': 'dynamic function ${1:<name>}($2) {}$0'
|
||||
'function':
|
||||
'prefix': 'function'
|
||||
'body': 'function ${1:name}( ${2:params} )${3: : ${4:Void}} \{\n\t$5\n\}$0'
|
||||
'method':
|
||||
'prefix': 'static function'
|
||||
'body': '${1:static }${2:inline }function ${3:name}($4)${5: : ${6:Void}} \{\n\t$0\n\}'
|
||||
'macro function':
|
||||
'prefix': 'macro'
|
||||
'body': 'macro public static function ${1:name}( ${2:e : haxe.macro.Expr} ) : haxe.macro.Expr \{\n\t$0\n\}'
|
||||
|
||||
'@:metadata':
|
||||
'prefix': ':meta'
|
||||
'body': '@:${1:name}${2:($3)}$0'
|
||||
'@metadata':
|
||||
'prefix': 'meta'
|
||||
'body': '@${1:name}${2:($3)}$0'
|
||||
'class':
|
||||
'prefix': 'class '
|
||||
'body': '\nclass ${1:Name} ${2:extends ${3:SuperClass}} ${4:implements ${5:Interface}} \{\n\n\tpublic function new() \{\n\t\t${6:super();\n\t\t}$7\n\t\}\n\t$8\n\}\n$0'
|
||||
'description': 'Primary data structure'
|
||||
'descriptionMoreURL': 'http://haxe.org/manual/types-class-instance.html'
|
||||
'enum':
|
||||
'prefix': 'enum'
|
||||
'body': 'enum ${1:Name} {\n\t$0\n}'
|
||||
'description': 'Enumeration type'
|
||||
'descriptionMoreURL': 'http://haxe.org/manual/types-enum-instance.html'
|
||||
'interface':
|
||||
'prefix': 'interface'
|
||||
'body': 'interface ${1:Interface} ${2:implements ${3:Interface}} {\n\t$0\n}'
|
||||
'description': 'Signature of a class'
|
||||
'descriptionMoreURL': 'http://haxe.org/manual/types-interfaces.html'
|
||||
'typedef':
|
||||
'prefix': 'typedef'
|
||||
'body': 'typedef ${1:Name} = $2'
|
||||
'abstract':
|
||||
'prefix': 'abstract'
|
||||
'body': 'abstract ${1:Name}(${2:Type}) {\n\n\tpublic inline function new( ${3:v} : ${2:Type} ) {\n\t\tthis = ${3:v};\n\t}\n}$0'
|
||||
'description': 'Abstract type'
|
||||
'descriptionMoreURL': 'http://haxe.org/manual/types-abstract.html'
|
||||
'extern class':
|
||||
'prefix': 'extern class '
|
||||
'body': 'extern ${1:TYPE} {\n\t$2\n}\n$0'
|
||||
|
||||
'typedef':
|
||||
'prefix': 'typedef'
|
||||
'body': 'typedef ${1:Name} = $2'
|
||||
'@:metadata':
|
||||
'prefix': '@:'
|
||||
'body': '@:${1:name}${2:($3)}$0'
|
||||
'description': 'Built-in Compiler Metadata'
|
||||
'descriptionMoreURL': 'http://haxe.org/manual/lf-metadata.html#built-in-compiler-metadata'
|
||||
'@metadata':
|
||||
'prefix': '@'
|
||||
'body': '@${1:name}${2:($3)}$0'
|
||||
'description': 'Custom Metadata'
|
||||
'descriptionMoreURL': 'http://haxe.org/manual/lf-metadata.html'
|
||||
|
||||
'abstract':
|
||||
'prefix': 'abstract'
|
||||
'body': 'abstract ${1:Name}(${2:Type}) {\n\n\tpublic inline function new( ${3:v} : ${2:Type} ) {\n\t\tthis = ${3:v};\n\t}\n}$0'
|
||||
'main class':
|
||||
'prefix': 'class'
|
||||
'body': 'class ${1:<Class>} \{\n\n\tpublic function new() {\n\t\t$0\n\t\}\n\n\tstatic function main() \{\n\t\tnew ${1:Class}();\n\t\}\n\}'
|
||||
'main':
|
||||
'prefix': 'main'
|
||||
'body': 'static function main() {\n\t$0\n}'
|
||||
|
||||
'Array<T>':
|
||||
'prefix': 'Array'
|
||||
'body': 'Array<${1:T}>$0'
|
||||
'List<T>':
|
||||
'prefix': 'List'
|
||||
'body': 'List<${1:T}>$0'
|
||||
'Map<K,V>':
|
||||
'prefix': 'Map'
|
||||
'body': 'Map<${1:K},${2:V}>$0'
|
||||
'private function':
|
||||
'prefix': 'prf'
|
||||
'body': 'private function ${1:name}($2)${3: : ${4:Void}} {\n\t$0\n}'
|
||||
'private inline function':
|
||||
'prefix': 'prif'
|
||||
'body': 'private inline function ${1:name}($2)${3: : ${4:Void}} {\n\t$0\n}'
|
||||
'private static function':
|
||||
'prefix': 'prsf'
|
||||
'body': 'private static function ${1:name}($2)${3: : ${4:Void}} {\n\t$0\n}'
|
||||
'private static inline function':
|
||||
'prefix': 'prsif'
|
||||
'body': 'private static inline function ${1:name}($2)${3: : ${4:Void}} {\n\t$0\n}'
|
||||
|
||||
'public function':
|
||||
'prefix': 'pf'
|
||||
'body': 'public function ${1:name}($2)${3: : ${4:Void}} {\n\t$0\n}'
|
||||
'public inline function':
|
||||
'prefix': 'pif'
|
||||
'body': 'public inline function ${1:name}($2)${3: : ${4:Void}} {\n\t$0\n}'
|
||||
'public static function':
|
||||
'prefix': 'psf'
|
||||
'body': 'public static function ${1:name}($2)${3: : ${4:Void}} {\n\t$0\n}'
|
||||
'public static inline function':
|
||||
'prefix': 'psif'
|
||||
'body': 'public static inline function ${1:name}($2)${3: : ${4:Void}} {\n\t$0\n}'
|
||||
|
||||
'Array<T>':
|
||||
'prefix': 'Array'
|
||||
'body': 'Array<${1:T}>$0'
|
||||
'description': 'Collection of elements'
|
||||
'descriptionMoreURL': 'http://api.haxe.org/Array.html'
|
||||
'ArrayAccess<T>':
|
||||
'prefix': 'ArrayAccess<T>'
|
||||
'body': 'ArrayAccess<${1:T}>$0'
|
||||
'Bool':
|
||||
'prefix': 'Bool'
|
||||
'body': 'Bool$0'
|
||||
'Class<T>':
|
||||
'prefix': 'Class'
|
||||
'body': 'Class<${1:T}>$0'
|
||||
'Date':
|
||||
'prefix': 'Date'
|
||||
'body': 'Date$0'
|
||||
'Dynamic':
|
||||
'prefix': 'Dynamic'
|
||||
'body': 'Dynamic$0'
|
||||
'EReg':
|
||||
'prefix': 'EReg'
|
||||
'body': 'EReg( ${1:r}, ${2:opt} )$0'
|
||||
'Float':
|
||||
'prefix': 'Float'
|
||||
'body': 'Float$0'
|
||||
'Int':
|
||||
'prefix': 'Int'
|
||||
'body': 'Int$0'
|
||||
'List<T>':
|
||||
'prefix': 'List'
|
||||
'body': 'List<${1:T}>$0'
|
||||
'description': 'A linked-list of elements'
|
||||
'descriptionMoreURL': 'http://api.haxe.org/List.html'
|
||||
'Map<K,V>':
|
||||
'prefix': 'Map<K,V>'
|
||||
'body': 'Map<${1:K},${2:V}>$0'
|
||||
'description': 'Key to value mapping for arbitrary value types'
|
||||
'descriptionMoreURL': 'http://api.haxe.org/Map.html'
|
||||
'Math':
|
||||
'prefix': 'Math'
|
||||
'body': 'Math$0'
|
||||
'Null<T>':
|
||||
'prefix': 'Null<T>'
|
||||
'body': 'Null<${1:T}>$0'
|
||||
'Reflect':
|
||||
'prefix': 'Reflect'
|
||||
'body': 'Reflect.$0'
|
||||
'description': 'Runtime reflection of types and fields'
|
||||
'descriptionMoreURL': 'http://haxe.org/manual/std-reflection.html'
|
||||
'Single':
|
||||
'prefix': 'Single'
|
||||
'body': 'Single$0'
|
||||
'description': 'Single-precision IEEE 32bit float (4-byte)'
|
||||
'Std':
|
||||
'prefix': 'Std'
|
||||
'body': 'Std.$0'
|
||||
'description': 'Standard methods for manipulating basic types'
|
||||
'String':
|
||||
'prefix': 'String'
|
||||
'body': 'String$0'
|
||||
'StringBuf':
|
||||
'prefix': 'StringBuf'
|
||||
'body': 'StringBuf$0'
|
||||
'StringTools':
|
||||
'prefix': 'StringTools'
|
||||
'body': 'StringTools$0'
|
||||
'Type':
|
||||
'prefix': 'Type'
|
||||
'body': 'Type$0'
|
||||
'UInt':
|
||||
'prefix': 'UInt'
|
||||
'body': 'UInt$0'
|
||||
'ValueType':
|
||||
'prefix': 'ValueType'
|
||||
'body': 'ValueType$0'
|
||||
'Void':
|
||||
'prefix': 'Void'
|
||||
'body': 'Void$0'
|
||||
'Xml':
|
||||
'prefix': 'Xml'
|
||||
'body': 'Xml$0'
|
||||
'XmlType':
|
||||
'prefix': 'XmlType'
|
||||
'body': 'XmlType$0'
|
||||
|
|
|
@ -0,0 +1,51 @@
|
|||
'.source.haxelib':
|
||||
'name':
|
||||
'prefix': 'name'
|
||||
'body': '"name": "${1}"$0'
|
||||
'description': 'The name of the library. It must contain at least 3 characters among the following: [A-Za-z0-9_-.]. In particular, no spaces are allowed.'
|
||||
'url':
|
||||
'prefix': 'url'
|
||||
'body': '"url": "${1}"$0'
|
||||
'description': 'The URL of the library, i.e. where more information can be found.'
|
||||
'version':
|
||||
'prefix': 'version'
|
||||
'body': '"version": "${1:major}.${2:minor}.${3:patch}"$0'
|
||||
'description': 'The version string of the library (major.minor.patch).'
|
||||
'description':
|
||||
'prefix': 'description'
|
||||
'body': '"description": "${1}"$0'
|
||||
'description': 'The description of what the library is doing'
|
||||
'tags':
|
||||
'prefix': 'tags'
|
||||
'body': '"tags": ["${1}"]$0'
|
||||
'description': 'An array of tag-strings which are used on the repository website to sort libraries'
|
||||
'classPath':
|
||||
'prefix': 'classPath'
|
||||
'body': '"classPath": "${1}"$0'
|
||||
'description': 'The path string to the source files'
|
||||
'releasenote':
|
||||
'prefix': 'releasenote'
|
||||
'body': '"releasenote": "${1}"$0'
|
||||
'description': 'The release notes of the current version'
|
||||
'contributors':
|
||||
'prefix': 'contributors'
|
||||
'body': '"contributors": ["${1}"]$0'
|
||||
'description': 'An array of user names which identify contributors to the library that are allowed to upload to haxelib'
|
||||
'dependencies':
|
||||
'prefix': 'dependencies'
|
||||
'body': '"dependencies": {\n\t
|
||||
"${1:<name>}":"${2:<version>}"\n
|
||||
}$0'
|
||||
'description': 'An object describing the dependencies of the library'
|
||||
'license':
|
||||
'prefix': 'license'
|
||||
'body': '"license": "${1:GPL}"$0'
|
||||
'description': 'The license under which the library is released.'
|
||||
'new':
|
||||
'prefix': '{'
|
||||
'body': '{\n
|
||||
\t"name": "${1}",\n
|
||||
\t"version": "${2:${3:major}.${4:minor}.${5:patch}}",\n
|
||||
\t"license": "${6}",\n
|
||||
\t"releasenote": "${7}",\n
|
||||
\t"contributors": ["${8}"]\n'
|
|
@ -1,160 +1,530 @@
|
|||
'.source.hxml':
|
||||
'hxml -cp':
|
||||
'prefix': 'cp'
|
||||
'body': '-cp ${1:<path>}\n$0'
|
||||
'body': '-cp ${1:<path>}$0'
|
||||
'description': 'Adds a class path where .hx source files or packages (sub-directories) can be found.'
|
||||
'hxml -js':
|
||||
'prefix': 'js'
|
||||
'body': '-js ${1:<file>}.js\n$0'
|
||||
'body': '-js ${1:<file>}.js$0'
|
||||
'description': 'Compile code to JavaScript file'
|
||||
'hxml -lua':
|
||||
'prefix': 'lua'
|
||||
'body': '-lua ${1:<file>}.lua\n$0'
|
||||
'body': '-lua ${1:<file>}.lua$0'
|
||||
'description': 'Compile code to Lua file'
|
||||
'hxml -swf':
|
||||
'prefix': 'swf'
|
||||
'body': '-swf ${1:<file>}.swf\n$0'
|
||||
'body': '-swf ${1:<file>}.swf$0'
|
||||
'description': 'Compile code to Flash SWF file'
|
||||
'hxml -as3':
|
||||
'prefix': 'as3'
|
||||
'body': '-as3 ${1:<directory>}\n$0'
|
||||
'body': '-as3 ${1:<directory>}$0'
|
||||
'description': 'Generate AS3 code into target directory'
|
||||
'hxml -neko':
|
||||
'prefix': 'neko'
|
||||
'body': '-neko ${1:<file>}.n\n$0'
|
||||
'body': '-neko ${1:<file>}.n$0'
|
||||
'description': 'Compile code to Neko Binary'
|
||||
'hxml -php':
|
||||
'prefix': 'php'
|
||||
'body': '-php ${1:<directory>}\n$0'
|
||||
'body': '-php ${1:<directory>}$0'
|
||||
'description': 'Generate PHP code into target directory'
|
||||
'hxml -cpp':
|
||||
'prefix': 'cpp'
|
||||
'body': '-cpp ${1:<directory>}\n$0'
|
||||
'body': '-cpp ${1:<directory>}$0'
|
||||
'description': 'Generate C++ code into target directory'
|
||||
'hxml -cppia':
|
||||
'prefix': 'cppia'
|
||||
'body': '-cppia ${1:<file>}\n$0'
|
||||
'body': '-cppia ${1:<file>}$0'
|
||||
'description': 'Generate Cppia code into target directory'
|
||||
'hxml -cs':
|
||||
'prefix': 'cs'
|
||||
'body': '-cs ${1:<directory>}\n$0'
|
||||
'body': '-cs ${1:<directory>}$0'
|
||||
'description': 'Generate C# code into target directory'
|
||||
'hxml -java':
|
||||
'prefix': 'java'
|
||||
'body': '-java ${1:<directory>}\n$0'
|
||||
'body': '-java ${1:<directory>}$0'
|
||||
'description': 'Generate Java code into target directory'
|
||||
'hxml -python':
|
||||
'prefix': 'python'
|
||||
'body': '-python ${1:<file>}.py\n$0'
|
||||
'body': '-python ${1:<file>}.py$0'
|
||||
'description': 'Generate Python code into target directory'
|
||||
'hxml -hl':
|
||||
'prefix': 'hl'
|
||||
'body': '-hl ${1:<file>}\n$0'
|
||||
'body': '-hl ${1:<file>}$0'
|
||||
'description': 'Compile HL code as target file'
|
||||
'hxml -xml':
|
||||
'prefix': 'xml'
|
||||
'body': '-xml ${1:<file>}\n$0'
|
||||
'body': '-xml ${1:<file>}$0'
|
||||
'description': 'Generate XML types description'
|
||||
'hxml -main':
|
||||
'prefix': 'main'
|
||||
'body': '-main ${1:<class>}\n$0'
|
||||
'body': '-main ${1:<class>}$0'
|
||||
'description': 'Sets the main class'
|
||||
'hxml -lib':
|
||||
'prefix': 'lib'
|
||||
'body': '-lib ${1:${2:<library>}\:${3:[version]}}\n$0'
|
||||
'body': '-lib ${1:${2:<library>}\:${3:[version]}}$0'
|
||||
'description': 'Use a haxelib library'
|
||||
'descriptionMoreURL': 'http://lib.haxe.org/'
|
||||
'hxml -D':
|
||||
'prefix': 'D'
|
||||
'body': '-D ${1:${2:key}=${3:value}}\n$0'
|
||||
'body': '-D ${1:${2:key}=${3:value}}$0'
|
||||
'description': 'Define a conditional compilation flag'
|
||||
'descriptionMoreURL': 'http://haxe.org/manual/lf-condition-compilation.html'
|
||||
'hxml -v':
|
||||
'prefix': 'v'
|
||||
'body': '-v\n$0'
|
||||
'body': '-v$0'
|
||||
'description': 'Turn on verbose mode'
|
||||
'hxml -debug':
|
||||
'prefix': 'debug'
|
||||
'body': '-debug\n$0'
|
||||
'body': '-debug$0'
|
||||
'description': 'Add debug information to the compiled code'
|
||||
'hxml -dce':
|
||||
'prefix': 'dce'
|
||||
'body': '-dce ${1:[std|full|no]}\n$0'
|
||||
'body': '-dce ${1:[std|full|no]}$0'
|
||||
'description': 'Set the dead code elimination mode (default std)'
|
||||
'hxml -swf-version':
|
||||
'prefix': 'swf-version'
|
||||
'body': '-swf-version ${1:<version>}\n$0'
|
||||
'body': '-swf-version ${1:<version>}$0'
|
||||
'description': 'Change the SWF version'
|
||||
'hxml -swf-header':
|
||||
'prefix': 'swf-header'
|
||||
'body': '-swf-header ${1:width}:${2:height}:${3:fps}:${4:color}\n$0'
|
||||
'body': '-swf-header ${1:width}:${2:height}:${3:fps}:${4:color}$0'
|
||||
'description': 'Define SWF header (width:height:fps:color)'
|
||||
'hxml -swf-lib':
|
||||
'prefix': 'swf-lib'
|
||||
'body': '-swf-lib ${1:<file>}\n$0'
|
||||
'body': '-swf-lib ${1:<file>}$0'
|
||||
'description': 'Add the SWF library to the compiled SWF'
|
||||
'hxml -swf-lib-extern':
|
||||
'prefix': 'swf-lib-extern'
|
||||
'body': '-swf-lib-extern ${1:<file>}\n$0'
|
||||
'body': '-swf-lib-extern ${1:<file>}$0'
|
||||
'description': 'Use the SWF library for type checking'
|
||||
'hxml -java-lib':
|
||||
'prefix': 'java-lib'
|
||||
'body': '-java-lib ${1:<file>}\n$0'
|
||||
'body': '-java-lib ${1:<file>}$0'
|
||||
'description': 'add an external JAR or class directory library'
|
||||
'hxml -net-lib':
|
||||
'prefix': 'net-lib'
|
||||
'body': '-net-lib ${1:${2:<file>[}@${3:std]}}\n$0'
|
||||
'body': '-net-lib ${1:${2:<file>[}@${3:std]}}$0'
|
||||
'description': 'Add an external .NET DLL file'
|
||||
'hxml -net-std':
|
||||
'prefix': 'net-std'
|
||||
'body': '-net-std ${1:<file>}\n$0'
|
||||
'body': '-net-std ${1:<file>}$0'
|
||||
'description': 'Add a root std .NET DLL search path'
|
||||
'hxml -c-arg':
|
||||
'prefix': 'c-arg'
|
||||
'body': '-c-arg ${1:<arg>}\n$0'
|
||||
'body': '-c-arg ${1:<arg>}$0'
|
||||
'description': 'Pass option <arg> to the native Java/C# compiler'
|
||||
'hxml -x':
|
||||
'prefix': 'x'
|
||||
'body': '-x ${1:<file>}\n$0'
|
||||
'body': '-x ${1:<file>}$0'
|
||||
'description': 'Shortcut for compiling and executing a neko file'
|
||||
'hxml -resource':
|
||||
'prefix': 'resource'
|
||||
'body': '-resource ${1:${2:<file>[}@${3:name]}}\n$0'
|
||||
'body': '-resource ${1:${2:<file>[}@${3:name]}}$0'
|
||||
'description': 'Add a named resource file'
|
||||
'descriptionMoreURL': 'https://haxe.org/manual/cr-resources.html'
|
||||
'hxml -prompt':
|
||||
'prefix': 'prompt'
|
||||
'body': '-prompt\n$0'
|
||||
'body': '-prompt$0'
|
||||
'description': 'Prompt on error'
|
||||
'hxml -cmd':
|
||||
'prefix': 'cmd'
|
||||
'body': '-cmd ${1:<command>}\n$0'
|
||||
'body': '-cmd ${1:<command>}$0'
|
||||
'description': 'Run the specified command after successful compilation'
|
||||
'hxml --flash-strict':
|
||||
'prefix': 'flash-strict'
|
||||
'body': '--flash-strict\n$0'
|
||||
'body': '--flash-strict$0'
|
||||
'description': 'More type strict flash API'
|
||||
'hxml --no-traces':
|
||||
'prefix': 'no-traces'
|
||||
'body': '--no-traces\n$0'
|
||||
'body': '--no-traces$0'
|
||||
'description': 'Remove trace calls in the program'
|
||||
'hxml --gen-hx-classes':
|
||||
'prefix': 'gen-hx-classes'
|
||||
'body': '--gen-hx-classes\n$0'
|
||||
'body': '--gen-hx-classes$0'
|
||||
'description': 'Generate hx headers for all input classes'
|
||||
'hxml --next':
|
||||
'prefix': 'next'
|
||||
'body': '--next\n$0'
|
||||
'body': '--next$0'
|
||||
'description': 'Separate several haxe compilations'
|
||||
'hxml --each':
|
||||
'prefix': 'each'
|
||||
'body': '--each\n$0'
|
||||
'body': '--each$0'
|
||||
'description': 'Append preceding parameters to all haxe compilations separated by --next'
|
||||
'hxml --display':
|
||||
'prefix': 'display'
|
||||
'body': '--display\n$0'
|
||||
'body': '--display$0'
|
||||
'description': 'Display code tips'
|
||||
'hxml --no-output':
|
||||
'prefix': 'no-output'
|
||||
'body': '--no-output\n$0'
|
||||
'body': '--no-output$0'
|
||||
'description': 'Compiles but does not generate any file'
|
||||
'hxml --times':
|
||||
'prefix': 'times'
|
||||
'body': '--times\n$0'
|
||||
'body': '--times$0'
|
||||
'description': 'Measure compilation times'
|
||||
'hxml --no-inline':
|
||||
'prefix': 'no-inline'
|
||||
'body': '--no-inline\n$0'
|
||||
'body': '--no-inline$0'
|
||||
'description': 'Disable inlining'
|
||||
'descriptionMoreURL': 'https://haxe.org/manual/class-field-inline.html'
|
||||
'hxml --no-opt':
|
||||
'prefix': 'no-opt'
|
||||
'body': '--no-opt\n$0'
|
||||
'body': '--no-opt$0'
|
||||
'description': 'Disable code optimizations'
|
||||
'hxml --php-front':
|
||||
'prefix': 'php-front'
|
||||
'body': '--php-front ${1:<filename>}\n$0'
|
||||
'body': '--php-front ${1:<filename>}$0'
|
||||
'description': 'Select the name for the php front file'
|
||||
'hxml --php-lib':
|
||||
'prefix': 'php-lib'
|
||||
'body': '--php-lib ${1:<filename>}\n$0'
|
||||
'body': '--php-lib ${1:<filename>}$0'
|
||||
'description': 'Select the name for the php lib folder'
|
||||
'hxml --php-prefix':
|
||||
'prefix': 'php-prefix'
|
||||
'body': '--php-prefix ${1:<name>}\n$0'
|
||||
'body': '--php-prefix ${1:<name>}$0'
|
||||
'description': 'Prefix all classes with given name'
|
||||
'hxml --remap':
|
||||
'prefix': 'remap'
|
||||
'body': '--remap ${1:<package}:${2:target>}\n$0'
|
||||
'body': '--remap ${1:<package}:${2:target>}$0'
|
||||
'description': 'Remap a package to another one'
|
||||
'hxml --interp':
|
||||
'prefix': 'interp'
|
||||
'body': '--interp\n$0'
|
||||
'body': '--interp$0'
|
||||
'description': 'Interpret the program using internal macro system'
|
||||
'hxml --macro':
|
||||
'prefix': 'macro'
|
||||
'body': '--macro ${1:name}\n$0'
|
||||
'body': '--macro ${1:name}$0'
|
||||
'description': 'Call the given macro before typing anything else'
|
||||
'descriptionMoreURL': 'https://haxe.org/manual/macro-initialization.html'
|
||||
'hxml --eval':
|
||||
'prefix': 'eval'
|
||||
'body': '--eval ${1:arg}\n$0'
|
||||
'body': '--eval ${1:arg}$0'
|
||||
'description': 'Evaluates argument as Haxe module code'
|
||||
'hxml --wait':
|
||||
'prefix': 'wait'
|
||||
'body': '--wait ${2:[127.0.0.1]:}${1:6000}\n$0'
|
||||
'body': '--wait ${2:[127.0.0.1]:}${1:6000}$0'
|
||||
'description': 'Wait on the given port for commands to run'
|
||||
'descriptionMoreURL': 'https://haxe.org/manual/cr-completion-server.html'
|
||||
'hxml --connect':
|
||||
'prefix': 'connect'
|
||||
'body': '--connect ${1:${3:[host}\:${2:]port}}\n$0'
|
||||
'body': '--connect ${1:${3:[host}\:${2:]port}}$0'
|
||||
'description': 'Connect on the given port and run commands there'
|
||||
'descriptionMoreURL': 'https://haxe.org/manual/cr-completion-server.html'
|
||||
'hxml --cwd':
|
||||
'prefix': 'cwd'
|
||||
'body': '--cwd ${1:dir}\n$0'
|
||||
'body': '--cwd ${1:dir}$0'
|
||||
'description': 'Set current working directory'
|
||||
'hxml -version':
|
||||
'prefix': 'version'
|
||||
'body': '-version\n$0'
|
||||
'body': '-version$0'
|
||||
'description': 'Print version and exit'
|
||||
|
||||
'hxml -D absolute-path':
|
||||
'prefix': 'D absolute-path'
|
||||
'body': '-D absolute-path$0'
|
||||
'description': 'Print absolute file path in trace output'
|
||||
'hxml -D advanced-telemetry':
|
||||
'prefix': 'D advanced-telemetry'
|
||||
'body': '-D advanced-telemetry$0'
|
||||
'description': 'Allow the SWF to be measured with Monocle tool'
|
||||
'hxml -D analyzer':
|
||||
'prefix': 'D analyzer'
|
||||
'body': '-D analyzer$0'
|
||||
'description': 'Use static analyzer for optimization (experimental)'
|
||||
'hxml -D as3':
|
||||
'prefix': 'D as3'
|
||||
'body': '-D as3$0'
|
||||
'description': 'Defined when outputing flash9 as3 source code'
|
||||
'hxml -D check-xml-proxy':
|
||||
'prefix': 'D check-xml-proxy'
|
||||
'body': '-D check-xml-proxy$0'
|
||||
'description': 'Check the used fields of the xml proxy'
|
||||
'hxml -D core-api':
|
||||
'prefix': 'D core-api'
|
||||
'body': '-D core-api$0'
|
||||
'description': 'Defined in the core api context'
|
||||
'hxml -D core-api-serialize':
|
||||
'prefix': 'D core-api-serialize'
|
||||
'body': '-D core-api-serialize$0'
|
||||
'description': 'Mark some generated core api classes with the Serializable attribute on C#'
|
||||
'hxml -D cppia':
|
||||
'prefix': 'D cppia'
|
||||
'body': '-D cppia$0'
|
||||
'description': 'Generate experimental cpp instruction assembly'
|
||||
'hxml -D dce':
|
||||
'prefix': 'D dce'
|
||||
'body': '-D dce=${1:[std|full|no]}$0'
|
||||
'description': 'Set the dead code elimination mode (default std)'
|
||||
'hxml -D dce-debug':
|
||||
'prefix': 'D dce-debug'
|
||||
'body': '-D dce-debug$0'
|
||||
'description': 'Show dead code elimination log'
|
||||
'hxml -D debug':
|
||||
'prefix': 'D debug'
|
||||
'body': '-D debug$0'
|
||||
'description': 'Activated when compiling with -debug'
|
||||
'hxml -D display':
|
||||
'prefix': 'D display'
|
||||
'body': '-D display$0'
|
||||
'description': 'Activated during completion'
|
||||
'hxml -D dll-export':
|
||||
'prefix': 'D dll-export'
|
||||
'body': '-D dll-export$0'
|
||||
'description': 'GenCPP experimental linking'
|
||||
'hxml -D dll-import':
|
||||
'prefix': 'D dll-import'
|
||||
'body': '-D dll-import$0'
|
||||
'description': 'GenCPP experimental linking'
|
||||
'hxml -D doc-gen':
|
||||
'prefix': 'D doc-gen'
|
||||
'body': '-D doc-gen$0'
|
||||
'description': 'Do not perform any removal/change in order to correctly generate documentation'
|
||||
'hxml -D dump':
|
||||
'prefix': 'D dump'
|
||||
'body': '-D dump$0'
|
||||
'description': 'Dump the complete typed AST for internal debugging in a dump subdirectory - use dump=pretty for Haxe-like formatting'
|
||||
'hxml -D dump-dependencies':
|
||||
'prefix': 'D dump-dependencies'
|
||||
'body': '-D dump-dependencies$0'
|
||||
'description': 'Dump the classes dependencies in a dump subdirectory'
|
||||
'hxml -D dump-ignore-var-ids':
|
||||
'prefix': 'D dump-ignore-var-ids'
|
||||
'body': '-D dump-ignore-var-ids$0'
|
||||
'description': 'Remove variable IDs from non-pretty dumps (helps with diff)'
|
||||
'hxml -D erase-generics':
|
||||
'prefix': 'D erase-generics'
|
||||
'body': '-D erase-generics$0'
|
||||
'description': 'Erase generic classes on C#'
|
||||
'hxml -D fdb':
|
||||
'prefix': 'D fdb'
|
||||
'body': '-D fdb$0'
|
||||
'description': 'Enable full flash debug infos for FDB interactive debugging'
|
||||
'hxml -D file-extension':
|
||||
'prefix': 'D file-extension'
|
||||
'body': '-D file-extension$0'
|
||||
'description': 'Output filename extension for cpp source code'
|
||||
'hxml -D flash-use-stage':
|
||||
'prefix': 'D flash-use-stage'
|
||||
'body': '-D flash-use-stage$0'
|
||||
'description': 'Keep the SWF library initial stage'
|
||||
'hxml -D force-lib-check':
|
||||
'prefix': 'D force-lib-check'
|
||||
'body': '-D force-lib-check$0'
|
||||
'description': 'Force the compiler to check -net-lib and -java-lib added classes (internal)'
|
||||
'hxml -D force-native-property':
|
||||
'prefix': 'D force-native-property'
|
||||
'body': '-D force-native-property$0'
|
||||
'description': 'Tag all properties with :nativeProperty metadata for 3.1 compatibility'
|
||||
'hxml -D format-warning':
|
||||
'prefix': 'D format-warning'
|
||||
'body': '-D format-warning$0'
|
||||
'description': 'Print a warning for each formated string, for 2.x compatibility'
|
||||
'hxml -D gencommon-debug':
|
||||
'prefix': 'D gencommon-debug'
|
||||
'body': '-D gencommon-debug$0'
|
||||
'description': 'GenCommon internal'
|
||||
'hxml -D haxe-boot':
|
||||
'prefix': 'D haxe-boot'
|
||||
'body': '-D haxe-boot$0'
|
||||
'description': 'Given the name `haxe` to the flash boot class instead of a generated name'
|
||||
'hxml -D haxe-ver':
|
||||
'prefix': 'D haxe-ver'
|
||||
'body': '-D haxe-ver$0'
|
||||
'description': 'The current Haxe version value'
|
||||
'hxml -D hxcpp-api-level':
|
||||
'prefix': 'D hxcpp-api-level'
|
||||
'body': '-D hxcpp-api-level$0'
|
||||
'description': 'Provided to allow compatibility between hxcpp versions'
|
||||
'hxml -D include-prefix':
|
||||
'prefix': 'D include-prefix'
|
||||
'body': '-D include-prefix$0'
|
||||
'description': 'Prepend path to generated include files'
|
||||
'hxml -D interp':
|
||||
'prefix': 'D interp'
|
||||
'body': '-D interp$0'
|
||||
'description': 'The code is compiled to be run with --interp'
|
||||
'hxml -D java-ver':
|
||||
'prefix': 'D java-ver'
|
||||
'body': '-D java-ver=${1:[version:5-7]}$0'
|
||||
'description': 'Sets the Java version to be targeted'
|
||||
'hxml -D js-classic':
|
||||
'prefix': 'D js-classic'
|
||||
'body': '-D js-classic$0'
|
||||
'description': 'Don`t use a function wrapper and strict mode in JS output'
|
||||
'hxml -D js-es5':
|
||||
'prefix': 'D js-es5'
|
||||
'body': '-D js-es5$0'
|
||||
'description': 'Generate JS for ES5-compliant runtimes'
|
||||
'hxml -D js-unflatten':
|
||||
'prefix': 'D js-unflatten'
|
||||
'body': '-D js-unflatten$0'
|
||||
'description': 'Generate nested objects for packages and types'
|
||||
'hxml -D keep-old-output':
|
||||
'prefix': 'D keep-old-output'
|
||||
'body': '-D keep-old-output$0'
|
||||
'description': 'Keep old source files in the output directory (for C#/Java)'
|
||||
'hxml -D loop-unroll-max-cost':
|
||||
'prefix': 'D loop-unroll-max-cost'
|
||||
'body': '-D loop-unroll-max-cost$0'
|
||||
'description': 'Maximum cost (number of expressions * iterations) before loop unrolling is canceled (default 250)'
|
||||
'hxml -D macro':
|
||||
'prefix': 'D macro'
|
||||
'body': '-D macro$0'
|
||||
'description': 'Defined when code is compiled in the macro context'
|
||||
'hxml -D macro-times':
|
||||
'prefix': 'D macro-times'
|
||||
'body': '-D macro-times$0'
|
||||
'description': 'Display per-macro timing when used with --times'
|
||||
'hxml -D net-ver':
|
||||
'prefix': 'D net-ver'
|
||||
'body': '-D net-ver$0'
|
||||
'description': 'Sets the .NET version to be targeted'
|
||||
'hxml -D net-target':
|
||||
'prefix': 'D net-target'
|
||||
'body': '-D net-target=${1:<name>}$0'
|
||||
'description': 'Sets the .NET target. Defaults to net. xbox, micro (Micro Framework, compact (Compact Framework) are some valid values'
|
||||
'hxml -D neko-source':
|
||||
'prefix': 'D neko-source'
|
||||
'body': '-D neko-source$0'
|
||||
'description': 'Output neko source instead of bytecode'
|
||||
'hxml -D neko-v1':
|
||||
'prefix': 'D neko-v1'
|
||||
'body': '-D neko-v1$0'
|
||||
'description': 'Keep Neko 1.x compatibility'
|
||||
'hxml -D network-sandbox':
|
||||
'prefix': 'D network-sandbox'
|
||||
'body': '-D network-sandbox$0'
|
||||
'description': 'Use local network sandbox instead of local file access one'
|
||||
'hxml -D no-compilation':
|
||||
'prefix': 'D no-compilation'
|
||||
'body': '-D no-compilation$0'
|
||||
'description': 'Disable CPP final compilation'
|
||||
'hxml -D no-copt':
|
||||
'prefix': 'D no-copt'
|
||||
'body': '-D no-copt$0'
|
||||
'description': 'Disable completion optimization (for debug purposes)'
|
||||
'hxml -D no-debug':
|
||||
'prefix': 'D no-debug'
|
||||
'body': '-D no-debug$0'
|
||||
'description': 'Remove all debug macros from cpp output'
|
||||
'hxml -D no-deprecation-warnings':
|
||||
'prefix': 'D no-deprecation-warnings'
|
||||
'body': '-D no-deprecation-warnings$0'
|
||||
'description': 'Do not warn if fields annotated with @:deprecated are used'
|
||||
'hxml -D no-flash-override':
|
||||
'prefix': 'D no-flash-override'
|
||||
'body': '-D no-flash-override$0'
|
||||
'description': 'Change overrides on some basic classes into HX suffixed methods flash only'
|
||||
'hxml -D no-opt':
|
||||
'prefix': 'D no-opt'
|
||||
'body': '-D no-opt$0'
|
||||
'description': 'Disable optimizations'
|
||||
'hxml -D no-pattern-matching':
|
||||
'prefix': 'D no-pattern-matching'
|
||||
'body': '-D no-pattern-matching$0'
|
||||
'description': 'Disable pattern matching'
|
||||
'descriptionMoreURL': 'https://haxe.org/manual/lf-pattern-matching.html'
|
||||
'hxml -D no-inline':
|
||||
'prefix': 'D no-inline'
|
||||
'body': '-D no-inline$0'
|
||||
'description': 'Disable inlining'
|
||||
'hxml -D no-root':
|
||||
'prefix': 'D no-root'
|
||||
'body': '-D no-root$0'
|
||||
'description': 'GenCS internal'
|
||||
'hxml -D no-macro-cache':
|
||||
'prefix': 'D no-macro-cache'
|
||||
'body': '-D no-macro-cache$0'
|
||||
'description': 'Disable macro context caching'
|
||||
'hxml -D no-simplify':
|
||||
'prefix': 'D no-simplify'
|
||||
'body': '-D no-simplify$0'
|
||||
'description': 'Disable simplification filter'
|
||||
'hxml -D no-swf-compress':
|
||||
'prefix': 'D no-swf-compress'
|
||||
'body': '-D no-swf-compress$0'
|
||||
'description': 'Disable SWF output compression'
|
||||
'hxml -D no-traces':
|
||||
'prefix': 'D no-traces'
|
||||
'body': '-D no-traces$0'
|
||||
'description': 'Disable all trace calls'
|
||||
'hxml -D php-prefix':
|
||||
'prefix': 'D php-prefix'
|
||||
'body': '-D php-prefix$0'
|
||||
'description': 'Compiled with --php-prefix'
|
||||
'hxml -D real-position':
|
||||
'prefix': 'D real-position'
|
||||
'body': '-D real-position$0'
|
||||
'description': 'Disables haxe source mapping when targetting C#'
|
||||
'hxml -D replace-files':
|
||||
'prefix': 'D replace-files'
|
||||
'body': '-D replace-files$0'
|
||||
'description': 'GenCommon internal'
|
||||
'hxml -D shallow-expose':
|
||||
'prefix': 'D shallow-expose'
|
||||
'body': '-D shallow-expose$0'
|
||||
'description': 'Expose types to surrounding scope of Haxe generated closure without writing to window object'
|
||||
'hxml -D source-map-content':
|
||||
'prefix': 'D source-map-content'
|
||||
'body': '-D source-map-content$0'
|
||||
'description': 'Include the hx sources as part of the JS source map'
|
||||
'hxml -D swc':
|
||||
'prefix': 'D swc'
|
||||
'body': '-D swc$0'
|
||||
'description': 'Output a SWC instead of a SWF'
|
||||
'hxml -D swf-compress-level':
|
||||
'prefix': 'D swf-compress-level'
|
||||
'body': '-D swf-compress-level=${1:<1-9>}$0'
|
||||
'description': 'Set the amount of compression for the SWF output'
|
||||
'hxml -D swf-debug-password':
|
||||
'prefix': 'D swf-debug-password=${1:<yourPassword>}'
|
||||
'body': '-D swf-debug-password$0'
|
||||
'description': 'Set a password for debugging. The password field is encrypted by using the MD5 algorithm and prevents unauthorised debugging of your swf. Without this flag -D fdb will use no password.'
|
||||
'hxml -D swf-direct-blit':
|
||||
'prefix': 'D swf-direct-blit'
|
||||
'body': '-D swf-direct-blit$0'
|
||||
'description': 'Use hardware acceleration to blit graphics'
|
||||
'hxml -D swf-gpu':
|
||||
'prefix': 'D swf-gpu'
|
||||
'body': '-D swf-gpu$0'
|
||||
'description': 'Use GPU compositing features when drawing graphics'
|
||||
'hxml -D swf-metadata':
|
||||
'prefix': 'D swf-metadata'
|
||||
'body': '-D swf-metadata=${1:<file.xml>}$0'
|
||||
'description': 'Include contents of <file.xml> as metadata in the swf'
|
||||
'hxml -D swf-preloader-frame':
|
||||
'prefix': 'D swf-preloader-frame'
|
||||
'body': '-D swf-preloader-frame$0'
|
||||
'description': 'Insert empty first frame in swf. To be used together with -D flash-use-stage and -swf-lib'
|
||||
'hxml -D swf-protected':
|
||||
'prefix': 'D swf-protected'
|
||||
'body': '-D swf-protected$0'
|
||||
'description': 'Compile Haxe private as protected in the SWF instead of public'
|
||||
'hxml -D swf-script-timeout':
|
||||
'prefix': 'D swf-script-timeout'
|
||||
'body': '-D swf-script-timeout$0'
|
||||
'description': 'Maximum ActionScript processing time before script stuck dialog box displays (in seconds)'
|
||||
'hxml -D swf-use-doabc':
|
||||
'prefix': 'D swf-use-doabc'
|
||||
'body': '-D swf-use-doabc$0'
|
||||
'description': 'Use DoAbc swf-tag instead of DoAbcDefine'
|
||||
'hxml -D sys':
|
||||
'prefix': 'D sys'
|
||||
'body': '-D sys$0'
|
||||
'description': 'Defined for all system platforms'
|
||||
'hxml -D unsafe':
|
||||
'prefix': 'D unsafe'
|
||||
'body': '-D unsafe$0'
|
||||
'description': 'Allow unsafe code when targeting C#'
|
||||
'hxml -D use-nekoc':
|
||||
'prefix': 'D use-nekoc'
|
||||
'body': '-D use-nekoc$0'
|
||||
'description': 'Use nekoc compiler instead of internal one'
|
||||
'hxml -D use-rtti-doc':
|
||||
'prefix': 'D use-rtti-doc'
|
||||
'body': '-D use-rtti-doc$0'
|
||||
'description': 'Allows access to documentation during compilation'
|
||||
'hxml -D vcproj':
|
||||
'prefix': 'D vcproj'
|
||||
'body': '-D vcproj$0'
|
||||
'description': 'GenCPP internal'
|
||||
|
|
|
@ -0,0 +1,115 @@
|
|||
|
||||
###
|
||||
fs = require 'fs'
|
||||
path = require 'path'
|
||||
|
||||
TextEditor = null
|
||||
|
||||
buildTextEditor = (params) ->
|
||||
if atom.workspace.buildTextEditor?
|
||||
atom.workspace.buildTextEditor(params)
|
||||
else
|
||||
TextEditor ?= require('atom').TextEditor
|
||||
new TextEditor(params)
|
||||
###
|
||||
|
||||
describe "Haxe Grammar", ->
|
||||
|
||||
grammar = null
|
||||
|
||||
beforeEach ->
|
||||
waitsForPromise ->
|
||||
atom.packages.activatePackage("language-haxe")
|
||||
runs ->
|
||||
grammar = atom.grammars.grammarForScopeName("source.haxe")
|
||||
|
||||
it "parses the grammar", ->
|
||||
expect(grammar).toBeDefined()
|
||||
expect(grammar).toBeTruthy()
|
||||
expect(grammar.scopeName).toBe "source.haxe"
|
||||
expect(grammar.name).toBe "Haxe"
|
||||
expect(grammar.fileTypes[0]).toBe "hx"
|
||||
|
||||
describe "keywords", ->
|
||||
keywords = ['abstract','break','case','cast','catch','class','continue','default','do','dynamic','else','enum','extern','false','for','function','if','implements','in','inline','interface','never','new','override','package','private','public','return','static','super','this','trace','true','try','typedef','untyped','using','while']
|
||||
for keyword in keywords
|
||||
it "tokenizes the #{keyword} keyword", ->
|
||||
{tokens} = grammar.tokenizeLine(keyword)
|
||||
# TODO
|
||||
expect(tokens[0]).toEqual value: keyword, scopes: ['source.haxe','keyword.control.haxe.flow-control.2']
|
||||
|
||||
describe "numbers", ->
|
||||
it "tokenizes hexadecimals", ->
|
||||
{tokens} = grammar.tokenizeLine('0x1D306')
|
||||
expect(tokens[0]).toEqual value: '0x1D306', scopes: ['source.haxe', 'constant.numeric.haxe']
|
||||
it "tokenizes decimals", ->
|
||||
{tokens} = grammar.tokenizeLine('1234')
|
||||
expect(tokens[0]).toEqual value: '1234', scopes: ['source.haxe', 'constant.numeric.haxe']
|
||||
#{tokens} = grammar.tokenizeLine('5e-10')
|
||||
#expect(tokens[0]).toEqual value: '5e-10', scopes: ['source.js', 'constant.numeric.haxe']
|
||||
{tokens} = grammar.tokenizeLine('9.')
|
||||
expect(tokens[0]).toEqual value: '9', scopes: ['source.haxe', 'constant.numeric.haxe']
|
||||
#expect(tokens[1]).toEqual value: '.', scopes: ['source.haxe', 'constant.numeric.decimal.hx', 'meta.delimiter.decimal.period.hx']
|
||||
|
||||
describe "switch statements", ->
|
||||
it "tokenizes the switch keyword", ->
|
||||
{tokens} = grammar.tokenizeLine('switch(){}')
|
||||
expect(tokens[0]).toEqual value: 'switch', scopes: ['source.haxe', 'keyword.control.haxe.flow-control.2'] # TODO
|
||||
it "tokenizes switch expression", ->
|
||||
{tokens} = grammar.tokenizeLine('switch(foo + bar){}')
|
||||
expect(tokens[0]).toEqual value: 'switch', scopes: ['source.haxe', 'keyword.control.haxe.flow-control.2'] # TODO
|
||||
expect(tokens[1]).toEqual value: '(', scopes: ['source.haxe', 'meta.scope.field-completions.haxe']
|
||||
#expect(tokens[2]).toEqual value: 'foo ', scopes: ['source.haxe', 'meta.scope.field-completions.haxe']
|
||||
#expect(tokens[3]).toEqual value: '+', scopes: ['source.haxe', 'meta.scope.field-completions.haxe']
|
||||
#expect(tokens[4]).toEqual value: ' bar', scopes: ['source.haxe', 'meta.switch-statement.js']
|
||||
#expect(tokens[5]).toEqual value: ')', scopes: ['source.haxe', 'meta.switch-statement.js', 'punctuation.definition.switch-expression.end.bracket.round.js']
|
||||
|
||||
describe "function calls", ->
|
||||
#it "tokenizes function calls", ->
|
||||
#{tokens} = grammar.tokenizeLine('functionCall()')
|
||||
#expect(tokens[0]).toEqual value: 'functionCall', scopes: ['source.haxe']
|
||||
#expect(tokens[1]).toEqual value: '(', scopes: ['source.haxe']
|
||||
#expect(tokens[1]).toEqual value: '(', scopes: ['source.js', 'meta.function-call.js', 'meta.arguments.js', 'punctuation.definition.arguments.begin.bracket.round.js']
|
||||
#expect(tokens[2]).toEqual value: ')', scopes: ['source.js', 'meta.function-call.js', 'meta.arguments.js', 'punctuation.definition.arguments.end.bracket.round.js']
|
||||
|
||||
describe "strings and functions", ->
|
||||
it "doesn't confuse them", ->
|
||||
delimsByScope =
|
||||
"string.quoted.double.js": '"'
|
||||
"string.quoted.single.js": "'"
|
||||
for scope, delim of delimsByScope
|
||||
{tokens} = grammar.tokenizeLine('a.push(' + delim + 'x' + delim + ' + y + ' + delim + ':function()' + delim + ');')
|
||||
expect(tokens[0]).toEqual value: 'a', scopes: ['source.haxe'] #,'meta.scope.field-completions.haxe']
|
||||
#expect(tokens[1]).toEqual value: '.', scopes: ['source.haxe']
|
||||
|
||||
describe "firstLineMatch", ->
|
||||
it "recognises interpreter directives", ->
|
||||
valid = """
|
||||
#!/usr/sbin/haxe
|
||||
#!/usr/bin/haxe foo=bar/
|
||||
#!/usr/sbin/haxe
|
||||
#!/usr/sbin/haxe foo bar baz
|
||||
#!/usr/bin/haxe perl
|
||||
#!/usr/bin/haxe bin/perl
|
||||
#!/usr/bin/haxe
|
||||
#!/bin/haxe
|
||||
#!/usr/bin/haxe --script=usr/bin
|
||||
#! /usr/bin/env A=003 B=149 C=150 D=xzd E=base64 F=tar G=gz H=head I=tail haxe
|
||||
#!\t/usr/bin/env --foo=bar haxe --quu=quux
|
||||
#! /usr/bin/haxe
|
||||
#!/usr/bin/env haxe
|
||||
"""
|
||||
for line in valid.split /\n/
|
||||
expect( grammar.firstLineRegex.scanner.findNextMatchSync( line ) ).not.toBeNull()
|
||||
invalid = """
|
||||
\x20#!/usr/sbin/haxe
|
||||
\t#!/usr/sbin/haxe
|
||||
#!/usr/bin/env-haxe/node-env/
|
||||
#!/usr/bin/env-haxe
|
||||
#! /usr/binhaxe
|
||||
#!\t/usr/bin/env --haxe=bar
|
||||
"""
|
||||
for line in invalid.split /\n/
|
||||
expect( grammar.firstLineRegex.scanner.findNextMatchSync( line ) ).toBeNull()
|
||||
#it "recognises Emacs modelines", ->
|
||||
#it "recognises Vim modelines", ->
|
|
@ -0,0 +1,36 @@
|
|||
|
||||
describe "Hxml Grammar", ->
|
||||
|
||||
grammar = null
|
||||
|
||||
beforeEach ->
|
||||
waitsForPromise ->
|
||||
atom.packages.activatePackage("language-haxe")
|
||||
runs ->
|
||||
grammar = atom.grammars.grammarForScopeName("source.hxml")
|
||||
|
||||
it "parses the grammar", ->
|
||||
expect(grammar).toBeTruthy()
|
||||
expect(grammar.scopeName).toBe "source.hxml"
|
||||
expect(grammar.name).toBe "Hxml"
|
||||
expect(grammar.fileTypes[0]).toBe 'hxml'
|
||||
expect(grammar.foldingStopMarker).toBe '\\*\\*/|^\\s*\\}'
|
||||
|
||||
describe "comments", ->
|
||||
it "tokenizes comments", ->
|
||||
{tokens} = grammar.tokenizeLine('#')
|
||||
expect(tokens[0]).toEqual value: '#', scopes: ['source.hxml', 'comment.line.number-sign.hxml', 'punctuation.definition.comment.haxe']
|
||||
|
||||
describe "arguments", ->
|
||||
args = ['-cp','-js','-lua','-swf','-as3','-neko','-php','-cpp','-cppia','-cs','-java','-python','-hl','-xml','-main','-lib','-D','-v','-debug','-dce','-swf-version','-swf-header','-swf-lib','-swf-lib-extern','-java-lib','-net-lib','-net-std','-c-arg','-x','-resource','-prompt','-cmd','--flash-strict','--no-traces','--gen-hx-classes','--next','--each','--display','--no-output','--times','--no-inline','--no-opt','--php-front','--php-lib','--php-prefix','--remap','--interp','--macro','--eval','--wait','--connect','--cwd','-version','--help-defines','--help-metas','-help','--help','--each']
|
||||
for arg in args
|
||||
it "tokenizes the #{arg} arg", ->
|
||||
{tokens} = grammar.tokenizeLine(arg)
|
||||
expect(tokens[0]).toEqual value: arg, scopes: ['source.hxml', 'keyword.compiler.arguments.hxml']
|
||||
|
||||
describe "flags", ->
|
||||
flags = ['absolute-path','advanced-telemetry','annotate-source','as3','check-xml-proxy','core-api','core-api-serialize','cppia','dce','dce-debug','debug','display','display-stdin','dll-export','dll-import','doc-gen','dump','dump-dependencies','dump-ignore-var-ids','dynamic-interface-closures','erase-generics','fast-cast','fdb','file-extension','flash-strict','flash-use-stage','force-lib-check','force-native-property','format-warning','gencommon-debug','haxe-boot','haxe-ver','hxcpp-api-level','include-prefix','interp','java-ver','jquery-ver','js-classic','js-es5','js-unflatten','keep-old-output','loop-unroll-max-cost','lua-jit','lua-ver','macro','macro-times','neko-source','neko-v1','net-target','net-ver','network-sandbox','no-analyzer','no-compilation','no-copt','no-debug','no-deprecation-warnings','no-flash-override','no-inline','no-macro-cache','no-opt','no-pattern-matching','no-root','no-simplify','no-swf-compress','no-traces','objc','php-prefix','real-position','replace-files','scriptable','shallow-expose','source-header','source-map-content','swc','swf-compress-level','swf-debug-password','swf-direct-blit','swf-gpu','swf-metadata','swf-preloader-frame','swf-protected','swf-script-timeout','swf-use-doabc','sys','unsafe','use-nekoc','use-rtti-doc','vcproj']
|
||||
for flag in flags
|
||||
it "tokenizes the #{flag} flag", ->
|
||||
{tokens} = grammar.tokenizeLine(flag)
|
||||
expect(tokens[0]).toEqual value: flag, scopes: ['source.hxml', 'keyword.compiler.flags.hxml']
|
Loading…
Reference in New Issue