           ast: 'if'
           condition:
             ast: '<='
+            type: 'boolean'
             left:
-              ast: 'identifier'
-              val: 'n'
+              ast: 'scalar'
+              name: 'n'
+              type: 'integer'
             right:
               ast: 'integer'
               val: 1
+              type: 'integer'
           consequent: [
             ast: 'assignment'
             left:
-              ast: 'identifier'
+              ast: 'scalar'
               val: 'fatorial'
+              type: 'integer'
             right:
               ast: 'integer'
               val: 1
+              type: 'integer'
           ]
           alternative: [
             ast: 'assignment'
             left:
-              ast: 'identifier'
+              ast: 'scalar'
               val: 'fatorial'
+              type: 'integer'
             right:
               ast: '*'
+              type: 'integer'
               left:
-                ast: 'identifier'
+                ast: 'scalar'
                 val: 'n'
+                type: 'integer'
               right:
                 ast: 'subroutine call'
+                type: 'integer'
                 name:
-                  ast: 'identifier'
+                  ast: 'scalar'
                   val: 'fatorial'
+                  type: 'integer'
                 args: [
                   ast: '-'
                   left:
-                    ast: 'identifier'
+                    ast: 'scalar'
                     val: 'n'
+                    type: 'integer'
                   right:
                     ast: 'integer'
                     val: 1
+                    type: 'integer'
                 ]
           ]
         ]


    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'
