goccy / p5-Compiler-Parser

Create Abstract Syntax Tree for Perl5

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`use Foo::Bar` is Namespace?

tokuhirom opened this issue · comments

use Foo::Bar returns

$VAR1 = bless( {
                 'token' => bless( {
                                     'type' => 120,
                                     'stype' => 0,
                                     'data' => 'Foo::Bar',
                                     'name' => 'Namespace',
                                     'line' => 1,
                                     'has_warnings' => 1,
                                     'kind' => 30
                                   }, 'Compiler::Lexer::Token' )
               }, 'Compiler::Parser::Node::Module' );

But it should be UsedName?

use Foo returns

$VAR1 = bless( {
                 'token' => bless( {
                                     'stype' => 0,
                                     'kind' => 21,
                                     'name' => 'UsedName',
                                     'line' => 1,
                                     'has_warnings' => 0,
                                     'type' => 88,
                                     'data' => 'Foo'
                                   }, 'Compiler::Lexer::Token' )
               }, 'Compiler::Parser::Node::Module' );

It's inconsistent.