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

Parse regexps with leading space preceeded by keywords #12

Closed timcraft closed 2 years ago

timcraft commented 2 years ago

This fixes the lexer to correctly return :dregx, :string, :dregxend tokens instead of :/, :name, :/ for regexps with leading spaces preceeded by keywords, and adds support for parsing :match conditions for if, unless, while, and until keywords followed by regexps.