Anaminus / rbxmk

A tool for processing Roblox files.
MIT License
109 stars 11 forks source link

Add source profiles #4

Closed Anaminus closed 7 years ago

Anaminus commented 7 years ago

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.

Anaminus commented 7 years ago

Obsolete.