mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-25 05:05:28 +00:00
Fixed parsing of pointer types in 'cl.h' (parameter types and pointers are separated by a space, i.e. 'char **').
This commit is contained in:
parent
78799042b1
commit
fa1ddbf06e
|
@ -193,7 +193,13 @@ namespace CHeaderToXML
|
|||
let param_name = (tokens.Last().Trim() != "*/" ? tokens.Last() : tokens[tokens.Length - 2]).Trim()
|
||||
let param_type = (tokens.First().Trim() != "const" ? tokens.First().Trim() : tokens[tokens.Length - 2]).Trim()
|
||||
let has_array_size = array_size.IsMatch(param_name)
|
||||
let indirection_level = (from c in param_name where c == '*' select c).Count() + (from c in param_type where c == '*' select c).Count() + (has_array_size ? 1 : 0)
|
||||
let indirection_level =
|
||||
(from c in param_name where c == '*' select c).Count() +
|
||||
(from c in param_type where c == '*' select c).Count() +
|
||||
(from t in tokens where t == "***" select t).Count() * 3 +
|
||||
(from t in tokens where t == "**" select t).Count() * 2 +
|
||||
(from t in tokens where t == "*" select t).Count() +
|
||||
(has_array_size ? 1 : 0)
|
||||
let pointers = new string[] { "*", "*", "*", "*" } // for adding indirection levels (pointers) to param_type
|
||||
where tokens.Length > 1
|
||||
select new
|
||||
|
|
Loading…
Reference in a new issue