     subroutines: [
 
       ast: 'function'
-      name:
-        ast: 'identifier'
-        val: 'factorial'
+      name: 'factorial'
       params: [
         ast: 'formal parameter'
         reference: no
-        name:
-          ast: 'identifier'
-          val: 'n'
+        name: 'n'
+        type:
+          ast: 'named type'
+          name: 'integer'
       ]
       rettype:
-        ast: 'identifier'
-        val: 'integer'
+        ast: 'named type'
+        name: 'integer'
 
       declarations:
         ast: 'declarations'


    body: [
      ast: 'subroutine call'
      name:
        ast: 'identifier'
        val: 'writeln'
      args: [
        ast: 'subroutine call'
        name:
          ast: 'identifier'
          val: 'factorial'
        args: [
          ast: 'integer'
          val: 6
        ]
      ]
    ]



  head:
    ast: 'program head'
    name: 'factorial'
    files:
      ast: 'files'
      input: 'input'
      output: 'output'

  declarations:
    ast: 'declarations'
