Convert links, urls and source mode to use synthesized attributes and symbol tables. And use a generic visitor to process them.