Giter VIP home page Giter VIP logo

Comments (5)

dparnell avatar dparnell commented on June 14, 2024 2

I have just made release 0.0.25 which should fix the issue with nested arrays. It should become available on the marketplace in a couple of days

from intellij-wgsl.

dparnell avatar dparnell commented on June 14, 2024 1

Hi @rosingrind I'm using the stuff in IntelliJ to generate the files. I'll take a look at what it is doing.

from intellij-wgsl.

rosingrind avatar rosingrind commented on June 14, 2024

I've tried to look into the issue, it seems that besides of a trivial problem with lexing/parsing rules, something may be wrong with generated lexer/parser classes. I'm on IU-2023.1 using plugin GK-2022.3.2 (jflex-1.9.1) but tested this with jflex-1.7.0-2 also and I've encountered something weird: if you erase gen directory and generate lexer + parser, you'll get a lot of diffs:

image

Most of these diffs are generated boilerplate getters/setters for internals. Are you using some kind of automation to perform generation? I'm questioning because of a known issue with gradle-based support for grammar-kit JetBrains/gradle-grammar-kit-plugin#3

Some of generated files contained a bit of trivial to fix problems:

  • WGSLVariableIdentDecl.java contains duplicates for generated PsiElement setName(String name)
  • _WgslLexer.java contains duplicates of zzAtBOL and zzEOFDone

It seems to me that lexer and parser files may be not in sync to produce fully-correct output, or there are some hand-crafted parsing procedures (or it's just about updated jflex and grammar-kit). I'm writing this to ask if grammar files may be left hanging mid-refactoring, because if so - it's not possible for volunteers to fix any such issue. @dparnell please update the situation with any status, and thanks for the plugin!

from intellij-wgsl.

rosingrind avatar rosingrind commented on June 14, 2024

Adding a space between the brackets solves the issue.

Produced from this, there is a brace-matching behavior bug. Assuming you have this code:

fn test() {
    let a = a[a[a]];
}

Place cursor after first opening { and press return - you'll get a matching pair inserted

fn test() {

}
    let a = a[a[a]];
}

from intellij-wgsl.

sagacity avatar sagacity commented on June 14, 2024

Thanks for the fix!

from intellij-wgsl.

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.