import lexer_example
@with_lexer(foo_lexer)
grammar foo_grammar {
    @main_rule main_rule <- Example("example")

}

@abstract class FooNode : Node {
}

class Example : FooNode {

    @export fun test_struct_iterator (): Iterator[Iterator[TestStruct]] = {
        val value = TestStruct(count=2, nodes=[null, self]);
        val itr = [value, value].to_iterator();

        [itr, itr].to_iterator()
    }
}

struct TestStruct {
    count : Int
    nodes : Array[Example]
}
