You've already forked libadalang
mirror of
https://github.com/AdaCore/libadalang.git
synced 2026-02-12 12:28:54 -08:00
Move most of "ada/*" to the root directory (this makes sense, as this repository has been dedicated to Libadalang for years), and rename "ada/language" to "ada". TN: T914-010
16 lines
295 B
Python
16 lines
295 B
Python
"""
|
|
Test that the p_semantic_parent property works as one would expect.
|
|
"""
|
|
|
|
import libadalang as lal
|
|
|
|
|
|
c = lal.AnalysisContext('utf-8')
|
|
u = c.get_from_file("foo.adb")
|
|
|
|
ps = u.root.find(lal.ParamSpec)
|
|
print(ps.p_semantic_parent)
|
|
|
|
btd = u.root.find(lal.BaseTypeDecl)
|
|
print(btd.p_semantic_parent)
|