 
     getPrecedence: (node) ->
       switch node.type
-        when 'BinaryExpression'
+        when 'BinaryExpression', 'LogicalExpression'
           return OPERATOR_PRECEDENCES[node.operator]
         when 'AssignStatement'
           return 16
         when 'UnaryExpression'
           if node.prefix
-            return 4
+            return OPERATOR_PRECEDENCES[node.operator] ? 4
           else
-            return 3
+            return OPERATOR_PRECEDENCES[node.operator] ? 3
         when 'CallExpression'
           return 2
         when 'NewExpression'

        allowReturnOutsideFunction: true
      })

      #console.log 'PROGRAM IS', JSON.stringify tree, null, 2

      @mark 0, tree, 0, null

    fullFunctionNameArray: (node) ->

  # See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Operator_Precedence
  # These numbers are "19 - x" so that the lowest numbers bind most tightly.
  OPERATOR_PRECEDENCES = {
    '++': 3
    '--': 3
    '!': 4
    '~': 4
    '*': 5
    '/': 5
    '%': 5
