Skip to content

Adding a Feature

Jonathan Beaulieu edited this page Oct 22, 2017 · 2 revisions

Adding a feature

Check list

Add Feature

First, add a new feature to the Features class found here.

Tokenizer

  • Add any new token types to the TokenTypes class.
    • Add token type const
    • Add token type to from_str method
  • Add any new keywords to the get_keywords method depending on the features.
  • Add tests for the feature in tokenizer/test_features.py

AST

  • Add any AST classes for feature.
  • Write test for str function on classes.

Parser

  • Edit parser to handle new feature.
  • Write tests.

Interpreter

Tests for all added code.

Clone this wiki locally