Andrew Hlynskyi

Results 145 comments of Andrew Hlynskyi

Actually there no a strict need to handle the case of immediate rules in tree-sitter internals, it can be modeled in `grammar.js` file by defining several JS functions. You can...

I've also modeled it with `token.immediate` [here](https://github.com/ahlinc/tree-sitter-plantuml/blob/demo/grammar.js#L450). For my case it was enough that the first terminal token inside of the `rule2` rule would be marked by `token.immediate`.

If to implement such standalone `immediate` function in some approach than it makes sense to make this function generic and allow that it would be applicable to rules: `immediate($.rule)` and...

> `token.immediate` has different semantics: > > * `token.immediate` only matches a whole token without returning the nodes that make up the parent node. > * `immediate` matches the consecutive...

I don't know about such discussions unfortunately but I'd like to describe my thoughts how this may work: - Firstly, the simple list in documentation don't represent well any quality...

An approach with a global pointer to a decoding function doesn't allow to work with different parser instances and ~~files~~ input streams with various custom encodings in a multi threaded...

> > An approach with a global pointer to a decoding function doesn't allow to work with different parser instances and ~files~ input streams with various custom encodings in a...

After reviewing this again I think this may be implemented in a less intrusive way: - First of all keep all existing C APIs untouched. - An addition of `TSInputEncoding_TSInputEncodingCustom`...

It's not possible for now but we have a plan to add such feature.

I'm in progress of implementing a new tree rendering for tree-sitter that will include many representations, ~current rendering of the tree you can see in a picture in thе PR...