natalie-lang / natalie_parser

NatalieParser is a zero-dependency, from-scratch, hand-written recursive descent parser for the Ruby Programming Language.
MIT License
63 stars 8 forks source link

Support Windows linebreaks #54

Closed herwinw closed 1 year ago

herwinw commented 1 year ago

Accidentally found this issue:

echo 'p 1' > test-crlf.rb
todos test-crlf.rb 
bin/natalie test-crlf.rb 

This results in an error:

lib/natalie/parser.rb:32:in `parse': 1: syntax error, unexpected '\r' (SyntaxError)
herwinw commented 1 year ago

https://github.com/ruby/spec/pull/1010 for the fix of the spec

seven1m commented 1 year ago

Archiving this repo in favor of YARP...