parser: guard loops in ComputeProdLocationVisitor
authorJean Privat <jean@pryen.org>
Sun, 24 Jun 2012 17:15:22 +0000 (13:15 -0400)
committerJean Privat <jean@pryen.org>
Sun, 24 Jun 2012 18:51:26 +0000 (14:51 -0400)
commit7eedebf6bde12bed517ee4d1b041fb69bc76ddc2
tree8a0d652680ddd5bc36d5b9d0a757189ee3585cfa
parent9716c7a490ba8bf807ab534cf496fe8deb7024a9
parser: guard loops in ComputeProdLocationVisitor

Most of the time, _need arrays are empty.
So, add 'if' to do the work only if there is work to do.

Signed-off-by: Jean Privat <jean@pryen.org>
src/parser/parser.nit
src/parser/xss/parser.xss