Files
Pierre-Marie de Rodat 2b9b33d6a0 Remove __future__ imports and adjust stylechecks
TN: T511-017
2020-05-26 12:33:48 +02:00

14 lines
301 B
Python

import libfoolang
ctx = libfoolang.AnalysisContext()
unit = ctx.get_from_file('foo.txt')
for node in unit.root.findall(lambda _: True):
print('{} node: {}'.format(
'Ghost' if node.is_ghost else 'Regular',
node
))
assert not node.text or not node.is_ghost
print('Done.')