 
 Call::getMethod = ->
     @getChild(0).getChild(Access)
+
+Call::getArguments = ->
+    args = []
+    position = 0
+    @eachChild (child) ->
+        args.push child if position++ > 0
+    args
+
+Assign::getVariableName = ->
+    @getChild(0).getLiteralValue()
+
+Op::getOperator = ->
+    @operator
+
+Op::getVariableName = ->
+    @first.getLiteralValue()
+
+Literal::getValue = ->
+    @value
+
+Literal::setValue = (value) ->
+    @value = value
+
+Block::insertExpression = (node) ->
+    @expressions.unshift node
+
+Block::renameLiterals = (oldName, newName) ->
+    @traverseChildren true, (node) ->
+        node.setValue(newName) if node.isLiteral() and node.getValue() is oldName
+
+Block::replaceLiterals = (name, replacement) ->
+    replaceLiterals this, name, replacement
+
+replaceLiterals = (node, name, replacement) ->
+    node.eachChild (child) ->
+        if child.isValue() and child.getLiteralValue() is name
+            node.replaceChild child, replacement
+        else
+            replaceLiterals child, name, replacement
 
 Parser.parser.parse = (source) ->
     modifyAST parse.call this, source

    else
        @getFunctionName()

Call::isFunctionCall = ->
    @isCall() and @getMethod() is null

Call::isMethodCall = ->
    @isCall() and @getMethod() isnt null

Call::isSelfMethodCall = ->
    @isMethodCall() and @getMethodTarget() is "this"

Call::getFunctionName = ->

Code    = Nodes.Code
Literal = Nodes.Literal
Obj     = Nodes.Obj
Op      = Nodes.Op
Param   = Nodes.Param
Parens  = Nodes.Parens
Value   = Nodes.Value

parse = Parser.parser.parse
baseContext = "__no_class__"
uniqueId = 0

Base::clone = ->
    clone(this)

Base::getChild = (id) ->
    result = null
