| @@ 175-190 (lines=16) @@ | ||
| 172 | * @internal |
|
| 173 | * @throws SyntaxErrorException |
|
| 174 | */ |
|
| 175 | private function extractInheritanceName() |
|
| 176 | { |
|
| 177 | $this->stream->ignoreHorizontalSpace(); |
|
| 178 | start: |
|
| 179 | $char = $this->stream->currentAscii(); |
|
| 180 | $this->stream->next(); |
|
| 181 | ||
| 182 | if ($char->isLetter() || $char->isDigit() || $char->is(AsciiChar::UNDERSCORE())) { |
|
| 183 | $this->currentSection["inheritance"] .= (string) $char; |
|
| 184 | goto start; |
|
| 185 | } elseif ($char->isWhiteSpace()) { |
|
| 186 | return; |
|
| 187 | } else { |
|
| 188 | throw new SyntaxErrorException($this->stream); |
|
| 189 | } |
|
| 190 | } |
|
| 191 | ||
| 192 | /** |
|
| 193 | * @internal |
|
| @@ 231-247 (lines=17) @@ | ||
| 228 | * @internal |
|
| 229 | * @throws SyntaxErrorException |
|
| 230 | */ |
|
| 231 | private function extractOptionName() |
|
| 232 | { |
|
| 233 | $this->stream->ignoreWhitespace(); |
|
| 234 | ||
| 235 | start: |
|
| 236 | $char = $this->stream->currentAscii(); |
|
| 237 | $this->stream->next(); |
|
| 238 | ||
| 239 | if ($char->isLetter() || $char->isDigit() || $char->is(AsciiChar::UNDERSCORE())) { |
|
| 240 | $this->currentOption["name"] .= (string) $char; |
|
| 241 | goto start; |
|
| 242 | } elseif ($char->isHorizontalSpace()) { |
|
| 243 | return; |
|
| 244 | } else { |
|
| 245 | throw new SyntaxErrorException($this->stream); |
|
| 246 | } |
|
| 247 | } |
|
| 248 | ||
| 249 | /** |
|
| 250 | * @internal |
|