-
Notifications
You must be signed in to change notification settings - Fork 29
System Implementation
The following group of pages will document about the implementation of the current Source Modules system.
Table of Contents
The js-slang
library contains the open-source implementations of the programming language Source. Source is a series of small subsets of JavaScript, designed for teaching university-level programming courses for computer science majors, following Structure and Interpretation of Computer Programs, JavaScript Adaptation (https://source-academy.github.io/sicp/).
The js-slang
library exposes one main function that Source Modules system developers should be concerned with, the runInContext
method.
runInContext(code: string, context: Context, options: Partial<IOptions> = {}): Promise<Result> { ... }
Applying this funciton on a Source program string will trigger the evaluation of the provided Source program string. The object returned from runInContext
is of Result
type that contains the value
which is the result of the last statement in the evaluation of the Source program string. Below is a brief overview of the evaluation process of the runInContext
function exposed by the Source implementation library.
The two main methods of evaluating a Source program is through the js-slang
interpreter and transpiler with the transpiler being the default mode. Read more about how the Source Modules system is integrated into the two modes in the js-slang
page in this section.
Read more about the js-slang
Source implementation library here.
The cadet-frontend
project contains information regarding the frontend of the Source Academy (https://source-academy.github.io/) immersive online experiential environment for learning programming, developed in the School of Computing at the National University of Singapore. This repository houses the sources for the frontend of the Source Academy, written in ReactJS with Redux.
Read more about cadet-frontend
the frontend of Source Academy here.
- Home
- Overview
- System Implementation
-
Development Guide
- Getting Started
- Repository Structure
-
Creating a New Module
- Creating a Bundle
- Creating a Tab
- Writing Documentation
- Developer Documentation (TODO)
- Build System
- Source Modules
- FAQs
Try out Source Academy here.
Check out the Source Modules generated API documentation here.