Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
6f5eba983e | ||
![]() |
d5a44a9268 | ||
![]() |
a11804c3ab | ||
![]() |
380ceb39ea | ||
![]() |
c48d445a54 | ||
![]() |
b7e413d839 | ||
![]() |
e1e487079b |
@@ -1,6 +1,6 @@
|
||||
-D travix=0.12.2
|
||||
# @install: lix --silent download "gh://github.com/back2dos/travix#f46e67b6330d2e85b487a9fd512b10e4e0f1058f" into travix/0.12.2/github/f46e67b6330d2e85b487a9fd512b10e4e0f1058f
|
||||
# @post-install: cd ${HAXE_LIBCACHE}/travix/0.12.2/github/f46e67b6330d2e85b487a9fd512b10e4e0f1058f && haxe -cp src --run travix.PostDownload
|
||||
# @run: haxelib run-dir travix ${HAXE_LIBCACHE}/travix/0.12.2/github/f46e67b6330d2e85b487a9fd512b10e4e0f1058f
|
||||
# @install: lix --silent download "gh://github.com/back2dos/travix#7da3bf96717b52bf3c7e5d2273bf927a8cd7aeb5" into travix/0.12.2/github/7da3bf96717b52bf3c7e5d2273bf927a8cd7aeb5
|
||||
# @post-install: cd ${HAXE_LIBCACHE}/travix/0.12.2/github/7da3bf96717b52bf3c7e5d2273bf927a8cd7aeb5 && haxe -cp src --run travix.PostDownload
|
||||
# @run: haxelib run-dir travix ${HAXE_LIBCACHE}/travix/0.12.2/github/7da3bf96717b52bf3c7e5d2273bf927a8cd7aeb5
|
||||
-lib tink_cli
|
||||
-cp ${HAXE_LIBCACHE}/travix/0.12.2/github/f46e67b6330d2e85b487a9fd512b10e4e0f1058f/src
|
||||
-cp ${HAXE_LIBCACHE}/travix/0.12.2/github/7da3bf96717b52bf3c7e5d2273bf927a8cd7aeb5/src
|
||||
|
24
haxelib.json
24
haxelib.json
@@ -1,20 +1,20 @@
|
||||
{
|
||||
"name": "tink_macro",
|
||||
"description": "The macro toolkit ;)",
|
||||
"classPath": "src",
|
||||
"dependencies": {
|
||||
"tink_core": ""
|
||||
},
|
||||
"url": "http://haxetink.org/tink_macro",
|
||||
"contributors": [
|
||||
"back2dos"
|
||||
],
|
||||
"version": "0.17.1",
|
||||
"releasenote": "Improve type parameter treatment. Add helper for getting field suggestions. Make type comparator available.",
|
||||
"license": "MIT",
|
||||
"tags": [
|
||||
"tink",
|
||||
"macro",
|
||||
"utility"
|
||||
],
|
||||
"license": "MIT"
|
||||
"classPath": "src",
|
||||
"description": "The macro toolkit ;)",
|
||||
"contributors": [
|
||||
"back2dos"
|
||||
],
|
||||
"releasenote": "Add helper for transforming TypeParameter to TypeParamDecl.",
|
||||
"version": "0.17.3",
|
||||
"url": "http://haxetink.org/tink_macro",
|
||||
"dependencies": {
|
||||
"tink_core": ""
|
||||
}
|
||||
}
|
@@ -43,8 +43,11 @@ class Exprs {
|
||||
}
|
||||
|
||||
static public inline function is(e:Expr, c:ComplexType)
|
||||
return ECheckType(e, c).at(e.pos).typeof().isSuccess();
|
||||
|
||||
return e.as(c).typeof().isSuccess();
|
||||
|
||||
static public inline function as(e:Expr, c:ComplexType)
|
||||
return ECheckType(e, c).at(e.pos);
|
||||
|
||||
static public function finalize(e:Expr, ?nuPos:Position, ?rules:Dynamic<String>, ?skipFields = false, ?callPos:PosInfos) {
|
||||
if (nuPos == null)
|
||||
nuPos = Context.currentPos();
|
||||
|
@@ -9,7 +9,7 @@ abstract Member(Field) from Field to Field {
|
||||
name: name,
|
||||
pos: pos,
|
||||
access: [APublic],
|
||||
kind: FProp(noread ? 'null' : 'get_' + name, nowrite ? 'null' : ('set_' + name), t),
|
||||
kind: FProp(noread ? 'null' : 'get', nowrite ? 'null' : 'set', t),
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@@ -202,4 +202,4 @@ abstract Member(Field) from Field to Field {
|
||||
if (add != null)
|
||||
this.access.push(add);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -247,4 +247,13 @@ class Types {
|
||||
default: '';
|
||||
}
|
||||
|
||||
static public function toDecl(p:TypeParameter):TypeParamDecl
|
||||
return {
|
||||
name: p.name,
|
||||
constraints: switch p.t {
|
||||
case TInst(_.get() => { kind: KTypeParameter(c)}, _): [for(c in c) c.toComplex()];
|
||||
case _: throw 'unreachable';
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user