C# CSharp.ComposedCast类代码示例(c#composedcast典型用法代码示例汇总)

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


C# CSharp.ComposedCast类代码示例(c#composedcast典型用法代码示例汇总)

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

示例1: case_383

void case_383()
#line 2922 "cs-parser.jay"
{
		MemberName name = (MemberName) yyVals[-1+yyTop];

		if (yyVals[0+yyTop] != null) {
			yyVal = new ComposedCast (name.GetTypeExpression (), (ComposedTypeSpecifier) yyVals[0+yyTop]);
		} else {
			if (name.Left == null && name.Name == "var")
				yyVal = new VarExpr (name.Location);
			else
				yyVal = name.GetTypeExpression ();
		}
	  }
开发者ID:Ein,项目名称:monodevelop,代码行数:14,代码来源:cs-parser.cs

示例2: case_381

void case_381()
#line 2898 "C:\Projects\Junk\mono\mcs\class\Mono.CSharp\..\..\mcs\cs-parser.jay"
{
		MemberName name = (MemberName) yyVals[-1+yyTop];

		if (yyVals[0+yyTop] != null) {
			yyVal = new ComposedCast (name.GetTypeExpression (), (ComposedTypeSpecifier) yyVals[0+yyTop]);
		} else {
			if (name.Left == null && name.Name == "var")
				yyVal = new VarExpr (name.Location);
			else
				yyVal = name.GetTypeExpression ();
		}
	  }
开发者ID:RainsSoft,项目名称:MonoCompilerAsAService,代码行数:14,代码来源:cs-parser.cs

示例3: yyparse

//.........这里部分代码省略.........
case 369:
  case_369();
  break;
case 370:
  case_370();
  break;
case 371:
  case_371();
  break;
case 373:
#line 2872 "cs-parser.jay"
  {
		yyVal = new TypeExpression (TypeManager.void_type, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 374:
#line 2879 "cs-parser.jay"
  {
		lexer.parsing_generic_declaration = true;
	  }
  break;
case 376:
  case_376();
  break;
case 378:
  case_378();
  break;
case 380:
  case_380();
  break;
case 382:
#line 2917 "cs-parser.jay"
  {
		yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]);
	  }
  break;
case 383:
  case_383();
  break;
case 384:
#line 2937 "cs-parser.jay"
  {
		yyVal = new ComposedCast (((MemberName) yyVals[-1+yyTop]).GetTypeExpression (), (ComposedTypeSpecifier) yyVals[0+yyTop]);
	  }
  break;
case 385:
  case_385();
  break;
case 386:
#line 2946 "cs-parser.jay"
  {
		yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]);
	  }
  break;
case 387:
#line 2950 "cs-parser.jay"
  {
		yyVal = new ComposedCast (new TypeExpression (TypeManager.void_type, GetLocation (yyVals[-1+yyTop])), (ComposedTypeSpecifier) yyVals[0+yyTop]);
	  }
  break;
case 388:
  case_388();
  break;
case 389:
  case_389();
  break;
开发者ID:Ein,项目名称:monodevelop,代码行数:67,代码来源:cs-parser.cs

示例4: case_788

void case_788()
#line 5314 "cs-parser.jay"
{
		ATypeNameExpression expr = yyVals[-1+yyTop] as ATypeNameExpression;

		if (expr != null) {
			yyVal = new ComposedCast (expr, (ComposedTypeSpecifier) yyVals[0+yyTop]);
		} else {
			Error_ExpectingTypeName ((Expression)yyVals[-1+yyTop]);
			yyVal = expr;
		}
	  }
开发者ID:segaman,项目名称:NRefactory,代码行数:12,代码来源:cs-parser.cs

示例5: Visit

public override object Visit(ComposedCast composedCast)
			{
				var result = new ComposedType();
				result.AddChild(ConvertToType(composedCast.Left), Roles.Type);
				
				var spec = composedCast.Spec;
				while (spec != null) {
					if (spec.IsNullable) {
						result.AddChild(new CSharpTokenNode(Convert(spec.Location), ComposedType.NullableRole), ComposedType.NullableRole);
					} else if (spec.IsPointer) {
						result.AddChild(new CSharpTokenNode(Convert(spec.Location), ComposedType.PointerRole), ComposedType.PointerRole);
					} else {
						var aSpec = new ArraySpecifier();
						aSpec.AddChild(new CSharpTokenNode(Convert(spec.Location), Roles.LBracket), Roles.LBracket);
						var location = LocationsBag.GetLocations(spec);
						if (location != null)
							aSpec.AddChild(new CSharpTokenNode(Convert(spec.Location), Roles.RBracket), Roles.RBracket);
						result.AddChild(aSpec, ComposedType.ArraySpecifierRole);
					}
					spec = spec.Next;
				}
				
				return result;
			}
开发者ID:0xb1dd1e,项目名称:NRefactory,代码行数:24,代码来源:CSharpParser.cs

示例6: case_379

void case_379()
#line 3092 "cs-parser.jay"
{
		if (yyVals[0+yyTop] != null) {
			yyVal = new ComposedCast ((ATypeNameExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]);
		} else {
			var sn = yyVals[-1+yyTop] as SimpleName;
			if (sn != null && sn.Name == "var")
				yyVal = new VarExpr (sn.Location);
			else
				yyVal = yyVals[-1+yyTop];
		}
	  }
开发者ID:segaman,项目名称:NRefactory,代码行数:13,代码来源:cs-parser.cs

示例7: case_786

void case_786()
#line 5268 "cs-parser.jay"
{
		if (yyVals[-1+yyTop] is VarExpr)
			yyVals[-1+yyTop] = new SimpleName ("var", ((VarExpr) yyVals[-1+yyTop]).Location);
	  
		yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]);
	  }
开发者ID:segaman,项目名称:NRefactory,代码行数:8,代码来源:cs-parser.cs

示例8: case_374

void case_374()
{
		if (yyVals[0+yyTop] != null)
			yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]);
	  }
开发者ID:animaonline,项目名称:Portable-Mono.CSharp,代码行数:5,代码来源:cs-parser.cs

示例9: case_736

void case_736()
{
		if (yyVals[-1+yyTop] is VarExpr)
			yyVals[-1+yyTop] = new SimpleName ("var", ((VarExpr) yyVals[-1+yyTop]).Location);
	  
		yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]);
	  }
开发者ID:animaonline,项目名称:Portable-Mono.CSharp,代码行数:7,代码来源:cs-parser.cs

示例10: yyparse

//.........这里部分代码省略.........
		yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 384:
#line 3213 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		lexer.parsing_generic_declaration = true;
	  }
  break;
case 386:
#line 3224 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report);
		yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 388:
#line 3233 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report);
		yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 390:
#line 3242 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	report.Error (1536, GetLocation (yyVals[0+yyTop]), "Invalid parameter type `void'");
		yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 392:
#line 3251 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]);
	  }
  break;
case 393:
#line 3258 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		MemberName name = (MemberName) yyVals[-1+yyTop];

		if (yyVals[0+yyTop] != null) {
			yyVal = new ComposedCast (name.GetTypeExpression (), (ComposedTypeSpecifier) yyVals[0+yyTop]);
		} else {
			if (name.Left == null && name.Name == "var")
				yyVal = new VarExpr (name.Location);
			else
				yyVal = name.GetTypeExpression ();
		}
	  }
  break;
case 394:
#line 3271 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new ComposedCast (((MemberName) yyVals[-1+yyTop]).GetTypeExpression (), (ComposedTypeSpecifier) yyVals[0+yyTop]);
	  }
  break;
case 395:
#line 3275 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (yyVals[0+yyTop] != null)
			yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]);
	  }
  break;
case 396:
#line 3280 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
开发者ID:runefs,项目名称:Marvin,代码行数:67,代码来源:cs-parser.cs

示例11: LookupType

//
		// Creates the type of the array
		//
		bool LookupType (EmitContext ec)
		{
			StringBuilder array_qualifier = new StringBuilder (rank);

			//
			// `In the first form allocates an array instace of the type that results
			// from deleting each of the individual expression from the expression list'
			//
			if (num_arguments > 0) {
				array_qualifier.Append ("[");
				for (int i = num_arguments-1; i > 0; i--)
					array_qualifier.Append (",");
				array_qualifier.Append ("]");				
			}

			//
			// Lookup the type
			//
			Expression array_type_expr;
			array_type_expr = new ComposedCast (requested_base_type, array_qualifier.ToString (), loc);
			type = ec.DeclSpace.ResolveType (array_type_expr, false, loc);

			if (type == null)
				return false;

			underlying_type = type;
			if (underlying_type.IsArray)
				underlying_type = TypeManager.TypeToCoreType (underlying_type.GetElementType ());
			dimensions = type.GetArrayRank ();

			return true;
		}
开发者ID:emtees,项目名称:old-code,代码行数:35,代码来源:expression.cs

示例12: case_734

void case_734()
#line 4693 "C:\Projects\Junk\mono\mcs\class\Mono.CSharp\..\..\mcs\cs-parser.jay"
{
		if (yyVals[0+yyTop] == null)
			yyVal = yyVals[-1+yyTop];
		else
			yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]);
	  }
开发者ID:RainsSoft,项目名称:MonoCompilerAsAService,代码行数:8,代码来源:cs-parser.cs

示例13: case_733

void case_733()
#line 4682 "C:\Projects\Junk\mono\mcs\class\Mono.CSharp\..\..\mcs\cs-parser.jay"
{
		ATypeNameExpression expr = yyVals[-1+yyTop] as ATypeNameExpression;

		if (expr != null) {
			yyVal = new ComposedCast (expr, (ComposedTypeSpecifier) yyVals[0+yyTop]);
		} else {
			Error_ExpectingTypeName ((Expression)yyVals[-1+yyTop]);
			yyVal = expr;
		}
	  }
开发者ID:RainsSoft,项目名称:MonoCompilerAsAService,代码行数:12,代码来源:cs-parser.cs

示例14: case_731

void case_731()
#line 4636 "C:\Projects\Junk\mono\mcs\class\Mono.CSharp\..\..\mcs\cs-parser.jay"
{
		if (yyVals[-1+yyTop] is VarExpr)
			yyVals[-1+yyTop] = new SimpleName ("var", ((VarExpr) yyVals[-1+yyTop]).Location);
	  
		yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]);
	  }
开发者ID:RainsSoft,项目名称:MonoCompilerAsAService,代码行数:8,代码来源:cs-parser.cs

示例15: Visit

public virtual object Visit (ComposedCast composedCast)
		{
			return null;
		}
开发者ID:KAW0,项目名称:Alter-Native,代码行数:4,代码来源:visit.cs

本文标签属性:

示例:示例志愿表

代码:代码转换器

ComposedCast:ComposedCast

CSharp:csharp编程

上一篇:Java TimePeriod.isValid方法代码示例(javatimeperiod.isvalid方法的典型用法代码示例)
下一篇:百姓的意思(为什么要叫老百姓)(《诗经·雅·天保》百姓的意思为什么叫老百姓)

为您推荐