Compare commits

...

4 Commits

Author SHA1 Message Date
Derek Schmidt 41dca29833 Initial tree-sitter implimentation 2021-10-22 17:17:57 -07:00
theRemix 9bacfaa695 Merge pull request #34 from tong/master
Update CHANGELOG
2017-03-11 20:00:11 -10:00
theRemix 77e901fab7 Merge branch 'master' into master 2017-03-11 19:59:55 -10:00
tong b4a0bd085d Update CHANGELOG 2017-02-02 13:26:57 +01:00
4 changed files with 90 additions and 1 deletions

View File

@ -3,6 +3,9 @@
* 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

View File

@ -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'

21
package-lock.json generated Normal file
View File

@ -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"
}
}
}
}

View File

@ -19,5 +19,7 @@
"atom": ">=1.5.0 <2.0.0",
"node": "*"
},
"dependencies": {}
"dependencies": {
"tree-sitter-haxe": "^0.1.0"
}
}