ricardoboss / STEP

The STEP programming language
http://step-lang.dev/
MIT License
5 stars 1 forks source link

Major rewrite for parser and interpreter #109

Closed ricardoboss closed 10 months ago

ricardoboss commented 10 months ago

Inspired by and will fix #104.

This change is a complete revamp of the parser and how the parsed statements (now called nodes) are interpreted.

Additionally, this adds some features that were too hard to implement previously.

The parser now takes the tokens and generates an abstract syntax tree, consisting of different nodes. The nodes are interpreted using the visitor pattern by the Interpreter class.

New features:

The CLI has a new parse command to show the parsed abstract syntax tree (AST).

github-actions[bot] commented 10 months ago

Report

Code Coverage

Static Analysis:

ricardoboss commented 10 months ago

Example of marked token in case of an error: image

ricardoboss commented 10 months ago

This is the current output of the parse command when given the assignment.step example file: image