-
Notifications
You must be signed in to change notification settings - Fork 15
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
Implement syntactic sugar #6
Labels
Comments
c3d
added a commit
that referenced
this issue
Feb 12, 2020
Syntactic sugar keywords and usage models are described in [the documentation](http://c3d.github.io/xl/#syntactic-sugar) The added keywords added include: type class module function method procedure to operation data macro generic polymorphic iterator fast small global thread static in out inout io constant variable const var They all have low priority (PREFIX 30)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The documentation now describes various forms of syntactic sugar which, incidentally, make most of the code written at the time of XL2 acceptable again.
Most syntactic sugar transform a prefix notation using some particular word into an infix type annotation with possibly some additions. The words being considered include:
type
,class
,module
,function
,method
,procedure
,to
,operation
,data
,in
,out
,inout
,io
,constant
,variable
,macro
,generic
,polymorphic
,fast
,small
,global
,thread
andstatic
.The transformation are generally similar to the following, and might be implementable fully in the library:
There are quite a few more, but the pattern is relatively general and simple.
More direct compiler analysis might be needed for a few cases, but that remains to be confirmed.
The text was updated successfully, but these errors were encountered: