sledorze / Parsex

Packrat Parser combinators for Haxe
21 stars 5 forks source link

not support @:keep at some case . #6

Closed sonygod closed 11 years ago

sonygod commented 11 years ago

//it's seem not support some case when I add @class(10) @:keep
//code Test -lib tinkbell https://github.com/back2dos/tinkerbell/tree/haxe_r6388 ]package ;

import haxe.unit.TestCase; import tink.lang.Cls; using Lambda;

class ClsTest extends TestCase {

public function new() {
    super();
}
function testFwdBuild() {

    var f = new Forwarder();

    assertEquals(f.foo4(1, 2), 'foo1_3');

}

}

@class(10) @:keep interface Fw4 { @index(1) function foo4(f:Int, g:Int):Void; @index(2) function bar4(ff:Array):Void; }

class Forwarder implements Cls { var fields:Hash = new Hash();

@:forward function fwd2(x2:Fw4) {
    get: fields.get($name),
    set: fields.set($name, param),
    call: $name + '_' + $args.length
}
public function new() {

}

}

sledorze commented 11 years ago

I think this is

sledorze commented 11 years ago

Sorry, I think this is a bug report for Tinkerbell, not Parsex, right? :)

sonygod commented 11 years ago

right!