You've already forked libadalang
mirror of
https://github.com/AdaCore/libadalang.git
synced 2026-02-12 12:28:54 -08:00
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
20 lines
410 B
Python
20 lines
410 B
Python
"""
|
|
Test that one can customize the tab stop to use when lexing. Also make sure
|
|
this parameter is properly sanitized.
|
|
"""
|
|
|
|
import libadalang as lal
|
|
|
|
|
|
c = lal.AnalysisContext('utf-8', tab_stop=20)
|
|
u = c.get_from_buffer('foo.ads', b'\tprocedure Foo;\n')
|
|
print(u.root.sloc_range)
|
|
|
|
|
|
try:
|
|
lal.AnalysisContext('utf-8', tab_stop=0)
|
|
except ValueError as exc:
|
|
print('ValueError: {}'.format(exc))
|
|
|
|
print('Done')
|