stephenfmann / cooking-with-python

Chef esolang interpreter
The Unlicense
2 stars 2 forks source link

Refactor `parse_instruction()` to put everything in methods (and consistent mixing bowl references) #13

Open stephenfmann opened 1 year ago

stephenfmann commented 1 year ago

Currently it's only working if the mixing bowl is explicitly specified (because we're trying to subset a regex group which may not exist).

Once each step is in its own individual method, re-enable the check for whether the group exists. Use int(mixingbowl[:-2]) if it does and DEFAULT_BOWL if it doesn't. Ditto with baking dishes.