package ast;

import java.util.ArrayList;
import symbols.value.Value;

public class FunctionDef extends Statement {

	private String _funcName;
	private ArrayList<IdentifierExpression> _arguments;
	private Block _body;
        private static int _anonumousFunctionCounter = 0 ;
        
	public FunctionDef(String funcName, ArrayList<IdentifierExpression> arguments, Block body){
                if(funcName.equals("#ANONYMOUS#_")){
                    funcName+= _anonumousFunctionCounter;
                    _anonumousFunctionCounter++;
                }
                
                this._funcName = funcName;
		this._arguments = arguments;
		this._body = body;
	}

	public String getFuncName(){
		return this._funcName;
	}

	public void setFuncName(String funcName){
		this._funcName = funcName;
	}

	public ArrayList<IdentifierExpression> getArguments(){
		return this._arguments;
	}

	public void setArguments(ArrayList<IdentifierExpression> arguments){
		this._arguments = arguments;
	}

	public Block getBody(){
		return this._body;
	}

	public void setBody(Block body){
		this._body = body;
	}

	@Override
	public Value accept(ASTVisitor visitor) throws ASTVisitorException {
		return visitor.visit(this);
	}
}
@@ -123,24 +123,54 @@
 ate 
-String _funcName
+final IdentifierExpression _funcNameIdentifier
 ;%0A%09p
@@ -614,21 +614,16 @@
         
-this.
 _funcNam
@@ -623,27 +623,62 @@
 funcName
- = 
+Identifier = new IdentifierExpression(
 funcName
 ;%0A%09%09this
@@ -669,25 +669,35 @@
 funcName
+)
 ;%0A
-%09%09this.
+                
 _argumen
@@ -714,21 +714,16 @@
 ents;%0A%09%09
-this.
 _body = 
@@ -723,32 +723,48 @@
 body = body;%0A%09%7D%0A
+                
 %0A%09public String 
@@ -791,29 +791,156 @@
 urn 
-this._funcName;%0A%09%7D%0A%0A%09
+_funcNameIdentifier.getIdentifier();%0A%09%7D%0A%0A        public IdentifierExpression getFuncNameIdentifierExpr()%7B%0A%09%09return _funcNameIdentifier;%0A%09%7D%0A%0A        
 publ
@@ -979,21 +979,16 @@
 ame)%7B%0A%09%09
-this.
 _funcNam
@@ -992,19 +992,41 @@
 Name
- = 
+Identifier.setIdentifier(
 funcName
 ;%0A%09%7D
@@ -1021,21 +1021,30 @@
 funcName
+)
 ;%0A%09%7D%0A
+        
 %0A%09public
@@ -1101,21 +1101,16 @@
 %09return 
-this.
 _argumen
@@ -1189,21 +1189,16 @@
 nts)%7B%0A%09%09
-this.
 _argumen
@@ -1251,21 +1251,16 @@
 %09return 
-this.
 _body;%0A%09
@@ -1302,13 +1302,8 @@
 %7B%0A%09%09
-this.
 _bod

Change name from String to IndentifierExpression] Add the methods to manage the changes.