本文整理汇总了C#中Mono.CSharp.MemberBase类的典型用法代码示例。如果您正苦于以下问题:C# MemberBase类的具体用法?C# MemberBase怎么用?C# MemberBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MemberBase类属于Mono.CSharp命名空间,在下文中一共展示了MemberBase类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: MakeMemberName
protected static MemberName MakeMemberName (MemberBase host, string name, int unique_id, TypeParameter[] tparams, Location loc)
{
string host_name = host == null ? null : host.Name;
string tname = MakeName (host_name, "c", name, unique_id);
TypeArguments args = null;
if (tparams != null) {
args = new TypeArguments ();
foreach (TypeParameter tparam in tparams)
args.Add (new TypeParameterName (tparam.Name, null, loc));
}
return new MemberName (tname, args, loc);
}
开发者ID:nzaugg,项目名称:mono,代码行数:13,代码来源:anonymous.cs
示例2: MakeMemberName
protected static MemberName MakeMemberName (MemberBase host, string name, int unique_id, TypeParameters tparams, Location loc)
{
string host_name = host == null ? null : host is InterfaceMemberBase ? ((InterfaceMemberBase)host).GetFullName (host.MemberName) : host.MemberName.Name;
string tname = MakeName (host_name, "c", name, unique_id);
TypeParameters args = null;
if (tparams != null) {
args = new TypeParameters (tparams.Count);
// Type parameters will be filled later when we have TypeContainer
// instance, for now we need only correct arity to create valid name
for (int i = 0; i < tparams.Count; ++i)
args.Add ((TypeParameter) null);
}
return new MemberName (tname, args, loc);
}
开发者ID:rabink,项目名称:mono,代码行数:16,代码来源:anonymous.cs
示例3: AnonymousMethodStorey
public AnonymousMethodStorey (ExplicitBlock block, TypeDefinition parent, MemberBase host, TypeParameters tparams, string name, MemberKind kind)
: base (parent, MakeMemberName (host, name, parent.Module.CounterAnonymousContainers, tparams, block.StartLocation),
tparams, 0, kind)
{
OriginalSourceBlock = block;
ID = parent.Module.CounterAnonymousContainers++;
}
开发者ID:rabink,项目名称:mono,代码行数:7,代码来源:anonymous.cs
示例4: DynamicSiteClass
public DynamicSiteClass (TypeDefinition parent, MemberBase host, TypeParameters tparams)
: base (parent, MakeMemberName (host, "DynamicSite", parent.DynamicSitesCounter, tparams, Location.Null), tparams, Modifiers.STATIC, MemberKind.Class)
{
parent.DynamicSitesCounter++;
}
开发者ID:caomw,项目名称:mono,代码行数:5,代码来源:dynamic.cs
示例5: AnonymousMethodStorey
public AnonymousMethodStorey (Block block, TypeContainer parent, MemberBase host, TypeParameters tparams, string name)
: base (parent, MakeMemberName (host, name, unique_id, tparams, block.StartLocation),
tparams, Modifiers.SEALED)
{
OriginalSourceBlock = block;
ID = unique_id++;
}
开发者ID:nylen,项目名称:SharpDevelop,代码行数:7,代码来源:anonymous.cs
示例6: DynamicSiteClass
public DynamicSiteClass (TypeContainer parent, MemberBase host, TypeParameter[] tparams)
: base (parent, MakeMemberName (host, "DynamicSite", parent.DynamicSitesCounter, tparams, Location.Null), tparams, Modifiers.STATIC)
{
parent.DynamicSitesCounter++;
}
开发者ID:JustasB,项目名称:cudafy,代码行数:5,代码来源:dynamic.cs
示例7: DynamicSiteClass
public DynamicSiteClass(TypeContainer parent, MemberBase host, TypeParameter[] tparams)
: base(parent, MakeMemberName (host, "DynamicSite", parent.DynamicSitesCounter, tparams, Location.Null), tparams, Modifiers.STATIC)
{
if (tparams != null) {
mutator = new TypeParameterMutator (tparams, CurrentTypeParameters);
}
parent.DynamicSitesCounter++;
}
开发者ID:RainsSoft,项目名称:MonoCompilerAsAService,代码行数:9,代码来源:dynamic.cs
示例8: MethodData
public MethodData (MemberBase member, string name, Type return_type,
Type [] parameter_types, InternalParameters parameters,
CallingConventions cc, Attributes opt_attrs,
int modifiers, MethodAttributes flags, bool is_method)
{
this.member = member;
this.accessor_name = name;
this.ReturnType = return_type;
this.ParameterTypes = parameter_types;
this.ParameterInfo = parameters;
this.CallingConventions = cc;
this.OptAttributes = opt_attrs;
this.modifiers = modifiers;
this.flags = flags;
this.is_method = is_method;
this.Location = member.Location;
this.conditionals = new ArrayList ();
}
开发者ID:emtees,项目名称:old-code,代码行数:18,代码来源:class.cs
示例9: MakeMemberName
static MemberName MakeMemberName (MemberBase host, string name, GenericMethod generic, Location loc)
{
string host_name = host == null ? null : host.Name;
string tname = MakeName (host_name, "c", name, unique_id);
TypeArguments args = null;
if (generic != null) {
args = new TypeArguments ();
foreach (TypeParameter tparam in generic.CurrentTypeParameters)
args.Add (new TypeParameterName (tparam.Name, null, loc));
}
return new MemberName (tname, args, loc);
}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:13,代码来源:anonymous.cs
示例10: AnonymousMethodStorey
public AnonymousMethodStorey (Block block, TypeContainer parent, MemberBase host, GenericMethod generic, string name)
: base (parent, generic, MakeMemberName (host, name, generic, block.StartLocation), Modifiers.PRIVATE)
{
Parent = parent;
OriginalSourceBlock = block;
ID = unique_id++;
}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:7,代码来源:anonymous.cs
示例11: AnonymousMethodStorey
public AnonymousMethodStorey (Block block, TypeContainer parent, MemberBase host, GenericMethod generic, string name)
: base (parent, MakeMemberName (host, name, generic, block.StartLocation), Modifiers.PRIVATE | Modifiers.SEALED)
{
Parent = parent;
OriginalSourceBlock = block;
ID = unique_id++;
if (generic != null) {
var hoisted_tparams = generic.CurrentTypeParameters;
type_params = new TypeParameter [hoisted_tparams.Length];
for (int i = 0; i < type_params.Length; ++i) {
type_params[i] = hoisted_tparams[i].CreateHoistedCopy (this, spec);
}
}
}
开发者ID:afaerber,项目名称:mono,代码行数:15,代码来源:anonymous.cs
示例12: yyparse
/** the generated parser.
Maintains a state and a value stack, currently with fixed maximum size.
@param yyLex scanner.
@return result of the last reduction, if any.
@throws yyException on irrecoverable parse error.
*/
internal Object yyparse (yyParser.yyInput yyLex)
{
if (yyMax <= 0) yyMax = 256; // initial size
int yyState = 0; // state stack ptr
int [] yyStates = new int[yyMax]; // state stack
Object yyVal = null; // value stack ptr
Object [] yyVals = new Object[yyMax]; // value stack
int yyToken = -1; // current input
int yyErrorFlag = 0; // #tks to shift
/*yyLoop:*/ for (int yyTop = 0;; ++ yyTop) {
if (yyTop >= yyStates.Length) { // dynamically increase
int[] i = new int[yyStates.Length+yyMax];
yyStates.CopyTo (i, 0);
yyStates = i;
Object[] o = new Object[yyVals.Length+yyMax];
yyVals.CopyTo (o, 0);
yyVals = o;
}
yyStates[yyTop] = yyState;
yyVals[yyTop] = yyVal;
if (debug != null) debug.push(yyState, yyVal);
/*yyDiscarded:*/ for (;;) { // discarding a token does not change stack
int yyN;
if ((yyN = yyDefRed[yyState]) == 0) { // else [default] reduce (yyN)
if (yyToken < 0) {
yyToken = yyLex.advance() ? yyLex.token() : 0;
if (debug != null)
debug.lex(yyState, yyToken, yyname(yyToken), yyLex.value());
}
if ((yyN = yySindex[yyState]) != 0 && ((yyN += yyToken) >= 0)
&& (yyN < yyTable.Length) && (yyCheck[yyN] == yyToken)) {
if (debug != null)
debug.shift(yyState, yyTable[yyN], yyErrorFlag-1);
yyState = yyTable[yyN]; // shift to yyN
yyVal = yyLex.value();
yyToken = -1;
if (yyErrorFlag > 0) -- yyErrorFlag;
goto continue_yyLoop;
}
if ((yyN = yyRindex[yyState]) != 0 && (yyN += yyToken) >= 0
&& yyN < yyTable.Length && yyCheck[yyN] == yyToken)
yyN = yyTable[yyN]; // reduce (yyN)
else
switch (yyErrorFlag) {
case 0:
yyExpectingState = yyState;
// yyerror(String.Format ("syntax error, got token `{0}'", yyname (yyToken)), yyExpecting(yyState));
if (debug != null) debug.error("syntax error");
if (yyToken == 0 /*eof*/ || yyToken == eof_token) throw new yyParser.yyUnexpectedEof ();
goto case 1;
case 1: case 2:
yyErrorFlag = 3;
do {
if ((yyN = yySindex[yyStates[yyTop]]) != 0
&& (yyN += Token.yyErrorCode) >= 0 && yyN < yyTable.Length
&& yyCheck[yyN] == Token.yyErrorCode) {
if (debug != null)
debug.shift(yyStates[yyTop], yyTable[yyN], 3);
yyState = yyTable[yyN];
yyVal = yyLex.value();
goto continue_yyLoop;
}
if (debug != null) debug.pop(yyStates[yyTop]);
} while (-- yyTop >= 0);
if (debug != null) debug.reject();
throw new yyParser.yyException("irrecoverable syntax error");
case 3:
if (yyToken == 0) {
if (debug != null) debug.reject();
throw new yyParser.yyException("irrecoverable syntax error at end-of-file");
}
if (debug != null)
debug.discard(yyState, yyToken, yyname(yyToken),
yyLex.value());
yyToken = -1;
goto continue_yyDiscarded; // leave stack alone
}
}
int yyV = yyTop + 1-yyLen[yyN];
if (debug != null)
debug.reduce(yyState, yyStates[yyV-1], yyN, YYRules.getRule (yyN), yyLen[yyN]);
yyVal = yyDefault(yyV > yyTop ? null : yyVals[yyV]);
switch (yyN) {
case 1:
#line 391 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
{
Lexer.check_incorrect_doc_comment ();
}
break;
case 2:
//.........这里部分代码省略.........
开发者ID:runefs,项目名称:Marvin,代码行数:101,代码来源:cs-parser.cs
注:本文中的Mono.CSharp.MemberBase类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论