本文整理汇总了C#中SymbolTable.Resolve方法的典型用法代码示例。如果您正苦于以下问题:C# SymbolTable.Resolve方法的具体用法?C# SymbolTable.Resolve怎么用?C# SymbolTable.Resolve使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SymbolTable
的用法示例。
在下文中一共展示了SymbolTable.Resolve方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Clear
public static Expression Clear(DispatchExpression e, SymbolTable s, Type t)
{
return YacqExpression.Dispatch(
s,
DispatchTypes.Method,
s.Resolve("*textbox*"),
"Clear"
);
}
示例2: GetIdTypeName
public NameSyntax GetIdTypeName(SymbolTable symbolTable)
{
var aggregateId = this.Recurse(x => x.Base.Select(y => symbolTable.Resolve(x, y).Symbol).Cast<AggregateSyntax>())
.SelectMaybe(x => x.Identifier)
.TryFirst();
return aggregateId.OfType<GenericAggregateIdentifierSyntax>()
.Select(x => x.Name)
.OfType<NameSyntax>()
.Or<NameSyntax>(aggregateId.OfType<NamedAggregateIdentifierSyntax>().Select(x => x.Type.Name))
.Value;
}
示例3: Write
public static Expression Write(DispatchExpression e, SymbolTable s, Type t)
{
return YacqExpression.Dispatch(
s,
DispatchTypes.Method,
s.Resolve("*textbox*"),
"AppendText",
YacqExpression.Dispatch(
s,
DispatchTypes.Method,
e.Left,
"ToString"
)
);
}
示例4: GetInheritanceHierarchy
public static IEnumerable<IType> GetInheritanceHierarchy(this IType type, SymbolTable symbolTable)
{
Func<IType, Maybe<IType>> getBaseType = t =>
{
var twb = t as ITypeWithBase;
if (twb == null || !twb.Base.HasValue) return default(Maybe<IType>);
var parent = twb.Parent as ISymbol;
if (parent == null) return default(Maybe<IType>);
var res = symbolTable.Resolve(parent, twb.Base.Value);
return (res.Symbol as IType).ToMaybe();
};
return type.Recurse(getBaseType).Skip(1);
}