feat: add <<< and >>> abbreviating operations to default stream
Resolves #16.
This commit is contained in:
parent
2772fd0c5c
commit
7d4d3b93c9
8 changed files with 37 additions and 12 deletions
|
@ -2,13 +2,16 @@ module javascript
|
|||
imports libstrategolib signatures/- util
|
||||
|
||||
rules
|
||||
js: TopLevel(x) -> $[const Stdio = {
|
||||
js: TopLevel(x) -> $[// Fostr preamble
|
||||
const Stdio = {
|
||||
gets: v => { process.stdout.write(String(v)); return Stdio; },
|
||||
}
|
||||
function to(data, strm) {
|
||||
strm.gets(data);
|
||||
return data;
|
||||
}
|
||||
// End of preamble
|
||||
|
||||
[x]]
|
||||
|
||||
js: Stream() -> $[Stdio]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue