Closed rynkis closed 7 years ago
@Shy07 your use case should be covered by extending the utility of the 'lang ...'
directive.
The idea is to allow extending the reader. This would allow you to create custom punctuators among other things. It would also allow you to specify a set of macros to be implicitly imported.
I think your patch
example fails to work because Sweet currently only has a single macro expansion phase.
@disnet please correct me if I'm wrong on any of these points.
Hi, thanks for the write-up, but I have got some problems. Here is my example.sjs:
In usual, I can import these macros by:
It works.
But in the future, maybe it will become:
or longer.
So, I have tried to import all macros by another macro:
then:
But failed.
In past version, we can use
sjs -m
to import all macros from specified .sjs file. So I can usecat export.sjs import.sjs > temp && sjs temp
and removeexport
keyword to get the same effect. But is there any way for a more elegant, or new feature in plan such as:to import macros by one macro? Thanks.