Fixed not parsing function names containing numbers

This commit is contained in:
Garry Newman 2019-04-30 21:58:19 +01:00
parent a80ee82e53
commit b2cfbe23c5

View File

@ -35,7 +35,7 @@ public void ProcessClass( string fulldef, string classname, string inner )
var lines = inner.Split( new[] { '\n', '\r' }, StringSplitOptions.RemoveEmptyEntries );
var func = new Regex( @"virtual (.+[\t |\*])([a-zA-Z]+?)\((.+?)?\) = 0 ?;" );
var func = new Regex( @"virtual (.+[\t |\*])([a-z0-9A-Z]+?)\((.+?)?\) = 0 ?;$" );
var c = new Class();
c.Name = classname;
@ -54,7 +54,11 @@ public void ProcessClass( string fulldef, string classname, string inner )
foreach ( var linestr in lines )
{
var line = linestr;
var line = linestr.Trim();
var commentPos = line.IndexOf( "//" );
if ( commentPos > 0 )
line = line.Substring( 0, commentPos-1 ).Trim();
if ( line.Trim().Length < 4 ) continue;
if ( line.Trim().StartsWith( "public:" ) ) continue;