Files
Pierre-Marie de Rodat 4382a22f9c Reorganize the source tree
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
2020-11-02 16:51:46 +01:00

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')