You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Racket has here strings which don't use double quotes. And actually the delimiter can be customized, but any here string as a whole should be recognizable with a simple regex. Parinfer should not be messing up brackets or indents inside of string literals, but it doesn't appear to have a way to recognize this kind of thing.
Is there some configuration option I missed for this? Like a custom regex to find string literals? Lisp is a big family of languages, and other Lisps might need this kind of feature too.
The text was updated successfully, but these errors were encountered:
Common Lisp also does the #| |# block comments, by the way. And unlike here strings (or C /* */ comments) these can nest in Common Lisp. I think several other Lisps use these too. One exception is PicoLisp, which I think uses #{ }# instead. I don't know if they nest in PicoLisp though.
A normal finite state machine regex engine can't match nested delimiters properly. We'd need an enhanced regex engine with the equivalent power of a pushdown automaton, like (?R) from PCRE. Javascript regexes can't do this, last I checked, and neither do the regex engines from Vimscript, Emacs Lisp, or Python. So asking for a callback matching function would work better than my earlier idea of asking for a regex string in the custom configuration.
And Hy will probably be implementing a Lua-like string syntax soon. hylang/hy#1379. Hy also ignores the shebang on the first line, but treats it as a tag macro elsewhere.
Racket has here strings which don't use double quotes. And actually the delimiter can be customized, but any here string as a whole should be recognizable with a simple regex. Parinfer should not be messing up brackets or indents inside of string literals, but it doesn't appear to have a way to recognize this kind of thing.
Is there some configuration option I missed for this? Like a custom regex to find string literals? Lisp is a big family of languages, and other Lisps might need this kind of feature too.
The text was updated successfully, but these errors were encountered: