@error said in F# Lisp Fun:
@Magus said in F# Lisp Fun:
| "equals" -> Equals
| "Equals" -> Equals
| "EQUALS" -> Equals
| "if" -> If
| "If" -> If
| "IF" -> If
| "defun" -> DefineFunction
| "Defun" -> DefineFunction
| "DEFUN" -> DefineFunction
Is this really the right way to handle case insensitivity? Ew.
Oh it's definitely the wrong way, but I didn't have many cases to consider so I didn't bother.
@Gąska said in F# Lisp Fun:
Generally, since parsing is the most boring and not very insightful part of writing an interpreter, I recommend using FParsec library. It lets you easily chain recursive-descent parsers together, and provides several common parsers out of the box, including number parsers and case-insensitive constant string parsers.
Yeah, the whole point was building it.