mirror of
https://github.com/AdaCore/langkit.git
synced 2026-02-12 12:28:12 -08:00
11 lines
230 B
Python
11 lines
230 B
Python
import libfoolang
|
|
|
|
|
|
ctx = libfoolang.AnalysisContext()
|
|
unit = ctx.get_from_buffer("foo.txt", b"example example")
|
|
|
|
for node in [unit.root, unit.root[0]]:
|
|
print("bool({}) = {}".format(node, bool(node)))
|
|
|
|
print("main.py: Done.")
|