I agree with Mofi that the function list generally should contain, well function definitions.
But I work with NATURAL source code and beside functions (SUBROUTINES) I want some other constructs of the language in my function list nested and indented.
So I right click in the function list and remove the checkmark from the "sort list" option.
Then I make sure that the other language constructs "capture" whitespace in front of the command. Example:
/Function String = "^\d{4} DEFINE SUBROUTINE[ ]+([\w_\-]+)"
...
/Function String 3 = "^\d{4}[ ]*?([ ]CALLNAT[ ]+[']?[\w\-]+[']?)"
...
Notice that I capture a blank in front of CALLNAT:
([ ]CALLNAT
which indents the CALLNAT (function call) slightly from the functions in the function list.
It looks something like this:
- Code: Select all
A-STACK-FUNKTIONSNAVNE
STACK COMMAND 'FOOO-P82'
E-RETTELSE-TIL-TEKST
CALLNAT 'NFOOBAR0'
F-KONTROLLER
(more than one whitespace is added to better illustrate my point).
A 'dirty' workaround but it's ok for my use.
So if you are able to write a pattern that will match your function calls in your C code you should be able to do the same when you integrate it into the existing C wordfile definition (search for "Syntax Highlighting" in the UE help for more info.).