Closed darioteixeira closed 7 years ago
The culprit is
https://github.com/mfp/ocaml-sqlexpr/blob/master/src/ppx/sqlexpr_parser.ml#L50
Using a regexp makes me a bit uncomfortable but it's not like estring could handle }
inside the expression either (or could it?). I can't see any reason not to use the laxer Re_pcre.regexp {|@([dlLfsSba])(\?)?\{([^}]+)\}|}
off the top of my head.
There seems to be a regression with the PPX syntax extension in master. In the old Camlp4 syntax, constant string expressions (ex:
@s{'hello'}
) worked fine, but that's no longer the case with the PPX syntax. @mfp diagnosed the issue in the IRC channel: the regexp is too strict, not allowing for quoted strings.In addition, if the expression invokes a Sqlite function, whitespace is not allowed. Therefore,
@d{count(*)}
is accepted but@d{count (*)}
is not. Perhaps this should be documented.