Compare commits

..

8 Commits

Author SHA1 Message Date
Juraj Kirchheim
73e9da8435 Fix 3.2.1. 2017-04-13 21:07:44 +02:00
Juraj Kirchheim
bf23337923 Release 0.13.4 2017-04-13 21:04:00 +02:00
Juraj Kirchheim
02bd3bf69d Add Types.getMeta. 2017-04-13 21:02:58 +02:00
Juraj Kirchheim
82a3417b97 Gitignore. 2017-04-13 20:58:16 +02:00
Juraj Kirchheim
1f986c3732 VSCode setup. 2017-04-13 20:57:29 +02:00
Kevin Leung
20e998fd12 Release 0.13.3 2017-03-20 20:01:41 +08:00
Kevin Leung
0f9c0d1e97 what the haxe? 2017-03-20 19:49:21 +08:00
Kevin Leung
2ae13d534e my turn 2017-03-20 19:41:16 +08:00
7 changed files with 26 additions and 5 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/bin

View File

@@ -22,6 +22,6 @@ env:
deploy:
provider: script
script: haxelib run travix release
script: haxe && haxelib run travix release
on:
tags: true
tags: true

5
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,5 @@
{
"haxe.displayConfigurations": [
["tests.hxml"]
]
}

6
.vscode/tasks.json vendored Normal file
View File

@@ -0,0 +1,6 @@
{
"version": "0.1.0",
"command": "haxelib",
"args": ["run", "travix", "node"],
"problemMatcher": "$haxe"
}

1
bin/.gitignore vendored
View File

@@ -1 +0,0 @@
*.n

View File

@@ -11,8 +11,8 @@
"contributors": [
"back2dos"
],
"releasenote": "Alias for TypeMap",
"version": "0.13.2",
"releasenote": "Added Types.getMeta",
"version": "0.13.4",
"url": "http://haxetink.org/tink_macro",
"dependencies": {
"tink_core": ""

View File

@@ -49,6 +49,16 @@ class Types {
throw 'not implemented';
}
static public function getMeta(type:Type)
return switch type {
case TInst(_.get().meta => m, _): [m];
case TEnum(_.get().meta => m, _): [m];
case TAbstract(_.get().meta => m, _): [m];
case TType(_.get() => t, _): [t.meta].concat(getMeta(t.type));
case TLazy(f): getMeta(f());
default: [];
}
static function getDeclaredFields(t:ClassType, out:Array<ClassField>, marker:Map<String,Bool>) {
for (field in t.fields.get())
if (!marker.exists(field.name)) {