At VBA side the code is clean and highly manageable.
Sub RunModule()
Dim eng As New ASF
' Set working directory
eng.InjectVariable "wd", ThisWorkbook.Path
' Execute module file
Dim result As Variant
result = eng.Execute(ThisWorkbook.Path & "\main.vas")
Debug.Print result
End Sub
ASF isn't just a framework, is a modern language that we can run inside VBA.
Honestly, ASF is literally sandboxed. Objects cannot be injected in the runtime. Also, VBA Expressions is intentionally limited to receive and return VBA strings. So, the system is safe for execute code from (almost) anyone.
You can inspect the AST in order to debug your code. For syntax highlighting, use tools like Notepad++ (ASF shares most of the syntax with Javascript). Each piece of code is commented, no obscure machine code.
Sub RunModule() Dim eng As New ASF
End SubASF isn't just a framework, is a modern language that we can run inside VBA.