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/array-struct-array/expected_concrete_syntax.lkt

20 lines
352 B
Plaintext
Raw Permalink Normal View History

Python API: do not dec_ref C array values when coming from struct fields TN: T423-042
2020-04-27 15:42:41 +02:00
import lexer_example
RA22-015 dsl_unparse: Unparse @with_lexer annotation
2020-06-24 14:14:47 +02:00
@with_lexer(foo_lexer)
Python API: do not dec_ref C array values when coming from struct fields TN: T423-042
2020-04-27 15:42:41 +02:00
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] {
Python API: do not dec_ref C array values when coming from struct fields TN: T423-042
2020-04-27 15:42:41 +02:00
}
class Example : FooNode {
@export fun example_holders (): Array[ExampleHolder] =
[ExampleHolder(examples=[self])]
}
struct ExampleHolder {
examples : Array[Example]
}
Reference in New Issue Copy Permalink
Powered by Gitea Page: 99ms Template: 7ms
English
English
Licenses API