tolerant-php-parser
tolerant-php-parser copied to clipboard
Issue with class name alias
From @p810 on June 12, 2018 15:3
Given the following code:
<?php
namespace Foo\Bar;
use Foo\Quux\Service as QuuxService;
class Quux { /* ... */ }
I'm getting the following error:
File.php src/Foo
[php] ';' expected (5, 19)
Copied from original issue: felixfbecker/php-language-server#649
Are you able to reproduce it with the exact snippet? The column seems wrong, and I don't see that error.
Maybe the name they are using isn't actually Service, but some other reserved keyword (e.g. https://github.com/Microsoft/tolerant-php-parser/issues/205 has a similar error message)
I'll post code that can reproduce the error in a bit; the actual snippet is code that my employer technically owns so I don't know if they'd want me sharing it outside of the organization y'know.
I wrote this code just to demonstrate the error I've been getting. The column may have been counted off because I was just scanning with my eyes and wasn't typing it in my IDE, lol.