mirror of
https://github.com/AdaCore/langkit.git
synced 2026-02-12 12:28:12 -08:00
Lambda functions must have their own scopes to define arguments that do not conflict with entities defined outside of the lambdas.
18 lines
306 B
Python
18 lines
306 B
Python
import sys
|
|
|
|
import libfoolang
|
|
|
|
|
|
print("main.py: Running...")
|
|
|
|
ctx = libfoolang.AnalysisContext()
|
|
u = ctx.get_from_buffer("main.txt", b"example\nexample")
|
|
if u.diagnostics:
|
|
for d in u.diagnostics:
|
|
print(d)
|
|
sys.exit(1)
|
|
|
|
print("p_prop(root) =", u.root.p_prop(u.root))
|
|
|
|
print("main.py: Done.")
|