BiwaScheme Reading Guide
This is a brief guide for reading the source code of BiwaScheme.
Directory organization
- bin/- biwas : Entry point of the biwascommand (installed bynpm install biwascheme -g)
 
- biwas : Entry point of the 
- release/- biwascheme.js : Generated by makecommand (using rollup)
 
- biwascheme.js : Generated by 
- src/- deps/ : Contains dependent JavaScript libraries (such as underscore.js)
- library/ : Library functions
- platforms/ : Code only runs on a certain platform (browser or Node)
- system/ : Main source code of BiwaScheme
- version.js
- version.js.in
- main.js : The object BiwaSchemeis created here
- main-browser.js : Entry point for browsers
- main-node.js : Entry point for Node
- header.js : Provides some utilities
 
- test/- unit.js : Unit test
- spec.html : Runs unit test
 
Some of the most important files are:
- src/library/r6rs_lib.js - Contains most of the library functions
 
- src/system/parser.js- BiwaScheme.Parserparses Scheme program (given as JavaScript String)
 
- src/system/compiler.js- BiwaScheme.Compilercompiles parsed program into BiwaScheme intermediate language
 
- src/system/interpreter.js- BiwaScheme.Interpreterexecutes the intermediate language
 
The intermediate language
See internal/opecodes.
