Editor - source-academy/js-slang GitHub Wiki
The editor of the Source Academy is based on Ace. We have built Ace modes for each Source version, which feature:
Ace Mode
Syntax highlighting implemented in src/editors/ace
, designed by zijian
- keywords: keywords of the current Source version
- forbidden words: JavaScript keywords that are not keywords of the current Source version
- pre-declared functions
- constants
- comments
- declarations (function, let, const)
- module import directives
Scope-related tools
- scope-driven auto-complete (designed by Shaowei and Cara), see Autocompletion-support-(name-extraction)
The following tools are implemented in src/scope-refactoring.ts
- linking to documentation of predeclared names, respecting the scope of names
- navigation from names to their declaration, respecting the scope of names
- refactoring of names across their scope