add examples to read-language docs
This commit is contained in:
parent
cb88590dfb
commit
91ea9ab309
|
@ -135,9 +135,14 @@ function (if any) exported by the same module. The result of the
|
|||
The function produced by @racketidfont{get-info} reflects information
|
||||
about the expected syntax of the input stream. The first argument to the
|
||||
function serves as a key on such information; acceptable keys and the
|
||||
interpretation of results is up to external tools, such as DrRacket.
|
||||
interpretation of results is up to external tools, such as DrRacket (see
|
||||
@hyperlink["http://docs.racket-lang.org/tools/drracket_module-language-tools.html"]{module-language-tools}).
|
||||
If no information is available for a given key, the result should be
|
||||
the second argument.
|
||||
@mz-examples[
|
||||
((read-language (open-input-string "#lang algol60")) 'color-lexer #f)
|
||||
((read-language (open-input-string "#lang algol60")) 'something-else #f)
|
||||
]
|
||||
|
||||
The @racketidfont{get-info} function itself is applied to five
|
||||
arguments: the input port being read, the module path from which the
|
||||
|
|
Loading…
Reference in New Issue
Block a user