JSAbrahams / mamba

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

Remove Print Token and Node #305

Closed JSAbrahams closed 2 years ago

JSAbrahams commented 2 years ago

Summary

No need for this application logic. Leftover remnant from a very early version of the langauge where we wanted to be able to use postfix notation for the print funciton. However, singling out the print function felt weird. Python v3 also removed this notation, for many reasions (I could link the blog post here but it's a quick google search really).

In future, we should be able to actually add the print function to the context. However, we need to be able to specify that the input should implement __str__.

The behaviour is now changed, however, such that print postfix notation is now no longer parsed.

codecov[bot] commented 2 years ago

Codecov Report

Merging #305 (2b09962) into develop (ce8b003) will decrease coverage by 0.09%. The diff coverage is 92.54%.

@@             Coverage Diff             @@
##           develop     #305      +/-   ##
===========================================
- Coverage    86.41%   86.31%   -0.10%     
===========================================
  Files          100      100              
  Lines         9986    10036      +50     
===========================================
+ Hits          8629     8663      +34     
- Misses        1357     1373      +16     
Impacted Files Coverage Ξ”
src/check/constrain/generate/mod.rs 85.52% <ΓΈ> (-0.19%) :arrow_down:
src/check/constrain/generate/statement.rs 81.25% <ΓΈ> (-4.47%) :arrow_down:
src/check/context/arg/generic.rs 72.83% <ΓΈ> (-0.34%) :arrow_down:
src/check/context/function/generic.rs 88.70% <ΓΈ> (-0.18%) :arrow_down:
src/check/context/function/mod.rs 58.42% <ΓΈ> (ΓΈ)
src/check/name/truename/mod.rs 86.56% <0.00%> (ΓΈ)
src/generate/convert/mod.rs 94.82% <ΓΈ> (-0.44%) :arrow_down:
src/parse/call.rs 94.11% <ΓΈ> (+0.15%) :arrow_up:
src/parse/lex/token.rs 91.83% <ΓΈ> (-0.06%) :arrow_down:
src/parse/lex/tokenize.rs 97.44% <ΓΈ> (-0.01%) :arrow_down:
... and 27 more

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

JSAbrahams commented 2 years ago

Drop in coverage is due to simplification of application logic, so here it's a good thing.