Scheme Lang (schemelang)
NodeJS Scheme language interpreter
basic usage
Simply create a new Scheme environnement and use its interpreter method
// --------- const SchemeLang = var my_scheme_env = // --------- const scheme = my_scheme_envinterpret // --------- console// -> 5 console// -> 8
accessible methods
The schemelang module also gives you access to the parse and handle methods.
- The
parse
method transforms string commands into JSON arraysconst parse = new parselet command_array =console// -> ["define", "a", 5] - The
handle
method uses the command array to execute scheme commandsconst handle = new handlelet result =console// -> 4 - The
interpret
method uses the two above methods to parse and handle string scheme commandsconst interpret = new interpretlet result =console// -> 8