Okay, I'm writing a language compiler in C# that converts my language into MSIL and then calls the MSIL compiler. But that's beside the point. I created some code to show you want I'm going to be working with:
module myApplication
[EntryPoint]
function void start
write("Hello World!\n")
wait(5) // wait 5 seconds
ret()
endfunction
endModule
Okay, I'm trying to scan through that code and find where "[EntryPoint]" is and then find all the "function void start" after it. So I can find the function type ("void") and name ("start"). The [EntryPoint] tag will always be above the function that will be defined as the applications entry point. And I will have to make it trim the whitespace and stuff. This is also scanning through using '\n' so the function MUST be under the tag.
And I also have another question, how would I make it separate the code inside the function from "function void start" and "endfunction"?