Added step0_repl.ts
This commit is contained in:
commit
5b5832e475
8 files changed
+75
No files matched your search
Generated
+8
@@ -0,0 +1,8 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
Generated
+12
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
Generated
+8
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/deno-mal.iml" filepath="$PROJECT_DIR$/.idea/deno-mal.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
Generated
+6
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#! nix-shell -i bash --pure
|
||||
#! nix-shell -p bash deno
|
||||
exec deno run -A $(dirname $0)/${STEP:-stepA_mal}.ts "${@}"
|
||||
@@ -0,0 +1,36 @@
|
||||
function read(source: string): string {
|
||||
return source;
|
||||
}
|
||||
|
||||
function eval_(ast: string): string {
|
||||
return ast;
|
||||
}
|
||||
|
||||
function print(form: string): string {
|
||||
return form
|
||||
}
|
||||
|
||||
function rep(source: string): string{
|
||||
return print(eval_(read( source)))
|
||||
}
|
||||
|
||||
function* readUserInputs(): Generator<string>{
|
||||
while(true){
|
||||
const u = prompt("user> ")
|
||||
if(u === null){
|
||||
return
|
||||
}
|
||||
yield u
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function main(): void {
|
||||
for(const userInput of readUserInputs()){
|
||||
rep(userInput);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
main();
|
||||
Reference in new issue
Block a user