8 Languages and Modules
8.1 #lang Language Reader
#lang rhombus/reader | package: rhombus-lib |
The rhombus/reader language is useful for defining a reader submodule as described in #lang Language Protocol.
|
The resulting module exports #{read}, #{read-syntax}, and #{get-info} consistent with Racket’s #lang protocol. A module using the language with this reader is parsed as shrubbery notation and then uses module_path as the ~lang language (see Module ~lang Protocol).
8.2 Bridge for module ~lang
#lang rhombus/lang_bridge | package: rhombus-lib |
The rhombus/lang_bridge language is useful for creating a ".rhm" module that acts the same as a ".rkt" module after ~lang. See #lang Language Protocol for more information.
The body of a rhombus/lang_bridge must contain a single ~lang clause using the same syntax as in rhombus/reader.
8.3 Run-Time Configuration
import: rhombus/runtime_config | package: rhombus-lib |
The rhombus/runtime_config library exports nothing. Instantiating the module adjusts configuration parameters to make the system behave in Rhombus terms, such as printing values in Rhombus syntax. See Run-Time and Expand-Time Configuration for information about how these functions are useful to define a configure_runtime submodule.
8.4 Expand-Time Configuration
import: rhombus/expand_config | package: rhombus-lib |
The rhombus/expand_config library is for configuring an expand-time time to behave in Rhombus terms, which as when a syntax error is reported.
function | |
| |
| |
function | |
|