Move `export` into the grammar
Created by: huntergoldstein
Problem: export
not being in the grammar meant that the RHS was eagerly expanded.
Solution: export
now has the same semantics as let
but instead of storing the variable locally, it is written to the OS environment.
Changes introduced by this pull request:
-
export
is now in the PEG grammar and has an associatedStatement
enumeration -
export
andlet
now have the same logic except, as mentioned,export
writes to the OS environment - DRYed up the logic, including replacing a custom made
ExpanderFunctions with
get_expanders!`
Drawbacks: Nothing off the top of my head
Fixes: Related to #255 (closed)
State: Ready!