Increment index without show its value on xtend

83 views Asked by At

I'm trying to generate some code with a xtend function , that function uses foor loop that with variable that its increemented , the problem is that that the value of the variable is shown on the generated file, how I can avoid it?

def codeGenerate(users u) '''
             «var index = 0»
            «FOR user :u»
                «index +=1» //The problem is here the value of index is printed, how I can incremet the value without printing it?
            «ENDFOR»
            
    '''
1

There are 1 answers

2
A.H. On BEST ANSWER

It's not nice but this should do the trick:

«{index +=1; null}»