10 Cooperating with Background Check Syntax

▼ |  | Dr Racket Plugins

1 | Dr Racket support for #lang-based Languages
2 | Implementing Dr Racket Plugins
3 | Adding Languages to Dr Racket
4 | Creating New Kinds of Dr Racket Frames
5 | Extending the Existing Dr Racket Classes
6 | Expanding the User’s Program Text and Breaking
7 | Editor Modes
8 | Plugin Capabilities
9 | Check Syntax
10 | Cooperating with Background Check Syntax
11 | Teaching Languages
12 | Signatures
13 | drracket: get/ extend
14 | drracket: unit
15 | drracket: language
16 | drracket: language-configuration
17 | drracket: debug
18 | drracket: rep
19 | drracket: frame
20 | drracket: help-desk
21 | drracket: eval
22 | drracket: modes
23 | drracket: module-language-tools
24 | drracket: module-language
25 | drracket: tracing
26 | Backwards Compatibility
| Index

top ← prev up next →

### 10`` Cooperating with Background Check Syntax

DrRacket’s continuous, background check syntax runs each time an edit to the definitions text happens. In some cases, that expansion process fails, but there is still a well-formed syntax object that check syntax can use to display information to the user. In order to communicate that syntax object to check syntax, send a log message with the name 'online-check-syntax, e.g.

> (define-logger online-check-syntax)
> (log-message online-check-syntax-logger
> 'info
> "ignored message"
> list-of-syntax-objects)

The fourth argument to log-message should be a list of syntax objects; these are processed as if they were the result of expansion.

Note: the identifiers in these objects should be syntax-original? or else they will be ignored by check syntax.

top ← prev up next →