I assume it uses an error tolerant parser, same as most language servers.

Ex: https://github.com/microsoft/tolerant-php-parser/blob/main/d...