JSAbrahams / mamba

🐍 The Mamba programming language, because we care about safety
MIT License
85 stars 3 forks source link

Add newline after dedent in lexer #236

Closed JSAbrahams closed 2 years ago

JSAbrahams commented 2 years ago

Relevant issues

Resolves #219

Summary

Lexer now always adds a newline after a dedent so a block is always followed by a dedent.

Update if else parsing logic to deal with newline after dedent. Weirdly it seems like this was the only location where the parser had to be updated after this pretty big change.

Added Tests

codecov[bot] commented 2 years ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (develop@da1685c). Click here to learn what that means. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             develop     #236   +/-   ##
==========================================
  Coverage           ?   79.90%           
==========================================
  Files              ?       99           
  Lines              ?     8732           
  Branches           ?        0           
==========================================
  Hits               ?     6977           
  Misses             ?     1755           
  Partials           ?        0           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update da1685c...f744812. Read the comment docs.