示例#1
0
        public string Transpile(string source)
        {
            var scope = new Scope(_compiler.Scope);

            scope.AddUniqueId("v");

            var jobject = JObject.Parse(source);
            var doc     = GraphLoader.FromWebNodes(jobject, scope, serializers: GraphModel.Serializers);

            var text = string.Empty;

            _compiler.CompileInstance(doc, out text);
            return(text);
        }