Minor changes. Bump version.
This commit is contained in:
20
LICENSE
Normal file
20
LICENSE
Normal file
@@ -0,0 +1,20 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2013 Juraj Kirchheim
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -4,11 +4,11 @@
|
||||
"license": "MIT",
|
||||
"tags": ["tink", "macro", "utility"],
|
||||
"description": "The macro toolkit ;)",
|
||||
"version": "0.0.0-alpha.2",
|
||||
"version": "0.0.0-alpha.3",
|
||||
"releasenote": "Overall refactoring.",
|
||||
"contributors": ["back2dos"],
|
||||
"dependencies": {
|
||||
"tink_core": "1.0.0-alpha.2"
|
||||
"tink_core": "1.0.0-beta.1"
|
||||
},
|
||||
"classPath": "src"
|
||||
}
|
@@ -3,13 +3,14 @@ package tink.macro;
|
||||
import haxe.macro.Context;
|
||||
import haxe.macro.Expr;
|
||||
import tink.core.Error;
|
||||
|
||||
using tink.macro.Positions;
|
||||
using tink.core.Outcome;
|
||||
|
||||
class Positions {
|
||||
static public function getOutcome<D, F>(pos:Position, outcome:Outcome<D, F>):D
|
||||
return
|
||||
switch (outcome) {
|
||||
switch outcome {
|
||||
case Success(d): d;
|
||||
case Failure(f): pos.error(f);
|
||||
}
|
||||
|
@@ -2,6 +2,7 @@ package ;
|
||||
|
||||
import haxe.macro.Context;
|
||||
import haxe.macro.Expr;
|
||||
|
||||
using tink.Macro;
|
||||
|
||||
class Positions extends Base {
|
||||
|
@@ -2,6 +2,7 @@ package ;
|
||||
|
||||
import haxe.macro.Expr;
|
||||
import haxe.macro.Context;
|
||||
|
||||
using tink.Macro;
|
||||
|
||||
class Types extends Base {
|
||||
@@ -23,8 +24,8 @@ class Types extends Base {
|
||||
}
|
||||
|
||||
function testFields() {
|
||||
var iterator = type(macro : haxe.ds.StringMap<Arrayish>).getFields(true).sure().filter(function (c) return c.name == 'iterator')[0];
|
||||
var expected = type(macro : Void -> Iterator<Arrayish>);
|
||||
var expected = type(macro : Void -> Iterator<Arrayish>),
|
||||
iterator = type(macro : haxe.ds.StringMap<Arrayish>).getFields(true).sure().filter(function (c) return c.name == 'iterator')[0];
|
||||
|
||||
assertSuccess(iterator.type.isSubTypeOf(expected));
|
||||
assertSuccess(expected.isSubTypeOf(iterator.type));
|
||||
@@ -43,4 +44,3 @@ class Types extends Base {
|
||||
Macro.pos().makeBlankType().toString();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user