You can try this library out in your browser (via Pyodide) at tools.simonwillison.net/sqlite-ast. {'type': 'select', 'distinct': False, 'all': False, 'columns ...
To parse Python 3 code, pass a string containing the code to the parse method. const code = [ 'x, y = 0, 0', 'while x < 10:', ' y += x * 2', ' x += 1', 'print(y ...