-- This autocomplete parser reads in all lua functions and lists their names as choices -- (at least ones that happen to resemble the expected formatting) -- notice, that in no way can these reg exps properly read in all possible lua expressions -- as such, only some functions may be found, those that are written in a "standard enough" format. -- -- ignore any lines starting with double -- (with optional preceeding whitespaces) -- ^(?<ignore>(\s)*(--).*) -- -- any line with "function ...(" is accepted, (using the function name as the string) ^(\s*function\s+(?<string>\w+)\s*\() -- -- TODO: read in require lines -- TODO: need to split the source content from dots, then format using those split words (multiple copy&pastes for different word counts needed) -- ^(\s*require\s+\"(?<source>(\w|[.])+)\"\s*$) -- (?<source_format>.*|\$\{source\}) -- -- all other lines than ones matching above are ignored -- ^(?<ignore>.*)
Rinyu