pasta
pasta copied to clipboard
Peter's Amazing Syntax Tree Analyzer
We have a custom way of calculating function parameter ranges in PASTA, and we should use that.
The pasta Split token fails to identify the `less()` token with stream in/out tokens (``). This causes the end source location of the token be very high causing the assert....
If we're printing something that's deeply nested, then we should embed the parentage.
I read about pasta on your blog post and decide to play with it. I am not familiar with the internals of libclang or llvm, so this issue may be...
When using a proper gnu access attribute, we get nothing printed out after `print-token-graph` with the alignment. It might be that we didn't discover the attribute in Bounds.cpp. When we...
Some APIs return `std::optional` and others return `Token` knowing that they will be nullable-ish. In the Python bindings, we should specialize `nanobind::type_caster` and `nanobind::type_caster` to present both as `Optional[Token]`.
```int a __attribute__((annotate("a"))), b __attribute__((annotate("b")));``` In the above, we'll print this roughly as: ``` int a __attribute__((annotate("a"))); int b __attribute__((annotate("b"))) ``` This affects the algorithm in `PrintedTokenRange::AlignTokens`.
https://github.com/llvm/llvm-project/blob/3af4590506634fa176be5cb5f53161f96609730c/clang/lib/Parse/ParseExpr.cpp#L1071 This works: ```c++ template struct _BoolConstant {}; #if __has_builtin(__is_destructible) template struct is_destructible : _BoolConstant {}; #endif ``` But this doesn't: ```c++ template struct _BoolConstant {}; template struct is_destructible :...