3 ms·
I had to look up whether you were technically accurate (I've a PhD in compilers but parsing's not really my thing), and I think the answer is "it depends, maybe
by pbiggar 6y ago
I had to look up whether you were technically accurate (I've a PhD in compilers but parsing's not really my thing), and I think the answer is "it depends, maybe?"
To get to the root of the issue though, there is not a parser.
Well, one could consider the function that takes each keystroke to be a parser - though I don't know if that's technically correct either. So perhaps the more accurate thing to say is there is not a step that takes a textual source file and parses it.
- GreedCtrl 6y agoWhat would happen if you paste a complete program in all at once?
- pbiggar 6y agoThat's not really how Dark works. You're not manipulating text in your editor - you use our editor, and our editor only uses ASTs. So when cutting and pasting, you're cutting and pasting AST, not text. So to answer your question, you can paste an entire handler or function at once, but it will be one you copied from another place in DArk and it will be structured. We've looked at allowing people to paste text (eg from Stackoverflow) into Dark. We think we can do it by just inserting each character one at a time (though there's a technical flaw with that at the moment, which could be addressed). In that sense, Dark is sort-of a parser (I don't know if it technically counts).