HN Top New Show Ask Jobs

settings

Theme

Hand Mode

Feed

Comment by alabhyajindal

Comment by alabhyajindal 2 days ago

0 replies

View on Hacker News

You can choose to implement it differently based on your implementation language. Data Classes and If statements work really well for this in Python, for example.

Statement Data Classes: https://github.com/alabhyajindal/plox/blob/main/stmt.py

If statements in the parser matching against them: https://github.com/alabhyajindal/plox/blob/main/parser.py#L3...