{"size": 1057, "ext": "js", "max_stars_repo_path": "20211SVAC/G38/ejecucion/xquery/expresion/CustomFunction/UpperLowerCaseFunction.js", "max_stars_repo_name": "OscarLlamas6/tytusx", "max_stars_repo_stars_event_min_datetime": "2021-06-13T05:34:26.000Z", "max_stars_repo_stars_event_max_datetime": "2021-06-16T21:53:00.000Z", "max_issues_repo_path": "20211SVAC/G38/ejecucion/xquery/expresion/CustomFunction/UpperLowerCaseFunction.js", "max_issues_repo_name": "OscarLlamas6/tytusx", "max_issues_repo_issues_event_min_datetime": "2021-06-14T07:09:39.000Z", "max_issues_repo_issues_event_max_datetime": "2021-07-07T04:17:02.000Z", "max_forks_repo_path": "20211SVAC/G38/ejecucion/xquery/expresion/CustomFunction/UpperLowerCaseFunction.js", "max_forks_repo_name": "OscarLlamas6/tytusx", "max_forks_repo_forks_event_min_datetime": "2021-06-08T03:43:42.000Z", "max_forks_repo_forks_event_max_datetime": "2021-07-05T05:03:29.000Z"}
{"max_stars_count": 4, "max_issues_count": 14, "max_forks_count": 99, "avg_line_length": 33.03125, "max_line_length": 191, "alphanum_fraction": 0.5808893094}
"use strict";
class UpperLowerCaseFunction extends ExpresionAncestor {
    constructor(entrada, upperCase, linea, columna) {
        super();
        this.entrada = entrada;
        this.upperCase = upperCase;
        this.linea = linea;
        this.columna = columna;
    }
    getTipo(ent, xmlData) {
        let tipo = this.entrada.getTipo(ent, xmlData);
        if (tipo.esCadena())
            return new Tipo(TipoDato.cadena);
        else
            return new Tipo(TipoDato.err);
    }
    getValor(ent, xmlData) {
        let tipo = this.getTipo(ent, xmlData);
        if (tipo.esCadena()) {
            let valor = this.entrada.getValor(ent, xmlData);
            if (this.upperCase)
                return valor.toUpperCase();
            else
                return valor.toLowerCase();
        }
        else {
            ListaErrores.AgregarErrorXQUERY(CrearError.errorSemantico("No se pueden usar las funciones de UPPER/LOWER CASE con el tipo de dato " + tipo.toString(), this.linea, this.columna));
        }
        return null;
    }
}
