本文整理汇总了C#中Mono.CSharp.FieldBase.GetSignatureForError方法的典型用法代码示例。如果您正苦于以下问题:C# FieldBase.GetSignatureForError方法的具体用法?C# FieldBase.GetSignatureForError怎么用?C# FieldBase.GetSignatureForError使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mono.CSharp.FieldBase
的用法示例。
在下文中一共展示了FieldBase.GetSignatureForError方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddField
public bool AddField (FieldBase field)
{
AddMember (field);
if ((field.ModFlags & Modifiers.STATIC) != 0)
return true;
var first_field = PartialContainer.first_nonstatic_field;
if (first_field == null) {
PartialContainer.first_nonstatic_field = field;
return true;
}
if (Kind == MemberKind.Struct && first_field.Parent != field.Parent) {
Report.SymbolRelatedToPreviousError (first_field.Parent);
Report.Warning (282, 3, field.Location,
"struct instance field `{0}' found in different declaration from instance field `{1}'",
field.GetSignatureForError (), first_field.GetSignatureForError ());
}
return true;
}
示例2: AddField
public bool AddField (FieldBase field)
{
if (!AddMember (field))
return false;
if (fields == null)
fields = new List<FieldBase> ();
fields.Add (field);
if ((field.ModFlags & Modifiers.STATIC) != 0)
return true;
if (first_nonstatic_field == null) {
first_nonstatic_field = field;
return true;
}
if (Kind == MemberKind.Struct && first_nonstatic_field.Parent != field.Parent) {
Report.SymbolRelatedToPreviousError (first_nonstatic_field.Parent);
Report.Warning (282, 3, field.Location,
"struct instance field `{0}' found in different declaration from instance field `{1}'",
field.GetSignatureForError (), first_nonstatic_field.GetSignatureForError ());
}
return true;
}
示例3: yyparse
//.........这里部分代码省略.........
Lexer.doc_state = XmlCommentState.Allowed;
}
break;
case 102:
#line 936 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
{
--lexer.parsing_declaration;
if (doc_support)
Lexer.doc_state = XmlCommentState.Allowed;
}
break;
case 103:
#line 942 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
{
lbag.AppendToMember (current_class, GetLocation (yyVals[-5+yyTop]), GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop]));
yyVal = pop_current_class ();
}
break;
case 104:
#line 947 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
{
Error_SyntaxError (yyToken);
}
break;
case 105:
#line 956 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
{
var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
var mod = (Modifiers) yyVals[-3+yyTop];
current_field = new Const (current_class, (FullNamedExpression) yyVals[-1+yyTop], mod, new MemberName (lt.Value, lt.Location), (Attributes) yyVals[-4+yyTop]);
current_container.AddConstant ((Const) current_field);
if ((mod & Modifiers.STATIC) != 0) {
report.Error (504, current_field.Location, "The constant `{0}' cannot be marked static", current_field.GetSignatureForError ());
}
yyVal = current_field;
}
break;
case 106:
#line 969 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
{
if (doc_support) {
current_field.DocComment = Lexer.consume_doc_comment ();
Lexer.doc_state = XmlCommentState.Allowed;
}
current_field.Initializer = (ConstInitializer) yyVals[-2+yyTop];
lbag.AddMember (current_field, mod_locations, GetLocation (yyVals[-6+yyTop]), GetLocation (yyVals[0+yyTop]));
current_field = null;
}
break;
case 117:
#line 1003 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
{
yyVal = yyVals[0+yyTop];
}
break;
case 118:
#line 1007 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
{
yyVal = new SimpleName("dynamic",new Location(0,0));
}
break;
case 119:
#line 1013 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
示例4: case_110
void case_110()
#line 1024 "cs-parser.jay"
{
var lt = (LocatedToken) yyVals[0+yyTop];
var mod = (Modifiers) yyVals[-3+yyTop];
current_field = new Const (current_type, (FullNamedExpression) yyVals[-1+yyTop], mod, new MemberName (lt.Value, lt.Location), (Attributes) yyVals[-4+yyTop]);
current_type.AddMember (current_field);
if ((mod & Modifiers.STATIC) != 0) {
report.Error (504, current_field.Location, "The constant `{0}' cannot be marked static", current_field.GetSignatureForError ());
}
yyVal = current_field;
}
示例5: case_122
void case_122()
#line 990 "C:\Projects\Junk\mono\mcs\class\Mono.CSharp\..\..\mcs\cs-parser.jay"
{
var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
var mod = (Modifiers) yyVals[-3+yyTop];
current_field = new Const (current_class, (FullNamedExpression) yyVals[-1+yyTop], mod, new MemberName (lt.Value, lt.Location), (Attributes) yyVals[-4+yyTop]);
current_container.AddConstant ((Const) current_field);
if ((mod & Modifiers.STATIC) != 0) {
Report.Error (504, current_field.Location, "The constant `{0}' cannot be marked static", current_field.GetSignatureForError ());
}
yyVal = current_field;
}