2024-10-14 09:47:37 +00:00
|
|
|
# Test that the bool() operator on nodes works as expected
|
|
|
|
|
|
2026-01-13 14:49:31 +00:00
|
|
|
from lexer_example import foo_lexer
|
2022-05-10 15:08:11 +02:00
|
|
|
|
2020-06-24 14:14:47 +02:00
|
|
|
@with_lexer(foo_lexer)
|
2020-02-26 11:14:20 +01:00
|
|
|
grammar foo_grammar {
|
2020-02-28 04:26:12 -05:00
|
|
|
@main_rule main_rule <- list+(Example("example"))
|
2020-01-10 18:12:10 +01:00
|
|
|
}
|
2020-01-10 15:14:02 +01:00
|
|
|
|
2024-06-27 17:49:11 +02:00
|
|
|
@abstract
|
|
|
|
|
class FooNode implements Node[FooNode] {
|
2020-01-10 18:12:10 +01:00
|
|
|
}
|
2020-01-09 13:01:18 +01:00
|
|
|
|
2023-09-22 09:47:18 +00:00
|
|
|
class Example: FooNode {
|
2020-01-10 18:12:10 +01:00
|
|
|
}
|