-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New syntax extension #19
Comments
What I'm thinking for now :
@balat, @benozol, Did I forget anything ? @alainfrisch, do you have better suggestions ? |
I don't have any experience with writing client/server mechanism in Ocsigen, so I cannot really comment. In order to mark "sections" of code, you could also use extension nodes or attributes as delimiters. Instead of [%%client ...], you could do: [%%client] This could be more robust w.r.t. other syntactic tools, since it would make the content of the section appear in the normal stream of structure items, not nested under the extension node. For injection: if this is syntactically a unary prefix operator, did you consider using an actual operator symbol (e.g. "!!" or "~~")? |
I prefer to have explicit delimiters for sections. And I really like Indeed, we could use an operator, but the potential of breaking something else is extremely high, so I'm not very fond of it. |
The operator could be (re)defined by the user, as is: [%%ocsigen.injection "~~"] This would give a way to resolve clashes locally. |
That's an interesting solution. We could use ~% by default to have minimal modification with the current state, which is nice. |
I'm planning to do a new syntax extension, using the new extension-point mechanism and following some ideas from Alain Frisch.
The syntax would look like this :
There is something a bit touchy : injections. I havn't study the question enough to have an opinion on it.
I didn't even begin to work on this, and we have quite some time since extension-points just got only merge on the trunck. Any feedback on the syntax and ideas about this would be appreciated.
hopefully, this new syntax should fix some bugs like #18.
The text was updated successfully, but these errors were encountered: