mirror of
https://github.com/AdaCore/langkit.git
synced 2026-02-12 12:28:12 -08:00
13 lines
296 B
Python
13 lines
296 B
Python
from __future__ import absolute_import, division, print_function
|
|
|
|
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.')
|