Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add optional brackets to Scheme syntax #2811

Closed
jcubic opened this issue Mar 17, 2021 · 2 comments · Fixed by #2813
Closed

Add optional brackets to Scheme syntax #2811

jcubic opened this issue Mar 17, 2021 · 2 comments · Fixed by #2813

Comments

@jcubic
Copy link
Contributor

jcubic commented Mar 17, 2021

Information

  • Language: Scheme
  • Plugins: none

Description
Some books about Scheme show usage of brackets together with parenthesis. Example is The Scheme Programming Language by Kent Dybvig which is kind of classic. The R7RS Scheme spec don't specify brackets but some Scheme implementation use them optionally, not only Racket, that was once know as PTL Scheme and I think brackets were already there.

I think it would be good idea to add brackets the same as racket have (the code can be reused or copy/pasted), so the highlighting will work with wider range of code examples.

Code snippet

Test page

The code being highlighted incorrectly.
(let ([x 10]
      [y 20])
  (+ x y))
@RunDevelopment
Copy link
Member

So brackets and parenthesis can be used interchangeably in some Scheme implementations?

@jcubic
Copy link
Contributor Author

jcubic commented Mar 17, 2021

Yes, that's right. This is how for instance it work in BiwaScheme even that it's not required by the Scheme standard, the same happen with lisp macros (define-macro) they are not part of the standard but most scheme implementation have them.

It's good to have in generic scheme syntax highlighter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants