示例#1
0
        public static ExternSignature Composite(string sign, ushort index)
        {
            var s = new ExternSignature
            {
                Signature = sign, MethodIndex = index, Arguments = new List <ExternType>()
            };

            foreach (Match match in new Regex(@"(?<type>i32|i64|i16|i8|i2|u32|u64|u16|u8|u2|f64)+?\,?\s?").Matches(sign))
            {
                s.Arguments.Add(DefinedTypes.First(x => x.GetType().Name == $"{match.Groups["type"]}_Type"));
            }
            return(s);
        }