Giter Site home page Giter Site logo

Comments (6)

maxxnino avatar maxxnino commented on May 21, 2024 1

I just take a quick look at the query, I think the problem in this query

(ForTypeExpr
(SuffixExpr
(SwitchExpr) @loop.inner)) @loop.outer

Just change this to, and why not ForStatement. btw, i will test tomorrow morning

 (ForTypeExpr 
  (ErrorUnionExpr
   (SuffixExpr  
     (SwitchExpr) @loop.inner))) @loop.outer 

from nvim-treesitter-textobjects.

maxxnino avatar maxxnino commented on May 21, 2024

I will update tonight, after I get back from work. The query is working. I think because I forgot update the new c generated file, or need to update the lockfile.json

from nvim-treesitter-textobjects.

maxxnino avatar maxxnino commented on May 21, 2024

@theHamsta i try the lastest commit nvim-treesitter/nvim-treesitter@1e4c846. The current query and parse compiled and work fine on my machine, with the commit hash lockfile.json.

  • Nvim tree sitter repo

nvim

  • Tree sitter zig repo

zig-tree

  • Query on my machine

zig-file

What should i do, The (paser + query) and The lockfile.json in two separate commit, but from 1 pull request. Is this the cause of the problem. I don't know how the CI work under the hood😕

from nvim-treesitter-textobjects.

stsewd avatar stsewd commented on May 21, 2024

@maxxnino the problem is with this query file https://github.com/nvim-treesitter/nvim-treesitter-textobjects/blob/master/queries/zig/textobjects.scm, it should be updated to use the queries from the new parser.

from nvim-treesitter-textobjects.

maxxnino avatar maxxnino commented on May 21, 2024

phew, I thought I mess something up, I don't know how the textobject work yet. It's late now, i will look at this tomorrow morning, and will try my best to update the query

from nvim-treesitter-textobjects.

theHamsta avatar theHamsta commented on May 21, 2024

Has been fixed by @maxxnino

from nvim-treesitter-textobjects.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.