mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
parse.y: parse precisely
* parse.y (parser_number_literal_suffix): return bit set of found suffixes. * parse.y (parser_set_number_literal, parser_set_integer_literal): split from parser_number_literal_suffix to set yyvlal. * parse.y (parser_yylex): parse rational number literal with decimal point precisely. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e176b8e1c1
commit
2f57e80640
3 changed files with 92 additions and 59 deletions
|
|
@ -43,6 +43,8 @@ assert_equal '0+10.0i', '1e1i'
|
|||
assert_equal 'Complex', '1e1i.class'
|
||||
assert_equal '1', '1if true'
|
||||
assert_equal '1', '1rescue nil'
|
||||
assert_equal '10000000000000000001/10000000000000000000',
|
||||
'1.0000000000000000001r'
|
||||
|
||||
assert_equal 'syntax error, unexpected tIDENTIFIER, expecting end-of-input',
|
||||
%q{begin eval('1ir', nil, '', 0); rescue SyntaxError => e; e.message[/\A:(?:\d+:)? (.*)/, 1] end}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue