racket / racket/drracket

Documentation of list of recognized syntax-coloring token types/styles is incomplete

Open
#380 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Racket
Stars
516
Forks
103
PR merge metrics
No merged PRs in 30d

Description

https://github.com/racket/drracket/blob/7ae87809bc2e7d5849f27dd3689f837cd4c7ade9/drracket/scribblings/tools/lang-tools.scrbl#L62-L72

(map first (racket:get-color-prefs-table)) shows 'text and 'hash-colon-keyword are missing, which if included match the ten that have entries in the “Color / Racket” preferences tab. That table is hard-coded (and the preferences tab derived from it) : https://github.com/racket/gui/blob/0fbbf759d3f244458378a639f653971fdff76668/gui-lib/framework/private/racket.rkt#L294

An 'sexp-comment token (a parsed “#;” in the racket lexer) is also styled, as a 'comment : https://github.com/racket/gui/blob/0fbbf759d3f244458378a639f653971fdff76668/gui-lib/framework/private/racket.rkt#L335-L349

A 'white-space token is styled as 'parenthesis, which presumably has no visible effect if the lexer only produces that for invisible lexemes with invisible glyphs. Not changing styles at the boundary is to reduce memory usage : https://github.com/racket/gui/commit/2da0f724923b300ab98a508018604f7d71863d62

Some 'symbol tokens get translated to 'keyword tokens based on the “Editing / Indenting” prefs, which affects their coloring : https://github.com/racket/gui/blob/0fbbf759d3f244458378a639f653971fdff76668/gui-lib/framework/private/racket.rkt#L1376-L1431

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open drracket/scribblings/tools/lang-tools.scrbl around lines 62-72, then compare its documented token types with the referenced racket:get-color-prefs-table and styling code in racket.rkt. Document the missing and specially handled token types described in the issue, and verify that the list matches the recognized and styled cases.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.