Add docstrings and follow up on some conventions #9
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
A few things to notice:
parseclj--leaf-tokens
andparseclj--closing-tokens
toparseclj-lex.el
, since tokens are lexical structures.parseclj--string
,parseclj--character
andparseclj--leaf-token-value
toparseedn.el
. Reasoning behind it is that these function produce emacs lisp values, which goes with everything else inparseedn
.format-message
messages should start with capital letters, and I didn't thinkparseclj:
should be capitalized.) After reading through the Signaling Errors documentation, I started thinking that maybe we should take a different approach with the way we are signaling. Maybe instead of providing a single string message, we provide a tuple of position (int) and message (str). This way is more similar to other errors likewrong-type-argument
orwrong-number-of-arguments
. Also, documentation says that:And
parseclj-parse-error
's message is already"parseclj: Syntax Error"
. But I'm not 100% sure if this covers everything we want from an error message.parseclj-unparse
. These functions are only for unparsing our AST data structure definition anyway.