Files
Pierre-Marie de Rodat 4382a22f9c Reorganize the source tree
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
2020-11-02 16:51:46 +01:00

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)