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

17 lines
381 B
Python

"""
Test that lexical environments still work when resolving from a parent package,
when the parent package has been reparsed.
"""
import libadalang as lal
c = lal.AnalysisContext('utf-8')
u = c.get_from_file("foo-bar.ads")
i = u.root.find(lal.PragmaArgumentAssoc).f_expr
print(i.p_matching_nodes[0])
u2 = c.get_from_file("foo.ads", reparse=True)
print(i.p_matching_nodes[0])