... | @@ -7,6 +7,8 @@ But JS complicates this because delimiters can appear inside |
... | @@ -7,6 +7,8 @@ But JS complicates this because delimiters can appear inside |
|
of a regex literal and deciding if `/` is the start of a
|
|
of a regex literal and deciding if `/` is the start of a
|
|
regex or the division operator depends on parsing context.
|
|
regex or the division operator depends on parsing context.
|
|
|
|
|
|
|
|
The read algorithm follows but see also the DLS 14 [paper](https://github.com/mozilla/sweet.js/blob/master/doc/dls2014/sweetjs.pdf?raw=true) which goes into more detail.
|
|
|
|
|
|
### Give lookbehind to the reader
|
|
### Give lookbehind to the reader
|
|
|
|
|
|
So to handle the problem of `/` we can use "almost one" lookbehind to
|
|
So to handle the problem of `/` we can use "almost one" lookbehind to
|
... | @@ -463,4 +465,3 @@ Useful papers on macros: |
... | @@ -463,4 +465,3 @@ Useful papers on macros: |
|
* Refining Syntactic Sugar: Tools for Supporting Macro Development
|
|
* Refining Syntactic Sugar: Tools for Supporting Macro Development
|
|
* Fortifying Macros
|
|
* Fortifying Macros
|
|
* Composable and Compilable Macros |
|
* Composable and Compilable Macros |
|
|
|
|