Beispiel #1
0
        private void GeneratePropertyGetter(Statement getter)
        {
            var def      = (FunctionDef)getter;
            var mgen     = new MethodGenerator(def, null, def.parameters, false, async, types, gen);
            var comments = ConvertFirstStringToComments(def.body.stmts);

            gen.CurrentMemberComments.AddRange(comments);
            mgen.Xlat(def.body);
        }
        private void GeneratePropertySetter(Statement setter)
        {
            if (setter == null)
            {
                return;
            }
            var def      = (FunctionDef)setter;
            var mgen     = new MethodGenerator(this.classDef, def, null, def.parameters, false, async, types, gen);
            var comments = ConvertFirstStringToComments(def.body.stmts);

            gen.CurrentMemberComments.AddRange(comments);
            mgen.Xlat(def.body);
        }