Skip to content

Commit 7ad5ac3

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 d009bb1 commit 7ad5ac3

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
@@ -1071,15 +1071,15 @@ def condition(s):
10711071
if len(iend) == 0:
10721072
print(nslevel)
10731073
sys.exit('Ending ; not found in using declaration! EXIT -->')
1074-
cont = words[icol:icol+iend[0]+1]
10751074

1076-
name = fullDataModelName(nslevel, words[icol+1].txt)
1075+
# make sure that using is not part of a text, like ".... PID using TPC ..." or similar
10771076
definition = O2DMT.block(words[icol+3:icol+iend[0]], False)
1078-
1079-
# namespace, name, cont
1080-
use = using(nslevel, name, definition, O2DMT.block(cont))
1081-
1082-
usings.append(use)
1077+
if ('"' not in definition and "'" not in definition):
1078+
# namespace, name, cont
1079+
name = fullDataModelName(nslevel, words[icol+1].txt)
1080+
cont = words[icol:icol+iend[0]+1]
1081+
use = using(nslevel, name, definition, O2DMT.block(cont))
1082+
usings.append(use)
10831083

10841084
return usings
10851085

0 commit comments

Comments
 (0)