You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need to cleanup range handling in Aether. There is currently a lot of range calculating code, all with different assumptions and consumers.
Complications
We have three variations of ranges
Original user code
Wrapped user code, no indentation
Wrapped user code, with indentation (e.g. Python)
We have two types of range objects [10, 40] [ { ofs : 6, row : 1, col : 0 }, { ofs : 19, row : 1, col : 13 } ]
We need to return errors to Aether clients with original ranges, because the clients don't know what crazy things we've done to their code. Internal to Aether we need to have nodes with range info accurate for the current stage of processing (e.g. post-normalization), so we can accurately process and modify it.
We have per-reporter processing and per-language processing.
Suggestions
Consolidate all our range handling into one place.
Clearly document the input, output, and why when we're translating one range to another. This stuff is not fun to modify after it's been marinating for awhile.
Add Python-compatible indentation for all languages so Python doesn't wreck us with one-offs (nice suggestion @nwinter).
The text was updated successfully, but these errors were encountered:
We need to cleanup range handling in Aether. There is currently a lot of range calculating code, all with different assumptions and consumers.
Complications
We have three variations of ranges
We have two types of range objects
[10, 40]
[ { ofs : 6, row : 1, col : 0 }, { ofs : 19, row : 1, col : 13 } ]
We need to return errors to Aether clients with original ranges, because the clients don't know what crazy things we've done to their code. Internal to Aether we need to have nodes with range info accurate for the current stage of processing (e.g. post-normalization), so we can accurately process and modify it.
Errors thrown from some transforms are not passed through a per-language processor so we hack it in on the fly:
https://github.com/codecombat/aether/blob/master/src/transforms.coffee#L300
https://github.com/codecombat/aether/blob/master/src/problems.coffee#L27
We have per-reporter processing and per-language processing.
Suggestions
Consolidate all our range handling into one place.
Clearly document the input, output, and why when we're translating one range to another. This stuff is not fun to modify after it's been marinating for awhile.
Add Python-compatible indentation for all languages so Python doesn't wreck us with one-offs (nice suggestion @nwinter).
The text was updated successfully, but these errors were encountered: