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

}

@abstract class FooNode : Node {
}

class Example : FooNode {

    fun to_public (p : PrivatePoint): Point = Point(x=p.x, y=p.y)

    @export fun prop (p : Point): Point =
    node.to_public(PrivatePoint(x=p.x, y=p.y))

    @export fun result (): NodeResult = NodeResult(n=node)
}

struct NodeResult {
    n : Example
}

struct Point {
    x : BigInt
    y : BigInt
}

struct PrivatePoint {
    x : BigInt
    y : BigInt
}
