8.18
top
← prev up next →

read-lang-fileπŸ”— i

source code: https://github.com/AlexKnauth/lang-file

procedure

( read-lang-file path-string)syntax?

path-string:path-string?
Reads a #lang file into a module syntax object.

procedure

( read-lang-module port)syntax?

Reads the contents of a #lang file from port into a module syntax object.

Examples:
> (require lang-file/read-lang-file)
> (read-lang-module (open-input-string "#lang racket/base\n(+ 1 2)"))

#<syntax:string:1:6 (module anonymous-module racket/base (#%module-begin (+ 1 2)))>

(read-lang-module (open-input-string "#lang racket/base\n(+ 1 2)")))

'(module anonymous-module racket/base (#%module-begin (+ 1 2)))

procedure

( lang-file? path-string)boolean?

path-string:path-string?
Returns true if path-string points to a valid #lang file, false otherwise.

procedure

( lang-file-lang path-string)(or/c false? string? )

path-string:path-string?
Returns a string containing the the language of a #lang file.

top
← prev up next →

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /