Hi rustaceans! What are you working on this week? Did you discover something new, you want to share?

  • Tibi@discuss.tchncs.de
    link
    fedilink
    arrow-up
    0
    ·
    24 days ago

    I am currently writing an LSP for the shaderscript used in Godot. Its close to glsl but some differences make me not wanting to just copy paste a glsl one. I am currently trying to wrap my head around chumsky. I am coming from a lot of c code and my head doesnt work like chumsky does, so it has its ups and downs, but lexer for glsl and lexer, parser and like half oft the evaluator for the preprocessor are done and working😊

    • DeprecatedCompatV2@programming.dev
      link
      fedilink
      arrow-up
      0
      ·
      edit-2
      24 days ago

      How difficult is writing an LSP? I would like to be able to use a reasonably complete implementation for Kotlin, but Kotlin is not a simple language.

      • Tibi@discuss.tchncs.de
        link
        fedilink
        arrow-up
        0
        ·
        24 days ago

        Well you’re writing a Compiler with extra features to tell you where compilation failed but without actually executing the code. If the language you are trying to implement has defined a BNF for its language its quite doable and depending on the features you want to implement almost easy. There are BNF interpreters and chumsky e.g. is close to reading like a BNF. But if you’re building a language where you gotta find out the rules yourself it can take a while and finding all the edgecases can be a problem… But the project is big enough that most probably don’t finish theirs