-
Notifications
You must be signed in to change notification settings - Fork 104
Introducing a new variant into js slang
martin-henz edited this page Apr 21, 2020
·
5 revisions
- Add variant type
src/types.ts
- Ensure there is some way to access the new variant (typically through
src/index.ts
'srunInContext
- Add support for syntax highlighting on frontend
src/editors/ace/modes/source.ts
- Add support for prompts on frontend (after docs are done)
- Add folder names to targets to create json for pre-declared constants / functions
scripts/updateAutocompleteDocs.js
- Add entry to builtins so frontend can reference them. Key should be in the format of 'chap_variant', where chap is the chapter number, and variant is the name of the variant type on the FRONTEND. e.g. '3_concurrent'
src/editors/ace/docTooltip/index.ts
- Add folder names to targets to create json for pre-declared constants / functions
For filenames, replace all instances of
- chap with the associated chapter number (e.g. 3)
- variant with the associated variant (e.g. concurrency)
so for first example, it would be docs/md/README_3_CONCURRENCY.md
- Add relevant READMEs to describe new variant and libraries
- Variant README
docs/md/README_chap_variant.md
- Library README
docs/md/variant.md
- Variant README
- Edit top level README to link to new variant's page
docs/md/README_TOP.md
- If your variant has a library: Add js library with documentation headers to describe pre-declared functions
docs/lib/variant.js
- Setup
jsdoc.sh
to convert md files to htmlscripts/jsdoc.sh
- Add latex file to describe specification of new variant
docs/specs/source_chap_variant.md
In src/reducers/states.ts
, add:
- chapter, variant object in
sourceLanguages
- variant to display name in
variantDisplay