|
@@ -79,7 +79,7 @@ discard block |
|
|
block discarded – undo |
|
79
|
79
|
public function createTokenHandler(): array |
|
80
|
80
|
{ |
|
81
|
81
|
return [ |
|
82
|
|
- self::TOKEN_ACTION => function (string $currentLine, int $lineNumber, Script $script): string { |
|
|
82
|
+ self::TOKEN_ACTION => function(string $currentLine, int $lineNumber, Script $script): string { |
|
83
|
83
|
$scriptName = $this->removeFromStart(self::TOKEN_ACTION, $currentLine); |
|
84
|
84
|
$actionScript = $this->scriptFinder->findScriptByName($scriptName); |
|
85
|
85
|
|
|
@@ -92,7 +92,7 @@ discard block |
|
|
block discarded – undo |
|
92
|
92
|
return ''; |
|
93
|
93
|
}, |
|
94
|
94
|
|
|
95
|
|
- self::TOKEN_INCLUDE => function (string $currentLine, int $lineNumber, Script $script): string { |
|
|
95
|
+ self::TOKEN_INCLUDE => function(string $currentLine, int $lineNumber, Script $script): string { |
|
96
|
96
|
$path = $this->findInclude($script, $this->removeFromStart(self::TOKEN_INCLUDE, $currentLine)); |
|
97
|
97
|
$includeScript = new Script(pathinfo($path, PATHINFO_DIRNAME), pathinfo($path, PATHINFO_BASENAME)); |
|
98
|
98
|
|
|
@@ -102,7 +102,7 @@ discard block |
|
|
block discarded – undo |
|
102
|
102
|
return ''; |
|
103
|
103
|
}, |
|
104
|
104
|
|
|
105
|
|
- self::TOKEN_TEMPLATE => function (string $currentLine, int $lineNumber, Script $script): string { |
|
|
105
|
+ self::TOKEN_TEMPLATE => function(string $currentLine, int $lineNumber, Script $script): string { |
|
106
|
106
|
$definition = $this->removeFromStart(self::TOKEN_TEMPLATE, $currentLine); |
|
107
|
107
|
list($rawSource, $rawDestination) = explode(':', $definition); |
|
108
|
108
|
|
|
@@ -115,7 +115,7 @@ discard block |
|
|
block discarded – undo |
|
115
|
115
|
return ''; |
|
116
|
116
|
}, |
|
117
|
117
|
|
|
118
|
|
- self::TOKEN_WAIT => function (string $currentLine, int $lineNumber): string { |
|
|
118
|
+ self::TOKEN_WAIT => function(string $currentLine, int $lineNumber): string { |
|
119
|
119
|
$this->commandBuilder |
|
120
|
120
|
->addWaitCommand($lineNumber); |
|
121
|
121
|
|
|
@@ -123,25 +123,25 @@ discard block |
|
|
block discarded – undo |
|
123
|
123
|
return ''; |
|
124
|
124
|
}, |
|
125
|
125
|
|
|
126
|
|
- self::TOKEN_MODIFIER_IGNORE_ERROR => function (string $currentLine): string { |
|
|
126
|
+ self::TOKEN_MODIFIER_IGNORE_ERROR => function(string $currentLine): string { |
|
127
|
127
|
$this->commandBuilder->setIgnoreError(); |
|
128
|
128
|
|
|
129
|
129
|
return $this->removeFromStart(self::TOKEN_MODIFIER_IGNORE_ERROR, $currentLine); |
|
130
|
130
|
}, |
|
131
|
131
|
|
|
132
|
|
- self::TOKEN_MODIFIER_TTY => function (string $currentLine): string { |
|
|
132
|
+ self::TOKEN_MODIFIER_TTY => function(string $currentLine): string { |
|
133
|
133
|
$this->commandBuilder->setTty(); |
|
134
|
134
|
|
|
135
|
135
|
return $this->removeFromStart(self::TOKEN_MODIFIER_TTY, $currentLine); |
|
136
|
136
|
}, |
|
137
|
137
|
|
|
138
|
|
- self::TOKEN_MODIFIER_DEFERRED => function (string $currentLine): string { |
|
|
138
|
+ self::TOKEN_MODIFIER_DEFERRED => function(string $currentLine): string { |
|
139
|
139
|
$this->commandBuilder->setDeferredExecution(); |
|
140
|
140
|
|
|
141
|
141
|
return $this->removeFromStart(self::TOKEN_MODIFIER_DEFERRED, $currentLine); |
|
142
|
142
|
}, |
|
143
|
143
|
|
|
144
|
|
- self::TOKEN_WILDCARD => function (string $currentLine, int $lineNumber): string { |
|
|
144
|
+ self::TOKEN_WILDCARD => function(string $currentLine, int $lineNumber): string { |
|
145
|
145
|
$this->commandBuilder |
|
146
|
146
|
->addProcessCommand($currentLine, $lineNumber); |
|
147
|
147
|
|
|
@@ -234,7 +234,7 @@ discard block |
|
|
block discarded – undo |
|
234
|
234
|
|
|
235
|
235
|
if ($this->startsWith(self::CONCATENATE_PREFIX, $line)) { |
|
236
|
236
|
$lastValue = array_pop($lines); |
|
237
|
|
- $lines[] = $lastValue . ' ' . trim($line); |
|
|
237
|
+ $lines[] = $lastValue . ' ' . trim($line); |
|
238
|
238
|
|
|
239
|
239
|
continue; |
|
240
|
240
|
} |