本文整理汇总了C#中Mono.CSharp.FieldDeclarator类的典型用法代码示例。如果您正苦于以下问题:C# FieldDeclarator类的具体用法?C# FieldDeclarator怎么用?C# FieldDeclarator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FieldDeclarator类属于Mono.CSharp命名空间,在下文中一共展示了FieldDeclarator类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddDeclarator
public void AddDeclarator (FieldDeclarator declarator)
{
if (declarators == null)
declarators = new List<FieldDeclarator> (2);
declarators.Add (declarator);
// TODO: This will probably break
Parent.AddMember (this, declarator.Name.Value);
}
示例2: case_142
void case_142()
#line 1240 "cs-parser.jay"
{
var lt = (LocatedToken) yyVals[-1+yyTop];
yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), (ConstInitializer) yyVals[0+yyTop]);
lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]));
}
示例3: AddDeclarator
public void AddDeclarator (FieldDeclarator declarator)
{
if (declarators == null)
declarators = new List<FieldDeclarator> (2);
declarators.Add (declarator);
Parent.AddNameToContainer (this, declarator.Name.Value);
}
示例4: case_135
void case_135()
#line 1204 "cs-parser.jay"
{
var lt = (LocatedToken) yyVals[0+yyTop];
yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), null);
lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop]));
}
示例5: case_137
void case_137()
#line 1214 "cs-parser.jay"
{
--lexer.parsing_block;
var lt = (LocatedToken) yyVals[-3+yyTop];
yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), (Expression) yyVals[0+yyTop]);
lbag.AddLocation (yyVal, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop]));
}
示例6: case_136
void case_136()
{
var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), (ConstInitializer) yyVals[0+yyTop]);
lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]));
}
示例7: case_129
void case_129()
{
var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), null);
lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop]));
}
示例8: yyparse
//.........这里部分代码省略.........
Modifiers.PUBLIC | Modifiers.STATIC,
null);
}
RoleContracts.Add(contractName,inter);
push_current_class (inter, null);
lbag.AddMember (current_class, mod_locations, GetLocation (yyVals[0+yyTop]));
}
break;
case 123:
#line 1081 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
{
--lexer.parsing_declaration;
if (doc_support)
Lexer.doc_state = XmlCommentState.Allowed;
lbag.AppendToMember (current_class, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop]));
if(current_extensionContainer != null) {
var cls = current_class;
var container = current_container;
current_container = current_class.Module;
push_current_class((Class)current_extensionContainer, null);
lbag.AddMember (current_extensionContainer, mod_locations, GetLocation (yyVals[-4+yyTop]));
lbag.AppendToMember (current_extensionContainer, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop]));
pop_current_class();
current_class = cls;
current_container = container;
current_extensionContainer = null;
}
yyVal = pop_current_class ();
}
break;
case 124:
#line 1104 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
{
current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]);
}
break;
case 125:
#line 1108 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
{
current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]);
}
break;
case 126:
#line 1115 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
{
var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), (ConstInitializer) yyVals[0+yyTop]);
lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]));
}
break;
case 127:
#line 1124 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
{
++lexer.parsing_block;
}
break;
case 128:
#line 1128 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
{
--lexer.parsing_block;
yyVal = new ConstInitializer (current_field, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop]));
}
break;
case 129:
#line 1133 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
{
示例9: case_153
void case_153()
#line 1196 "C:\Projects\Junk\mono\mcs\class\Mono.CSharp\..\..\mcs\cs-parser.jay"
{
var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), (ConstInitializer) yyVals[0+yyTop]);
lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]));
}
示例10: case_148
void case_148()
#line 1170 "C:\Projects\Junk\mono\mcs\class\Mono.CSharp\..\..\mcs\cs-parser.jay"
{
--lexer.parsing_block;
var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop];
yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), (Expression) yyVals[0+yyTop]);
lbag.AddLocation (yyVal, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop]));
}