Faster escape checking and more precise error messages.
Context
Currently Teika does escape checking in the most naive way possible, by checking nothing escaped when returning a term, this is slow and will lead to error messages at the declaration site instead of where it actually happened.
So I'm switching to a level based approach where meta variables contain the lowest level where they're referenced, using this it should be possible to detect at occurs time when a variable would escape.
Goals
Faster escape checking and more precise error messages.
Context
Currently Teika does escape checking in the most naive way possible, by checking nothing escaped when returning a term, this is slow and will lead to error messages at the declaration site instead of where it actually happened.
So I'm switching to a level based approach where meta variables contain the lowest level where they're referenced, using this it should be possible to detect at occurs time when a variable would escape.