4 ms·
So, looks like it's a textual language, it clearly has a syntax. How you manage the transition from text to AST and back, that's a different story - it might be
by tomp 7y ago
So, looks like it's a textual language, it clearly has a syntax. How you manage the transition from text to AST and back, that's a different story - it might be that your approach is much better! (Though on the other hand it looks similar to how CLR/Roslyn C# compiler does it.)
- pbiggar 7y agoThe code always lives as AST, and the code that you see in the editor is a pretty-print of the AST. We don't go back and forth between AST and text - when you make a change in the editor, we look up the "token" where your cursor was, and use it to find the place in the AST that needs a change, and changes only that.