本文整理汇总了C#中J.Tools.Parsing.Ast.JAst.TryGetAttribute方法的典型用法代码示例。如果您正苦于以下问题:C# JAst.TryGetAttribute方法的具体用法?C# JAst.TryGetAttribute怎么用?C# JAst.TryGetAttribute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类J.Tools.Parsing.Ast.JAst
的用法示例。
在下文中一共展示了JAst.TryGetAttribute方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetVariable
public JVariable GetVariable(JAst ast)
{
object reference;
if (ast.TryGetAttribute(this, NodeAttributes.Variable, out reference)) {
return (JVariable)reference;
}
return null;
}
示例2: GetVariableReferences
internal static JReference[] GetVariableReferences(Node node, JAst ast)
{
object reference;
if (ast.TryGetAttribute(node, NodeAttributes.VariableReference, out reference)) {
return (JReference[])reference;
}
return null;
}
示例3: IsMissingCloseGrouping
public static bool IsMissingCloseGrouping(this Node node, JAst ast)
{
object dummy;
if (ast.TryGetAttribute(node, NodeAttributes.ErrorMissingCloseGrouping, out dummy)) {
return true;
} else {
return false;
}
}
示例4: GetWhiteSpace
private static string GetWhiteSpace(Node node, JAst ast, object kind, string defaultValue = " ")
{
object whitespace;
if (ast.TryGetAttribute(node, kind, out whitespace)) {
return (string)whitespace;
} else {
return defaultValue;
}
}
示例5: IsIncompleteNode
public static bool IsIncompleteNode(this Node node, JAst ast)
{
object dummy;
if (ast.TryGetAttribute(node, NodeAttributes.ErrorIncompleteNode, out dummy)) {
return true;
} else {
return false;
}
}
示例6: IsAltForm
public static bool IsAltForm(this Node node, JAst ast)
{
object dummy;
if (ast.TryGetAttribute(node, NodeAttributes.IsAltFormValue, out dummy)) {
return true;
} else {
return false;
}
}
示例7: GetVerbatimNames
public static string[] GetVerbatimNames(this Node node, JAst ast)
{
object names;
if (ast.TryGetAttribute(node, NodeAttributes.VerbatimNames, out names)) {
return (string[])names;
} else {
return null;
}
}
示例8: GetVerbatimImage
public static string GetVerbatimImage(this Node node, JAst ast)
{
object image;
if (ast.TryGetAttribute(node, NodeAttributes.VerbatimImage, out image)) {
return (string)image;
} else {
return null;
}
}
示例9: GetNamesWhiteSpace
public static string[] GetNamesWhiteSpace(this Node node, JAst ast)
{
object whitespace;
if (ast.TryGetAttribute(node, NodeAttributes.NamesWhiteSpace, out whitespace)) {
return (string[])whitespace;
} else {
return null;
}
}