Skip to content

Commit 40efd4b

Browse files
pbuehleralcaliva
authored andcommitted
Make sure that the string 'using' in a text is NOT interpreted as the using keyword. (#13546)
(cherry picked from commit 362c300)
1 parent 26b5b2d commit 40efd4b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

scripts/datamodel-doc/ALICEO2includeFile.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,15 +1077,15 @@ def condition(s):
10771077
if len(iend) == 0:
10781078
print(nslevel)
10791079
sys.exit('Ending ; not found in using declaration! EXIT -->')
1080-
cont = words[icol:icol+iend[0]+1]
10811080

1082-
name = fullDataModelName(nslevel, words[icol+1].txt)
1081+
# make sure that using is not part of a text, like ".... PID using TPC ..." or similar
10831082
definition = O2DMT.block(words[icol+3:icol+iend[0]], False)
1084-
1085-
# namespace, name, cont
1086-
use = using(nslevel, name, definition, O2DMT.block(cont))
1087-
1088-
usings.append(use)
1083+
if ('"' not in definition and "'" not in definition):
1084+
# namespace, name, cont
1085+
name = fullDataModelName(nslevel, words[icol+1].txt)
1086+
cont = words[icol:icol+iend[0]+1]
1087+
use = using(nslevel, name, definition, O2DMT.block(cont))
1088+
usings.append(use)
10891089

10901090
return usings
10911091

0 commit comments

Comments
 (0)