public void Visit(FunctionExpression fe) { Result = CreateFunction(fe); }
public void Visit(FunctionExpression expression) { Builder.Append("function ") .Append(expression.Name) .Append("("); bool first = true; foreach (var parameter in expression.Parameters) { if (first == false) Builder.Append(", "); first = false; Builder.Append(parameter); } Builder.Append(") {"); indent++; Indent(); expression.Statement.Accept(this); indent--; Indent(); Builder.AppendLine("}"); }
void Analyze(FunctionExpression Stmt) { SetCurrentLineAndCharNos(Stmt); if (Stmt.Statement != null) Analyze(Stmt.Statement); }