本文整理汇总了C#中Mono.CSharp.ATypeNameExpression类的典型用法代码示例。如果您正苦于以下问题:C# ATypeNameExpression类的具体用法?C# ATypeNameExpression怎么用?C# ATypeNameExpression使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ATypeNameExpression类属于Mono.CSharp命名空间,在下文中一共展示了ATypeNameExpression类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddTypeArguments
void AddTypeArguments (ATypeNameExpression texpr, AstType result)
{
if (!texpr.HasTypeArguments)
return;
foreach (var arg in texpr.TypeArguments.Args) {
result.AddChild (ConvertToType (arg), AstType.Roles.TypeArgument);
}
}
示例2: AddTypeArguments
void AddTypeArguments (ATypeNameExpression texpr, AstType result)
{
if (texpr.TypeArguments == null || texpr.TypeArguments.Args == null)
return;
var loc = LocationsBag.GetLocations (texpr.TypeArguments);
if (loc != null && loc.Count >= 2)
result.AddChild (new CSharpTokenNode (Convert (loc [loc.Count - 2]), 1), AstType.Roles.LChevron);
int i = 0;
foreach (var arg in texpr.TypeArguments.Args) {
result.AddChild (ConvertToType (arg), AstType.Roles.TypeArgument);
if (loc != null && i < loc.Count - 2)
result.AddChild (new CSharpTokenNode (Convert (loc [i++]), 1), AstType.Roles.Comma);
}
if (loc != null && loc.Count >= 2)
result.AddChild (new CSharpTokenNode (Convert (loc [loc.Count - 1]), 1), AstType.Roles.RChevron);
}
示例3: DynamicInvocation
public DynamicInvocation(ATypeNameExpression member, Arguments args, Location loc)
: base(null, args, loc)
{
base.binder = this;
this.member = member;
}
示例4: AddTypeArguments
void AddTypeArguments(AstNode parent, ATypeNameExpression memberName)
{
if (memberName == null || !memberName.HasTypeArguments)
return;
var chevronLocs = LocationsBag.GetLocations(memberName.TypeArguments);
if (chevronLocs != null)
parent.AddChild(new CSharpTokenNode(Convert(chevronLocs [chevronLocs.Count - 2]), Roles.LChevron), Roles.LChevron);
for (int i = 0; i < memberName.TypeArguments.Count; i++) {
var arg = memberName.TypeArguments.Args [i];
if (arg == null)
continue;
parent.AddChild(ConvertToType(arg), Roles.TypeArgument);
if (chevronLocs != null && i < chevronLocs.Count - 2)
parent.AddChild(new CSharpTokenNode(Convert(chevronLocs [i]), Roles.Comma), Roles.Comma);
}
if (chevronLocs != null)
parent.AddChild(new CSharpTokenNode(Convert(chevronLocs [chevronLocs.Count - 1]), Roles.RChevron), Roles.RChevron);
}
示例5: AddTypeArguments
void AddTypeArguments (ATypeNameExpression texpr, DomReturnType result)
{
if (!texpr.HasTypeArguments)
return;
foreach (var arg in texpr.TypeArguments.Args) {
result.AddTypeParameter (ConvertReturnType (arg));
}
}
示例6: UsingType
public UsingType(ATypeNameExpression expr, Location loc)
: base(expr, loc)
{
}
示例7: UsingClause
public UsingClause(ATypeNameExpression expr, Location loc)
{
this.expr = expr;
this.loc = loc;
}
示例8: DynamicInvocation
public DynamicInvocation (ATypeNameExpression member, Arguments args, Location loc)
: base (null, args, loc)
{
base.binder = this;
this.member = member;
this.IsMemberAccess = (member is MemberAccess) || (member is SimpleName);
}
示例9: DynamicInvocation
public DynamicInvocation (ATypeNameExpression member, Arguments args, bool conditionalAccessReceiver, Location loc)
: base (null, args, loc)
{
base.binder = this;
this.member = member;
this.conditional_access_receiver = conditionalAccessReceiver;
}
示例10: DynamicInvocation
//
// When a return type is known not to be dynamic
//
public DynamicInvocation (ATypeNameExpression member, Arguments args, TypeSpec type, Location loc)
: this (member, args, loc)
{
this.type = type;
}
示例11: ResolvePossibleAttributeType
TypeSpec ResolvePossibleAttributeType (ATypeNameExpression expr, ref bool is_attr)
{
TypeExpr te = ResolveAsTypeTerminal (expr, context);
if (te == null)
return null;
TypeSpec t = te.Type;
if (t.IsAttribute) {
is_attr = true;
} else {
Report.SymbolRelatedToPreviousError (t);
Report.Error (616, Location, "`{0}': is not an attribute class", TypeManager.CSharpName (t));
}
return t;
}
示例12: GlobalAttribute
public GlobalAttribute (NamespaceEntry ns, string target, ATypeNameExpression expression,
Arguments[] args, Location loc, bool nameEscaped):
base (target, expression, args, loc, nameEscaped)
{
this.ns = ns;
}
示例13: Attribute
public Attribute (string target, ATypeNameExpression expr, Arguments[] args, Location loc, bool nameEscaped)
{
this.expression = expr;
if (args != null) {
PosArguments = args [0];
NamedArguments = args [1];
}
this.loc = loc;
ExplicitTarget = target;
this.nameEscaped = nameEscaped;
}
示例14: CreateSpecialNameInvoke
public static DynamicInvocation CreateSpecialNameInvoke(ATypeNameExpression member, Arguments args, Location loc)
{
return new DynamicInvocation (member, args, loc) {
flags = CSharpBinderFlags.InvokeSpecialName
};
}
示例15: UsingAliasNamespace
public UsingAliasNamespace(SimpleMemberName alias, ATypeNameExpression expr, Location loc)
: base(expr, loc)
{
this.alias = alias;
}