lips
lips copied to clipboard
Try to connect stdin with Lexer/Parser
This would make possible to access Lexer using read from inside syntax extension, and allow to create completely new syntax, the same as Common Lisp reader macros. There would be requirement of new type of specials that don't accept any object that will modify the lexer when it's running.
There was failed attempt to implement reader macros in #13 but here after Lexer is added that is in fact like character stream this is possible to implement.
Here is reference for CL Reader Macros
It should be possible to implement object literal syntax like this:
#{ "foo": "bar" }
The extension should use stdin to read the text and process it. It should be a recursive process. The reader should use Lexer to process the text inside to allow nested objects:
#{ "foo": #(1 2 3) }
It should red string symbol : and a value. until it finds }.