本文整理汇总了C#中Mono.CSharp.NamedArgument类的典型用法代码示例。如果您正苦于以下问题:C# NamedArgument类的具体用法?C# NamedArgument怎么用?C# NamedArgument使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NamedArgument类属于Mono.CSharp命名空间,在下文中一共展示了NamedArgument类的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: case_81
void case_81()
#line 894 "cs-parser.jay"
{
--lexer.parsing_block;
var lt = (LocatedToken) yyVals[-3+yyTop];
yyVal = new NamedArgument (lt.Value, lt.Location, (Expression) yyVals[0+yyTop]);
lbag.AddLocation (yyVal, GetLocation(yyVals[-2+yyTop]));
}
开发者ID:segaman,项目名称:NRefactory,代码行数:8,代码来源:cs-parser.cs
示例2: MarkOrderedArgument
//
// For named arguments when the order of execution is different
// to order of invocation
//
public Arguments MarkOrderedArgument (NamedArgument a)
{
//
// An expression has no effect on left-to-right execution
//
if (a.Expr.IsSideEffectFree)
return this;
ArgumentsOrdered ra = this as ArgumentsOrdered;
if (ra == null) {
ra = new ArgumentsOrdered (this);
for (int i = 0; i < args.Count; ++i) {
var la = args [i];
if (la == a)
break;
//
// When the argument is filled later by default expression
//
if (la == null)
continue;
var ma = la as MovableArgument;
if (ma == null) {
ma = new MovableArgument (la);
ra.args[i] = ma;
}
ra.AddOrdered (ma);
}
}
ra.AddOrdered (a);
return ra;
}
开发者ID:johnv315,项目名称:playscript-mono,代码行数:40,代码来源:argument.cs
示例3: Error_NamedArgumentExpected
void Error_NamedArgumentExpected (NamedArgument a)
{
report.Error (1738, a.Location, "Named arguments must appear after the positional arguments");
}
开发者ID:segaman,项目名称:NRefactory,代码行数:4,代码来源:cs-parser.cs
示例4: AddOrdered
public void AddOrdered (NamedArgument na)
{
ordered.Add (na);
}
开发者ID:Tak,项目名称:monodevelop-novell,代码行数:4,代码来源:argument.cs
示例5: MarkOrderedArgument
//
// For named arguments when the order of execution is different
// to order of invocation
//
public Arguments MarkOrderedArgument (NamedArgument a)
{
//
// Constant expression have no effect on left-to-right execution
//
if (a.Expr is Constant)
return this;
ArgumentsOrdered ra = this as ArgumentsOrdered;
if (ra == null)
ra = new ArgumentsOrdered (this);
ra.AddOrdered (a);
return ra;
}
开发者ID:Tak,项目名称:monodevelop-novell,代码行数:19,代码来源:argument.cs
示例6: case_81
void case_81()
#line 849 "C:\Projects\Junk\mono\mcs\class\Mono.CSharp\..\..\mcs\cs-parser.jay"
{
if (lang_version <= LanguageVersion.V_3)
FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "named argument");
/* Avoid boxing in common case (no modifier)*/
var arg_mod = yyVals[-1+yyTop] == null ? Argument.AType.None : (Argument.AType) yyVals[-1+yyTop];
var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop];
yyVal = new NamedArgument (lt.Value, lt.Location, (Expression) yyVals[0+yyTop], arg_mod);
}
开发者ID:RainsSoft,项目名称:MonoCompilerAsAService,代码行数:12,代码来源:cs-parser.cs
示例7: Error_InvalidNamedArgumentType
static void Error_InvalidNamedArgumentType (ResolveContext rc, NamedArgument name)
{
rc.Report.Error (655, name.Location,
"`{0}' is not a valid named attribute argument because it is not a valid attribute parameter type",
name.Name);
}
开发者ID:alisci01,项目名称:mono,代码行数:6,代码来源:attribute.cs
示例8: case_82
void case_82()
#line 855 "cs-parser.jay"
{
--lexer.parsing_block;
var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop];
yyVal = new NamedArgument (lt.Value, lt.Location, (Expression) yyVals[0+yyTop]);
}
开发者ID:Ein,项目名称:monodevelop,代码行数:7,代码来源:cs-parser.cs
示例9: case_83
void case_83()
#line 864 "cs-parser.jay"
{
if (RootContext.Version <= LanguageVersion.V_3)
Report.FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "named argument");
/* Avoid boxing in common case (no modifier)*/
var arg_mod = yyVals[-1+yyTop] == null ? Argument.AType.None : (Argument.AType) yyVals[-1+yyTop];
var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop];
yyVal = new NamedArgument (lt.Value, lt.Location, (Expression) yyVals[0+yyTop], arg_mod);
}
开发者ID:Ein,项目名称:monodevelop,代码行数:12,代码来源:cs-parser.cs
示例10: Error_NamedArgument
public static void Error_NamedArgument (NamedArgument na, Report Report)
{
Report.Error (1742, na.Name.Location, "An element access expression cannot use named argument");
}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:4,代码来源:expression.cs
示例11: yyparse
//.........这里部分代码省略.........
yyVal = yyVals[-1+yyTop];
}
break;
case 77:
#line 810 "cs-parser.jay"
{ yyVal = null; }
break;
case 78:
#line 812 "cs-parser.jay"
{
Arguments a = new Arguments (4);
a.Add ((Argument) yyVals[0+yyTop]);
yyVal = new Arguments [] { a, null };
}
break;
case 79:
#line 818 "cs-parser.jay"
{
Arguments a = new Arguments (4);
a.Add ((Argument) yyVals[0+yyTop]);
yyVal = new Arguments [] { null, a };
}
break;
case 80:
#line 824 "cs-parser.jay"
{
Arguments[] o = (Arguments[]) yyVals[-2+yyTop];
if (o [1] != null) {
Report.Error (1016, ((Argument) yyVals[0+yyTop]).Expr.Location, "Named attribute arguments must appear after the positional arguments");
o [0] = new Arguments (4);
}
Arguments args = ((Arguments) o [0]);
if (args.Count > 0 && !(yyVals[0+yyTop] is NamedArgument) && args [args.Count - 1] is NamedArgument)
Error_NamedArgumentExpected ((NamedArgument) args [args.Count - 1]);
args.Add ((Argument) yyVals[0+yyTop]);
}
break;
case 81:
#line 838 "cs-parser.jay"
{
Arguments[] o = (Arguments[]) yyVals[-2+yyTop];
if (o [1] == null) {
o [1] = new Arguments (4);
}
((Arguments) o [1]).Add ((Argument) yyVals[0+yyTop]);
}
break;
case 82:
#line 850 "cs-parser.jay"
{
yyVal = new Argument ((Expression) yyVals[0+yyTop]);
}
break;
case 84:
#line 858 "cs-parser.jay"
{
var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop];
yyVal = new NamedArgument (lt.Value, lt.Location, (Expression) yyVals[0+yyTop]);
}
break;
case 85:
#line 866 "cs-parser.jay"
{
开发者ID:speier,项目名称:shake,代码行数:67,代码来源:cs-parser.cs
示例12: MarkOrderedArgument
//
// For named arguments when the order of execution is different
// to order of invocation
//
public Arguments MarkOrderedArgument (NamedArgument a)
{
//
// Constant expression have no effect on left-to-right execution
//
if (a.Expr is Constant)
return this;
ArgumentsOrdered ra = this as ArgumentsOrdered;
if (ra == null) {
ra = new ArgumentsOrdered (this);
for (int i = 0; i < args.Count; ++i) {
var la = args [i];
if (la == a)
break;
var ma = la as MovableArgument;
if (ma == null) {
ma = new MovableArgument (la);
ra.args[i] = ma;
}
ra.AddOrdered (ma);
}
}
ra.AddOrdered (a);
return ra;
}
开发者ID:95ulisse,项目名称:ILEdit,代码行数:34,代码来源:argument.cs
示例13: case_76
void case_76()
{
--lexer.parsing_block;
var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop];
yyVal = new NamedArgument (lt.Value, lt.Location, (Expression) yyVals[0+yyTop]);
lbag.AddLocation (yyVal, GetLocation(yyVals[-2+yyTop]));
}
开发者ID:animaonline,项目名称:Portable-Mono.CSharp,代码行数:7,代码来源:cs-parser.cs
示例14: yyparse
//.........这里部分代码省略.........
yyVal = yyVals[-1+yyTop];
}
break;
case 68:
#line 780 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
{ yyVal = null; }
break;
case 69:
#line 782 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
{
Arguments a = new Arguments (4);
a.Add ((Argument) yyVals[0+yyTop]);
yyVal = new Arguments [] { a, null };
}
break;
case 70:
#line 788 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
{
Arguments a = new Arguments (4);
a.Add ((Argument) yyVals[0+yyTop]);
yyVal = new Arguments [] { null, a };
}
break;
case 71:
#line 794 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
{
Arguments[] o = (Arguments[]) yyVals[-2+yyTop];
if (o [1] != null) {
report.Error (1016, ((Argument) yyVals[0+yyTop]).Expr.Location, "Named attribute arguments must appear after the positional arguments");
o [0] = new Arguments (4);
}
Arguments args = ((Arguments) o [0]);
if (args.Count > 0 && !(yyVals[0+yyTop] is NamedArgument) && args [args.Count - 1] is NamedArgument)
Error_NamedArgumentExpected ((NamedArgument) args [args.Count - 1]);
args.Add ((Argument) yyVals[0+yyTop]);
}
break;
case 72:
#line 808 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
{
Arguments[] o = (Arguments[]) yyVals[-2+yyTop];
if (o [1] == null) {
o [1] = new Arguments (4);
}
((Arguments) o [1]).Add ((Argument) yyVals[0+yyTop]);
}
break;
case 73:
#line 820 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
{
yyVal = new Argument ((Expression) yyVals[0+yyTop]);
}
break;
case 75:
#line 828 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
{
++lexer.parsing_block;
}
break;
case 76:
#line 832 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
{
--lexer.parsing_block;
开发者ID:runefs,项目名称:Marvin,代码行数:67,代码来源:cs-parser.cs
示例15: case_82
void case_82()
#line 904 "cs-parser.jay"
{
if (lang_version <= LanguageVersion.V_3)
FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "named argument");
/* Avoid boxing in common case (no modifier)*/
var arg_mod = yyVals[-1+yyTop] == null ? Argument.AType.None : (Argument.AType) yyVals[-1+yyTop];
var lt = (LocatedToken) yyVals[-3+yyTop];
yyVal = new NamedArgument (lt.Value, lt.Location, (Expression) yyVals[0+yyTop], arg_mod);
lbag.AddLocation (yyVal, GetLocation(yyVals[-2+yyTop]));
}
开发者ID:segaman,项目名称:NRefactory,代码行数:13,代码来源:cs-parser.cs
示例16: Error_InvalidNamedArgument
static void Error_InvalidNamedArgument (ResolveContext rc, NamedArgument name)
{
rc.Report.Error (617, name.Location, "`{0}' is not a valid named attribute argument. Named attribute arguments " +
"must be fields which are not readonly, static, const or read-write properties which are " +
"public and not static",
name.Name);
}
开发者ID:alisci01,项目名称:mono,代码行数:7,代码来源:attribute.cs
示例17: MarkReorderedArgument
public void MarkReorderedArgument (NamedArgument a)
{
//
// Constant expression can have no effect on left-to-right execution
//
if (a.Expr is Constant)
return;
if (reordered == null)
reordered = new List<NamedArgument> ();
reordered.Add (a);
}
开发者ID:pgoron,项目名称:monodevelop,代码行数:13,代码来源:argument.cs
示例18: case_80
void case_80()
#line 840 "C:\Projects\Junk\mono\mcs\class\Mono.CSharp\..\..\mcs\cs-parser.jay"
{
--lexer.parsing_block;
var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop];
yyVal = new NamedArgument (lt.Value, lt.Location, (Expression) yyVals[0+yyTop]);
}
开发者ID:RainsSoft,项目名称:MonoCompilerAsAService,代码行数:7,代码来源:cs-parser.cs
注:本文中的Mono.CSharp.NamedArgument类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论