@@ -15,8 +15,7 @@ |
||
| 15 | 15 | if ($element->value() == 'unquote') { |
| 16 | 16 | $newValue = $this->eval->getReturn($list->rest()[0]); |
| 17 | 17 | $list = $newValue; |
| 18 | - } |
|
| 19 | - else if ($element instanceof ListType && !empty($element->value())) { |
|
| 18 | + } else if ($element instanceof ListType && !empty($element->value())) { |
|
| 20 | 19 | if ($element->first()->value() == 'unquote') { |
| 21 | 20 | $newValue = $this->eval->getReturn($element->rest()[0]); |
| 22 | 21 | $list->set($newValue, $index); |
@@ -49,11 +49,17 @@ |
||
| 49 | 49 | return fgets(STDIN); |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | + /** |
|
| 53 | + * @param string $input |
|
| 54 | + */ |
|
| 52 | 55 | private function isExitCommand($input) |
| 53 | 56 | { |
| 54 | 57 | return $input == "exit\n"; |
| 55 | 58 | } |
| 56 | 59 | |
| 60 | + /** |
|
| 61 | + * @param string $input |
|
| 62 | + */ |
|
| 57 | 63 | private function shouldBeProcessed($input) |
| 58 | 64 | { |
| 59 | 65 | return !empty($input) && !preg_match('/^;/', $input); |