[wg-camlp4] Meta Programming from the view of the implementaion
Hongbo Zhang
hongboz at seas.upenn.edu
Thu Jan 31 13:27:56 GMT 2013
> In Fan,
> > {:json| ... |}
> > if "|}" is used inside,*the user (optionally) can introduce a new
> separator following "|" immediately*
> > {:json|/ ... /|}
>
> So this would be similar to Leo's proposal but with the optional symbol on
> the inside, a mandatory whitespace
> after the symbol, and no whitespace after the : right?
> {:lid|x␣string x|}
>
> no whitespace, we need the *precise location*, whitespace will introduce
trouble here
The optional *character set is limited to [/+-] (serveral more)*, only
those optional characters will be recgonized.
so you can still write {:json|{a;b}|}
but {:json|/{a;b|}}/|} also works
I actually prefer this one because:
> + easier for editors to highlight beginning/end of quote
> + easier to grep for end of quote
> + easier to grep for what syntax extensions are used in a project: grep
> -Eo "{:[^|]+|"
>
> FWIW Haskell is quite rigid, its syntax for (quasi)quotations is just
> [expr|...|].
>
> Best regards,
> --Edwin
>
> _______________________________________________
> wg-camlp4 mailing list
> wg-camlp4 at lists.ocaml.org
> http://lists.ocaml.org/listinfo/wg-camlp4
>
--
-- Regards, Hongbo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ocaml.org/pipermail/wg-camlp4/attachments/20130131/54c3c14a/attachment.html>
More information about the wg-camlp4
mailing list