Comments (7)
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.
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.
@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.
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.
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.
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.
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)
- Extension is not enabled after loading HOT 6
- Code that start with rem get highlighted as VBA comment
- support for params completion HOT 2
- [ENHANCEMENT]Definition jump and Hover
- Have a question about suffix? HOT 1
- Syntax highlighting does not work on multi-line comments (MINOR) HOT 10
- Keyword highlighting is missing a number of tokens HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-vba.