当前位置: 首页>>代码示例>>C#>>正文


C# JavaScript.JsEmitContext类代码示例

本文整理汇总了C#中Mono.CSharp.JavaScript.JsEmitContext的典型用法代码示例。如果您正苦于以下问题:C# JsEmitContext类的具体用法?C# JsEmitContext怎么用?C# JsEmitContext使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


JsEmitContext类属于Mono.CSharp.JavaScript命名空间,在下文中一共展示了JsEmitContext类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: EmitJs

		public override void EmitJs (JsEmitContext jec)
		{
			CheckExternImpl ();
			
			base.EmitJs (jec);
		}
开发者ID:bbqchickenrobot,项目名称:playscript-mono,代码行数:6,代码来源:class.cs

示例2: EmitStatementJs

		public override void EmitStatementJs (JsEmitContext jec)
		{
			// It can be null for static initializers
			if (base_ctor == null || base_ctor.DeclaringType == jec.Compiler.BuiltinTypes.Object)
				return;

			jec.Buf.Write ("\t", Location);

			EmitJs (jec);

			jec.Buf.Write (";\n");
		}
开发者ID:OpenFlex,项目名称:playscript-mono,代码行数:12,代码来源:method.cs

示例3: EmitJs

		public void EmitJs (TypeDefinition parent, JsEmitContext jec)
		{
			var mc = (IMemberContext) method;

			method.ParameterInfo.ApplyAttributes (mc, MethodBuilder);
			
			ToplevelBlock block = method.Block;
			if (block != null) {
				BlockContext bc = new BlockContext (mc, block, method.ReturnType);
				if (block.Resolve (null, bc, method)) {
					block.EmitBlockJs (jec, false, false);
				}
			}
		}
开发者ID:OpenFlex,项目名称:playscript-mono,代码行数:14,代码来源:method.cs

示例4: EmitJs

		public override void EmitJs (JsEmitContext jec)
		{
			var typeName = jec.MakeJsTypeName(this.Parent.MemberName.Name);

			var proto = "";
			if ((ModFlags & Modifiers.STATIC) == 0) {
				proto = ".prototype";
			}

			jec.Buf.Write ("\tObject.defineProperty(", typeName, proto, ", \"", MemberName.Name, "\", {\n", Location);
			jec.Buf.Indent ();

			if (this.Get != null) {
				this.Get.EmitJs (jec);
			}

			if (this.Set != null) {
				this.Set.EmitJs (jec);
			}

			jec.Buf.Write ("\tenumerable: true,\n\tconfigurable: true\n");
			jec.Buf.Unindent ();
			jec.Buf.Write ("\t});\n");
		}
开发者ID:bbqchickenrobot,项目名称:playscript-mono,代码行数:24,代码来源:property.cs

示例5: EmitJs

			public override void EmitJs (JsEmitContext jec)
			{
				child.EmitJs (jec);
			}
开发者ID:rlfqudxo,项目名称:playscript-mono,代码行数:4,代码来源:assign.cs

示例6: EmitJs

		public override void EmitJs (JsEmitContext jec)
		{
			jec.Buf.Write ("undefined", Location);
		}
开发者ID:johnv315,项目名称:playscript-mono,代码行数:4,代码来源:ps-lang.cs

示例7: DoEmitJs

		protected override void DoEmitJs (JsEmitContext jec) 
		{
			expr.EmitJs (jec);
		}
开发者ID:johnv315,项目名称:playscript-mono,代码行数:4,代码来源:ps-lang.cs

示例8: EmitJs

		public override void EmitJs (JsEmitContext jec)
		{
			Arguments[0].Expr.EmitJs (jec);
			jec.Buf.Write (".", name, Location);
		}
开发者ID:bbqchickenrobot,项目名称:playscript-mono,代码行数:5,代码来源:dynamic.cs

示例9: EmitJs

		/// <summary>
		/// Base JS emit method.  This is also entry point for CLS-Compliant verification.
		/// </summary>
		public virtual void EmitJs (JsEmitContext jec)
		{
			if (!Compiler.Settings.VerifyClsCompliance)
				return;
			
			VerifyClsCompliance ();
		}
开发者ID:bbqchickenrobot,项目名称:playscript-mono,代码行数:10,代码来源:decl.cs

示例10: EmitContainerJs

		public override void EmitContainerJs (JsEmitContext jec)
		{
			jec.Buf.Write ("// File: ", this.FileName, "\n");

			base.EmitContainerJs (jec);
		}
开发者ID:johnv315,项目名称:playscript-mono,代码行数:6,代码来源:namespace.cs

示例11: EmitStatementJs

		public override void EmitStatementJs (JsEmitContext jec)
		{
			jec.Buf.Write ("\t", Location);
			Target.EmitJs (jec);
			jec.Buf.Write (" = ");
			Source.EmitJs (jec);
			jec.Buf.Write (";\n");
		}
开发者ID:rlfqudxo,项目名称:playscript-mono,代码行数:8,代码来源:assign.cs

示例12: EmitJs

		public virtual void EmitJs (JsEmitContext jec)
		{
			bool first = true;
			foreach (Argument a in args) {
				if (!first)
					jec.Buf.Write(", ");
				a.Expr.EmitJs (jec);
				first = false;
			}
		}
开发者ID:johnv315,项目名称:playscript-mono,代码行数:10,代码来源:argument.cs

示例13: EmitContainerJs

		public override void EmitContainerJs (JsEmitContext jec)
		{
			if (OptAttributes != null)
				OptAttributes.EmitJs (jec);

			foreach (var tc in containers) {
				tc.PrepareEmit ();
			}
			
			base.EmitContainerJs (jec);

			if (Compiler.Report.Errors == 0 && !Compiler.Settings.WriteMetadataOnly)
				VerifyMembers ();
			
			if (anonymous_types != null) {
				foreach (var atypes in anonymous_types)
					foreach (var at in atypes.Value)
						at.EmitContainerJs (jec);
			}
		}
开发者ID:johnv315,项目名称:playscript-mono,代码行数:20,代码来源:module.cs

示例14: EmitJs

		public override void EmitJs (JsEmitContext jec)
		{
			jec.Buf.Write ("\"", jec.Buf.EscapeString(Value), "\"", loc);
		}
开发者ID:bbqchickenrobot,项目名称:playscript-mono,代码行数:4,代码来源:literal.cs

示例15: EmitContainerJs

		public virtual void EmitContainerJs (JsEmitContext jec)
		{
			if (containers != null) {
				for (int i = 0; i < containers.Count; ++i)
					containers[i].EmitContainerJs (jec);
			}
		}
开发者ID:bbqchickenrobot,项目名称:playscript-mono,代码行数:7,代码来源:class.cs


注:本文中的Mono.CSharp.JavaScript.JsEmitContext类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。