A Profile is an interface that tells whether a Source meets certain criteria. For example, a ScriptProfile would indicate whether a Source can be parsed as a script.
Use-case:
LuaFormat has a lot of places where it checks if the Source is a script instance or a string-like value. Having a profile will consolidate this repetitive code.
Several filters will operate only on script-like data, so this same profile could be used there as well.
A Profile is an interface that tells whether a Source meets certain criteria. For example, a ScriptProfile would indicate whether a Source can be parsed as a script.
Use-case: LuaFormat has a lot of places where it checks if the Source is a script instance or a string-like value. Having a profile will consolidate this repetitive code. Several filters will operate only on script-like data, so this same profile could be used there as well.