FunctionNode IsFunction() { if (!_tokenizer.MatchIdentifier("function")) { return(null); } string name; string returnType; List <string> parameters = new List <string>(); // Si ensuite on a les autres infos et une ouverture de parenthèse if (_tokenizer.IsIdentifier(out returnType) && _tokenizer.IsIdentifier(out name) && _tokenizer.Match(TokenType.OpenPar)) { // On prend tout les params while (!_tokenizer.Match(TokenType.ClosedPar)) { string parameterType; string osef; if (_tokenizer.IsIdentifier(out parameterType) && _tokenizer.IsIdentifier(out osef)) { parameters.Add(parameterType); } else { AddError("PB !"); return(null); } _tokenizer.Match(TokenType.Comma); } if (_tokenizer.Match(TokenType.OpenCurly)) { FunctionNode fct = new FunctionNode(name, returnType, ParseFunctionBody(), parameters); return(fct); } else { AddError("Cannot begin function... :("); } } else { AddError("Error on Function creation..."); } return(null); }