本文整理汇总了C#中Mono.CSharp.SimpleMemberName类的典型用法代码示例。如果您正苦于以下问题:C# SimpleMemberName类的具体用法?C# SimpleMemberName怎么用?C# SimpleMemberName使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SimpleMemberName类属于Mono.CSharp命名空间,在下文中一共展示了SimpleMemberName类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FieldDeclarator
public FieldDeclarator (SimpleMemberName name, Expression initializer)
{
this.Name = name;
this.Initializer = initializer;
}
示例2: UsingExternAlias
public UsingExternAlias(SimpleMemberName alias, Location loc)
: base(alias, null, loc)
{
}
示例3: UsingAliasNamespace
public UsingAliasNamespace(SimpleMemberName alias, ATypeNameExpression expr, Location loc)
: base(expr, loc)
{
this.alias = alias;
}
示例4: yyparse
//.........这里部分代码省略.........
yyVal = yyVals[0+yyTop];
}
break;
case 660:
#line 4297 "cs-parser.jay"
{
var constraints = new List<Constraints> (1);
constraints.Add ((Constraints) yyVals[0+yyTop]);
yyVal = constraints;
}
break;
case 661:
#line 4303 "cs-parser.jay"
{
var constraints = (List<Constraints>) yyVals[-1+yyTop];
Constraints new_constraint = (Constraints)yyVals[0+yyTop];
foreach (Constraints c in constraints) {
if (new_constraint.TypeParameter.Value == c.TypeParameter.Value) {
Report.Error (409, new_constraint.Location,
"A constraint clause has already been specified for type parameter `{0}'",
new_constraint.TypeParameter.Value);
}
}
constraints.Add (new_constraint);
yyVal = constraints;
}
break;
case 662:
#line 4322 "cs-parser.jay"
{
var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop];
yyVal = new Constraints (new SimpleMemberName (lt.Value, lt.Location), (List<FullNamedExpression>) yyVals[0+yyTop], GetLocation (yyVals[-3+yyTop]));
}
break;
case 663:
#line 4330 "cs-parser.jay"
{
var constraints = new List<FullNamedExpression> (1);
constraints.Add ((FullNamedExpression) yyVals[0+yyTop]);
yyVal = constraints;
}
break;
case 664:
#line 4336 "cs-parser.jay"
{
var constraints = (List<FullNamedExpression>) yyVals[-2+yyTop];
var prev = constraints [constraints.Count - 1] as SpecialContraintExpr;
if (prev != null && (prev.Constraint & SpecialConstraint.Constructor) != 0) {
Report.Error (401, GetLocation (yyVals[-1+yyTop]), "The `new()' constraint must be the last constraint specified");
}
prev = yyVals[0+yyTop] as SpecialContraintExpr;
if (prev != null) {
if ((prev.Constraint & (SpecialConstraint.Class | SpecialConstraint.Struct)) != 0) {
Report.Error (449, prev.Location, "The `class' or `struct' constraint must be the first constraint specified");
} else {
prev = constraints [0] as SpecialContraintExpr;
if (prev != null && (prev.Constraint & SpecialConstraint.Struct) != 0) {
Report.Error (451, GetLocation (yyVals[0+yyTop]), "The `new()' constraint cannot be used with the `struct' constraint");
}
}
}
constraints.Add ((FullNamedExpression) yyVals[0+yyTop]);
示例5: FieldDeclarator
// PlayScript - field declarators have types
public FieldDeclarator (SimpleMemberName name, Expression initializer, FullNamedExpression type_expr)
{
this.Name = name;
this.TypeExpression = type_expr;
this.Initializer = initializer;
}
示例6: Constraints
public Constraints (SimpleMemberName tparam, List<FullNamedExpression> constraints, Location loc)
{
this.tparam = tparam;
this.constraints = constraints;
this.loc = loc;
}