/// <summary> /// Genera el codi font. /// </summary> /// <param name="unitDecl">Objecte 'UnitDeclaration'.</param> /// <returns>El codi generat.</returns> /// public static string Generate(UnitDeclaration unitDecl) { if (unitDecl == null) { throw new ArgumentNullException(nameof(unitDecl)); } var cb = new CodeBuilder(); var visitor = new GeneratorVisitor(cb); visitor.Visit(unitDecl); return(cb.ToString()); }
public string Next() { return(GeneratorVisitor.Visit(_syntaxTreeRootNode, nodeBuilder)); }