Playing with colors!

Published September 23, 2014
Advertisement
Been playing around with a dark theme for Era:

Era dark theme Sep 2014.png

Syntax highlighting still needs some love, but it's getting there.


Note that the IDE now highlights structure type names and function names. This is currently activated by pressing F12, which triggers a parse of the entire project. The parse stores off relevant identifiers for use in syntax highlighting. Obviously that's a painfully manual process, but I'll get it more seamless someday.

I'm not sure I care enough about local variables to bother figuring out a way to highlight them.


Sooner or later I'll actually have enough of this dumb IDE working that I'll feel comfortable doing heavy-lifting code work in it all the time. I think the main thing I want is symbol lookup, and with the parser now integrated and doing its thing, that shouldn't be too hard.
3 likes 5 comments

Comments

Washu
Have you pushed these changes?

Also, it would be useful to have the AST available for adding arbitrary plugins for parsing and handling epoch files. This would allow one to, for instance, extend the editor with a "view" based system, instead of a source based system.
September 23, 2014 08:05 AM
ApochPiQ
Everything should be up to date in trunk in the examples repo, yes.


Currently there are hooks in the parser for doing symbol registration. Only the parser is used by Era right now, but in theory it wouldn't be too much work to move chunks of the compiler over so the AST could be traversed freely from within the IDE.
September 23, 2014 07:13 PM
Washu

Well, my thinking is that if the AST was exposed as a separate component, that the code generator then plugged into...

This would allow for a great deal more extensibility and tools capabilities than just exposing the AST to the editor.

The next version of .net (roslyn), for instance does this, which allows you to write arbitrary language operations such as automatically enforcing that all if statements be braced.

September 24, 2014 03:26 AM
ApochPiQ
Well the language doesn't have any particular modularity features yet, so it's a little difficult to factor things such that your suggestion would be easy to implement.

Of course, some minor refactoring could probably get things to the point where the code can be shared more deeply, but I'd like to see the modularity stuff go in first to help define clear API boundaries.
September 24, 2014 04:49 AM
Washu
Well, working on an epoch JSON parser so that we can save theme and settings configuration information.

Once that's up and running I'll plug it into the editor and move this color stuff out from being hard coded.
September 25, 2014 01:49 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement