Logo
Explore Help
Sign In
ada/langkit
0
0
Fork 0
You've already forked langkit
mirror of https://github.com/AdaCore/langkit.git synced 2026-02-12 12:28:12 -08:00
Code Issues Packages Projects Releases Wiki Activity
Files
22.2
langkit/testsuite/tests/python_api/python_app/expected_concrete_syntax.lkt

13 lines
220 B
Plaintext
Raw Permalink Normal View History

T910-014: Improve App - Allow just subclassing App.process_unit, by providing a default main that iterates on units and calls process_unit on each - Allow passing args to python App programmatically
2020-09-10 11:37:44 +02:00
import lexer_example
@with_lexer(foo_lexer)
grammar foo_grammar {
@main_rule main_rule <- Example("example")
}
U920-002: avoid mismatched type error on root node As the LexicalEnv.get method always return an array of root nodes while the root node is defined in user code, we need to turn the Node and LexicalEnv classes into generic traits and instantiate them using the actual root node. To make this works, root node declaration has to be changed from `class FooNode : Node` to `class FooNode implements Node[FooNode]`, which required to refactor a bit almost all the lkt tests.
2021-09-20 08:08:43 +00:00
@abstract class FooNode implements Node[FooNode] {
T910-014: Improve App - Allow just subclassing App.process_unit, by providing a default main that iterates on units and calls process_unit on each - Allow passing args to python App programmatically
2020-09-10 11:37:44 +02:00
}
class Example : FooNode implements TokenNode {
}
Reference in New Issue Copy Permalink
Powered by Gitea Page: 129ms Template: 11ms
English
English
Licenses API