You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 and static.
The transformation are generally similar to the following, and might be implementable fully in the library:
{ type T is Impl } is { T as type is Impl }
{ type T with Interface } is { T as type with Interface }
{ type T inherits Base } is { T like Base }
{ type T like Base } is { T like Base }
{ T inherits Base } is { T like Base }
{ module M is Impl } is { M as module is Impl }
{ module M with Interface } is { M as module with Interface }
{ procedure Proc is Impl } is { Proc as mayfail is Impl }
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:
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)
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: