Exemple #1
0
        internal override void load_syntax(settings_as_string sett, ref string error) {
            base.load_syntax(sett, ref error);

            load_sub_syntax(sett, multi_, "multiline", ref error);
            load_sub_syntax(sett, color_, "all", ref error);
            load_sub_syntax(sett, date_, "date", ref error);
            load_sub_syntax(sett, time_, "time", ref error);
            load_sub_syntax(sett, compare_number_, "compare-n", ref error);
            load_sub_syntax(sett, format_number_, "number", ref error);
            load_sub_syntax(sett, alternate_bg_, "alternate", ref error);

            for (int idx = 0;; idx++) {
                string prefix = "regex" + (idx > 0 ? "" + (idx + 1) : "");
                string regex_expr = sett.get(prefix + ".expr");
                if (regex_expr != "") {
                    regex_color regex = new regex_color();
                    load_sub_syntax(sett, regex, prefix, ref error);
                    sub_.Add(regex);
                } else break;
            }

            for (int idx = 0;; idx++) {
                string prefix = "abb" + (idx > 0 ? "" + (idx + 1) : "");
                string abbr_expr = sett.get(prefix + ".find");
                if (abbr_expr != "") {
                    var abb = new abbreviation();
                    load_sub_syntax(sett, abb, prefix, ref error);
                    sub_.Add(abb);
                } else break;
            }
        }
Exemple #2
0
    public static void Main()
    {
        abbreviation obj = new abbreviation();

        obj.readdata();
        obj.abbre();
    }