Visual Studio Code Language Provider

56 views
Skip to first unread message

Mike Rubits

unread,
Aug 17, 2018, 11:39:46 PM8/17/18
to Wren
Hi all! I've been using Wren on and off for about 9 months or so. I first found out about Wren through a fork of the TIC-80 fantasy console, and after really enjoying working with it, I embedded it into my toy 2D engine. A couple of friends and myself have built and successfully finished a game for a game jam using the engine and Wren last month, which can be played at https://alligator.itch.io/clive (the audio on the web version is a little janky but it should play the same!)

After getting frustrated by not remembering my API without constantly looking at my engine class, I looked into what it'd take to get some basic autocomplete functions. I found Wrenalyzer, did a pretty direct port to TypeScript, and a day or two ago was able to get everything parsing relatively smoothly. I've pulled out a bunch of symbols from scripts to populate autocomplete, mainly focusing on getting classes and class methods working. It suits my needs, but probably not very many other people's right now!

I've thrown it up on GitHub, VSIX for install is in the Releases section, along with some screenshots. I have no idea if anyone else is working on anything like this, but I'm hoping this might inspire someone else to improve it.

(I realize porting Wrenalyzer to TypeScript is probably not the best way to go about this. I figure it's probably feasible to build a standalone Wrenalyzer that can be compiled into WASM and driven from the extension's JS, but this actually ended up being easier. It seemed challenging to render out the AST to JSON from Wren itself, and having all the structures available natively was useful, especially the lexer.)

Reply all
Reply to author
Forward
0 new messages