Skip to content

Commit

Permalink
Make sure that the string 'using' in a text is NOT interpreted as the…
Browse files Browse the repository at this point in the history
… using keyword. (#13546)
  • Loading branch information
pbuehler authored Oct 4, 2024
1 parent 0b01409 commit 362c300
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions scripts/datamodel-doc/ALICEO2includeFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -1078,15 +1078,15 @@ def condition(s):
if len(iend) == 0:
print(nslevel)
sys.exit('Ending ; not found in using declaration! EXIT -->')
cont = words[icol:icol+iend[0]+1]

name = fullDataModelName(nslevel, words[icol+1].txt)
# make sure that using is not part of a text, like ".... PID using TPC ..." or similar
definition = O2DMT.block(words[icol+3:icol+iend[0]], False)

# namespace, name, cont
use = using(nslevel, name, definition, O2DMT.block(cont))

usings.append(use)
if ('"' not in definition and "'" not in definition):
# namespace, name, cont
name = fullDataModelName(nslevel, words[icol+1].txt)
cont = words[icol:icol+iend[0]+1]
use = using(nslevel, name, definition, O2DMT.block(cont))
usings.append(use)

return usings

Expand Down

0 comments on commit 362c300

Please sign in to comment.