GithubHelp home page GithubHelp logo

Comments (7)

cezarypiatek avatar cezarypiatek commented on May 26, 2024 1

Hi @spences10

I've found a VB pareser in c# https://github.com/icsharpcode/ILSpy/tree/master/NRefactory.VB/ICSharpCode.NRefactory.VB

Maybe we could try to port it to TypeScript using for example Rosetta https://github.com/andry-tino/Rosetta

Unfortunately ICSharpCode.NRefactory.VB seems to be abandon (ILSpy go forward without it) and I've had problem with checking out working revision.

Btw, thanks for the links. I will investigate it in the free time.

from vscode-vba.

spences10 avatar spences10 commented on May 26, 2024

Hi @cezarypiatek,

Apologies I have only come across this issue by chance rather than by being notified by GitHub, the language extension features are what I have wanted to incorporate into this for a while now but have not got the skill or knowledge on how to implement something like this.

I'll take a look at the link and try not to get lost in the documentation 😄

Is this something you could attempt to do yourself I'd happily accept a PR or if you are doing your own version then please share a link so I can see how you have done it 😄

Thanks

from vscode-vba.

spences10 avatar spences10 commented on May 26, 2024

@cezarypiatek I've had a look around and found this thread which explains a bit as to why this hasn't been done yet particularly this comment from @chrisdias

I don't think it is possible to do by a third party either, as there isn't an easily consumable API for the compiler.

from vscode-vba.

spences10 avatar spences10 commented on May 26, 2024

Wow, good find @cezarypiatek

What issues were you having checking out working revision?

I'm guessing you're a Visual Studio user?

from vscode-vba.

cezarypiatek avatar cezarypiatek commented on May 26, 2024

Yes, I'm using Visual Studio.

I've checkout master but ILSpy.sln does not contains ICSharpCode.NRefactory.VB project, so I've created branch from a6ae2e4b24241ad8a4430f3aa55f99ca934f69b3 revision (the last that contains changes in NRefactory.VB directory). Next I've checkout all submodules (NRefactory is a submodule). Now I have ILSpy.sln with ICSharpCode.NRefactory.VB (and all NRefactory projects) but it still does not compile.
For example there is a missing namespace ICSharpCode.NRefactory.PatternMatching etc. Maybe the NRefactory submodule is from wrong revision.

from vscode-vba.

cezarypiatek avatar cezarypiatek commented on May 26, 2024

Finally I managed to checkout working version but I was unable to parse VBA sample code. It looks like this is a VB.NET parser and I doesn't work with VBA. Maybe with a litte twist we could make it work with VBA but I'm not sure if I want to waste my life for it - there is a lot of unused method, a lot of commented out code and so much magic numbers which drive parser logic...

from vscode-vba.

spences10 avatar spences10 commented on May 26, 2024

Yeah, I think this will take a lot of time.

I spent a bit of time looking into a language server and was out of my depth

from vscode-vba.

Related Issues (8)

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.