|
|
@ -187,15 +187,27 @@ tstylesheet { |
|
|
|
| |
|
|
|
} |
|
|
|
|
|
|
|
function "type_is_fptr" { |
|
|
|
param "type"; |
|
|
|
choose { |
|
|
|
when "contains($type,'(')" { |
|
|
|
> true |
|
|
|
} otherwise { |
|
|
|
> false |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
template "field" { |
|
|
|
param "structname"; |
|
|
|
param "name", "@name"; |
|
|
|
param "type", "@type"; |
|
|
|
const "is_fptr" call "type_is_fptr" with "type", "$type"; |
|
|
|
const "array_type", "substring-before($type, '[')"; |
|
|
|
const "array_len", "substring-before(substring-after($type, '['),']')"; |
|
|
|
|
|
|
|
|
|
|
|
if "$is_fptr != 'true'" { // function pointers not supported, currently |
|
|
|
choose { |
|
|
|
// If is array type |
|
|
|
when "string-length($array_len) > 0" { |
|
|
@ -285,6 +297,9 @@ tstylesheet { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
template "enum" { |
|
|
|