Closed vendethiel closed 11 years ago
Wouldn't work for strings, where the empty literal is essential.
My bad. Indeed, we need it,especially since the short string syntax doesn't allow it either. Attractive for regexs? I'm not sure why we'd need an empty one, and even then, we have /(?:)/
Regexes possible, though not very attractive.
For one, unlike JS literal, the single-slash and double-slash have different semantics.
I could see strings/regexs escape like markdown (I have an use case for both), to allow for more flexibility. I looked at 7915ca548825f89232de3629d098f87251bff7b4 but I'm not sure it would be that easy for these because interpolations (though I don't exactly now how these "works", I just know you you instantiate a new lexer, counting pairs to find the closing
}
then merge tokens, or something like that).