goccy / p5-Compiler-Lexer

Lexical Analyzer for Perl5
Other
46 stars 17 forks source link

`x=` still hasn't been recognized #42

Closed moznion closed 9 years ago

moznion commented 10 years ago

at version 0.19

Code to reproduce is following;

Compiler::Lexer->new->tokenize('$foo x= 3')

Result;

  bless( {
           'data' => '$foo',
           'has_warnings' => 0,
           'kind' => 24,
           'line' => 1,
           'name' => 'GlobalVar',
           'stype' => 0,
           'type' => 193
         }, 'Compiler::Lexer::Token' ),
  bless( {
           'data' => 'x',
           'has_warnings' => 0,
           'kind' => 1,
           'line' => 1,
           'name' => 'StringMul',
           'stype' => 0,
           'type' => 19
         }, 'Compiler::Lexer::Token' ),
  bless( {
           'data' => '=',
           'has_warnings' => 0,
           'kind' => 2,
           'line' => 1,
           'name' => 'Assign',
           'stype' => 0,
           'type' => 65
         }, 'Compiler::Lexer::Token' ),
  bless( {
           'data' => '3',
           'has_warnings' => 0,
           'kind' => 24,
           'line' => 1,
           'name' => 'Int',
           'stype' => 0,
           'type' => 170
         }, 'Compiler::Lexer::Token' )