Hi.
In my toy programming language you can import additional dependencies as follows (assume main.jbb):
import "absolute/path/to/my_functions.jbb"
// some code
print "hello world from main"
my_functions.jbb contains:
func add_numbers(a, b) {
a + b
}
func helloworld(a, b) {
print "hello world from my_functions.jbb"
}
Suppose main.jbb is the only file open in Sublime, no projects or anything, just the file by itself. I want to make an extension that would parse all import statements in the currently opened file, parse the files that are being imported, extract any symbols they might define and add those symbols to the currently opened file’s auto-complete list. In this case, add_numbers and helloworld would be added to main.jbb's auto-complete.
How do I go about creating such an extension? I need a high level overview (what APIs, functions, modules, etc).