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

Make SyntaxError::message a const member function #48

Closed herwinw closed 1 year ago

herwinw commented 1 year ago

This way the exceptions can be caught as constant references if you need the message method. This makes its usages more in line with the C++ Core Guidelines (E.15: Throw by value, catch exceptions from a hierarchy by reference)