Compare commits
2 commits
07a7b44778
...
f07a256fe6
Author | SHA1 | Date | |
---|---|---|---|
f07a256fe6 | |||
27822fc06a |
2 changed files with 8 additions and 1 deletions
2
programs/cat.worm
Normal file
2
programs/cat.worm
Normal file
|
@ -0,0 +1,2 @@
|
|||
@00000 11\
|
||||
\!=?1/
|
|
@ -65,7 +65,12 @@ fn main() {
|
|||
stdin().read_line(&mut input_text).unwrap();
|
||||
let action: Vec<_> = input_text.trim().split_ascii_whitespace().collect();
|
||||
if input_text.starts_with("input ") {
|
||||
interpreter.input.extend(&input_text.as_bytes()[6..]);
|
||||
interpreter.input.extend(
|
||||
&input_text
|
||||
.strip_suffix('\n')
|
||||
.unwrap_or(&input_text)
|
||||
.as_bytes()[6..],
|
||||
);
|
||||
continue;
|
||||
}
|
||||
match action.as_slice() {
|
||||
|
|
Loading…
Reference in a new issue