Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
6b8f1a72
Commit
6b8f1a72
authored
Jul 05, 2018
by
Ralf Mueller
Browse files
simpify word-boundary usage for int type match
parent
61bd2305
Changes
1
Hide whitespace changes
Inline
Side-by-side
interfaces/f2003/bindGen.rb
View file @
6b8f1a72
...
...
@@ -661,7 +661,7 @@ def matchTemplate(regexString, matchString)
regexString
=
regexString
.
gsub
(
"<opaqueTypes>"
,
opaqueTypesString
)
publicTypesString
=
'('
+
$publicTypes
.
collect
{
|
type
|
type
}.
join
(
'|'
)
+
')'
regexString
=
regexString
.
gsub
(
'<publicTypes>'
,
publicTypesString
)
regexString
=
regexString
.
gsub
(
'<integerTypes>'
,
'
(
\bshort
\b|\bint\b|\blong\b|\b
size_t
\b|\b
intmax_t
\b|\b
int_(least|fast)(8|16|32|64)_t
\b|\b
int(8|16|32|64)_t\b
)
'
)
regexString
=
regexString
.
gsub
(
'<integerTypes>'
,
'\b
(
short
|int|long|
size_t
|
intmax_t
|
int_(least|fast)(8|16|32|64)_t
|
int(8|16|32|64)_t
)
\b'
)
regexString
=
regexString
.
gsub
(
'<floatTypes>'
,
'(float|double)'
)
return
Regexp
.
new
(
regexString
).
match
(
matchString
)
end
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment