If you see at the top of the .scala page this import:
"import Chisel._" then that means that the code on the page can be either Chisel 2 or Chisel 3. Now, you can mix Chisel 2 syntax with Chisel 3 syntax on the same page.