microsoft / microsoft/tolerant-php-parser

Issue with class name alias

Open
#249 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
894
Forks
85
Avg merge
2d 13h
Merged PRs (30d)
3

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Run the supplied PHP snippet through the parser, using the reported File.php and src/Foo context to reproduce the ';' expected error at (5, 19). Inspect how the parser handles the aliased use declaration alongside the same-named class, then confirm that the snippet parses without the reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.