tree-sitter-python
tree-sitter-python copied to clipboard
Python grammar for tree-sitter
``` def comp_args((a, b)=(3, 4)): return a, b ``` ``` (module [0, 0] - [2, 0] (function_definition [0, 0] - [1, 15] name: (identifier [0, 4] - [0, 13]) parameters:...
Currently the `\` is ignored in the following: ``` from x \ import y ``` For [difftastic](https://github.com/wilfred/difftastic) I'd really like to be able to see this `\` operator in the...
Example formatted by MagicPython: 
Consider ```python u = f'\N{GREEK CAPITAL LETTER DELTA}' ``` which is a ascii-only way to get the unicode-glyph with the name in between `{` and `}`. Parse Tree: ``` expression_statement...
I would expect this not to parse/parse with errors: ``` def foo(): foo() ``` But AFAICT there are no `ERROR` nodes in the tree, nor are there any nodes for...
Hey forum, how do I set the style of a s expression? E.g. I want to catch all the if statements, I use a query like this:`(if_statement(condition_clause(_)) @condition_clause.inner)` to get...
0.17.0 > 0.17.1
This PR makes "and" "in" "is" "not" "or" keywords instead of operators and updates existing highlighting tests According to [python docs](https://docs.python.org/3/reference/lexical_analysis.html#keywords)
For the following code: ``` try: pass except Exception as e: pass ``` ``` ... except_clause ) identifier ) identifier ) block ) ... ``` It would be helpful to...