Stefan
07/24/2020, 3:25 PMStefan
07/24/2020, 3:28 PMS.M Mukarram Nainar
07/24/2020, 3:29 PMKartik Agaram
#
in there that disables everything you're parsing. And so on.
This is a key difference between tools and languages, IMO. Tools can be opt-in (though they don't have to be). But languages have to be all or nothing.
In Mu I tried as far as possible to do everything with partial on-demand syntax sugar. But there's still 2 points at which I need to draw a line and start parsing everything from scratch.Martin
07/24/2020, 3:34 PMStefan
07/24/2020, 3:34 PMS.M Mukarram Nainar
07/24/2020, 3:35 PMStefan
07/24/2020, 3:35 PMIonuț G. Stan
07/24/2020, 3:36 PMJimmy Miller
Stefan
07/24/2020, 3:37 PMMartin
07/24/2020, 3:55 PM{=js
as starting delimiter and js=}
as end delimiter. While situation could in theory happen where developer wants to have such sequence (js=}
) in their code inside this JS block, as a part of string for example, I don't think it is a real problem in practice, and it can be easily circumvented (by breaking down the string or adding some whitespace or so on). So we basically parse these blocks as strings, and then process them later in the pipeline (some of them we even just copy paste and never process -> but those are implementation details now).
As more advanced step, I see doing the following: once our parser hits the {=js
, we switch to JS parser and let it parse whatever follows, JS statement by JS statement. After each JS statement, we can check if there is =js}
after if, and if so, we stop with parsing JS and continue with our parser. I believe JSX does something similar, although maybe somewhat simpler.Kartik Agaram
Ionuț G. Stan
07/24/2020, 4:08 PMIonuț G. Stan
07/24/2020, 4:08 PMStefan
07/24/2020, 4:09 PMStefan
07/24/2020, 4:09 PMStefan
07/24/2020, 4:12 PMStefan
07/24/2020, 4:16 PMKartik Agaram
Martin
07/24/2020, 4:45 PMStefan
07/24/2020, 4:49 PMStefan
07/24/2020, 4:59 PMIonuț G. Stan
07/24/2020, 5:53 PMRay Imber
07/24/2020, 7:22 PMKartik Agaram
Kartik Agaram
Stefan
07/24/2020, 9:12 PMwtaysom
07/25/2020, 7:22 AMKartik Agaram
Kartik Agaram
wtaysom
07/28/2020, 2:42 AMwtaysom
07/28/2020, 2:45 AMIonuț G. Stan
07/28/2020, 7:27 AMwtaysom
07/28/2020, 7:56 AMIonuț G. Stan
07/28/2020, 12:55 PMKartik Agaram