[DDMD] [refactor] Move getIntRange to a visitor class