       collapsed += node
   collapsed
 
+# end of Syntax printing
+
+# Main compilation from plain text source to tokens
+
 variableCounter = 1
 warnings = []
 nonstrict = no
+
+tokenizedExp = (source) ->
+  parentize typifyExp astize tokenize source
 
 # exp followed by list of definitions
 compiledTop = (source) ->

  walk ast, (node) ->
    [openDelim, operator] = node
    if openDelim.token is '('
      if not operator.type and operator.label is 'bare'
        operator.label = 'operator'
    else if node.type isnt 'pattern'
      [openDelim, ..., closeDelim] = node
      openDelim.label = 'operator'
      closeDelim.label = 'operator'
    node

typifyMost = (ast) ->
  apply ast, typeComments, typeDatas, typeTypes, labelSimple, labelMatches,
    labelFns, labelRequires, labelComments

typifyWith = (ast, mainLabeling) ->
  apply ast, typifyMost, mainLabeling, labelOperators

typifyExp = (ast) ->
  typifyWith ast, (x) -> x

typifyTop = (ast) ->
  typifyWith ast, labelTop

typifyBottom = (ast) ->
  typifyWith ast, labelBottom

typifyDefinitions = (ast) ->
  typifyWith ast, labelDefinitions

toHtml = (highlighted) ->
  crawl highlighted, (word) ->

  for el, i in list by 2
    [el, list[i + 1]]

labelFns = (ast) ->
  macro 'fn', ast, (node, args) ->
    node.type = 'function'
