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

Scheme strings not highlighted inside define #7

Open
dcecile opened this issue Jan 24, 2015 · 0 comments
Open

Scheme strings not highlighted inside define #7

dcecile opened this issue Jan 24, 2015 · 0 comments

Comments

@dcecile
Copy link

dcecile commented Jan 24, 2015

GitHub uses this TextMate bundle for Scheme highlighting, and in the following code, the string is not highlighted:

(define (x) "test")

In general, any expressions directly in the body of (define (...) ...) should get highlighted the same as in the body of (begin ...):

(begin
  ; Comment
  "string"
  'symbol
  ' symbol
  #t
  #f
  1234
  -1234.0e1234
  0x09AF
  0b010101
  #\space
  #\x0A
  #\a
  '())

(define (x)
  ; Comment
  "string"
  'symbol
  ' symbol
  #t
  #f
  1234
  -1234.0e1234
  0x09AF
  0b010101
  #\space
  #\x0A
  #\a
  '())

On the TextMate manual page for language grammars, the following snippet is suggested for parentheses nesting:

{  begin = '\('; end = '\)'; patterns = (
      { include = "$self"; }
   );
}

This Scheme syntax grammar does not currently include $self for the body of (define (...) ...), but it instead includes an incomplete list of expression types: #comment, #sexp, and #illegal (#string is missing). By changing this to simply $self, these kinds of problems can be avoided.

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

No branches or pull requests

1 participant