   jsIr = translateIr ctx, ir
   translateStatementsToJs jsIr
 
+compileDefinitions = (source) ->
+  ast = astize tokenize "(#{source})", -1
+  compileDefinitionList (new Context), _terms ast
+
+compileExpression = (ctx, expression) ->
+  expressionIr = topLevelExpression ctx, expression
+  expressionJsIr = translateIr ctx, expressionIr
+  compiledExpression = translateToJs expressionJsIr
+
 astizeList = (source) ->
   parentize astize tokenize "(#{source})", -1
 

    if result isnt (eval compiled.compiled)
      log "Wrong result", result
  catch e
    logError "Error in test |#{name}|\n#{teaSource}\n", e

tests = [
  'simple defs'

# end of Utils

# Unit tests
test = (testName, teaSource, result) ->
  try
    compiled = (topLevelAndExpression teaSource)
  catch e
    logError "Failed to compile test |#{testName}|\n#{teaSource}\n", e
    return
  try
    log (collapse toHtml compiled.ast)
