Linting With Custom DSL
I’ve completed implementing my custom language for linting documents, and I added a few more functions to it.
Sample program:
for match in sentences(doc) (
if gt(char_count(doc, match), 100) (
match
)
)
In this language, for and if are statements. This means that they can return values.
for collects non-null values and returns the list of values. if returns the value if it exists, and null if the value is not returned in it or the condition is false.
My plint CLI shows the errors on the position of the returned matches.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.