本文整理汇总了C#中AstNode.GetLineno方法的典型用法代码示例。如果您正苦于以下问题:C# AstNode.GetLineno方法的具体用法?C# AstNode.GetLineno怎么用?C# AstNode.GetLineno使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AstNode
的用法示例。
在下文中一共展示了AstNode.GetLineno方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetExpression
/// <summary>Sets the wrapped expression, and sets its parent to this node.</summary>
/// <remarks>Sets the wrapped expression, and sets its parent to this node.</remarks>
/// <exception cref="System.ArgumentException">
/// } if expression is
/// <code>null</code>
/// </exception>
public virtual void SetExpression(AstNode expression)
{
AssertNotNull(expression);
expr = expression;
expression.SetParent(this);
SetLineno(expression.GetLineno());
}
示例2: SetLeft
/// <summary>
/// Sets the left-hand side of the expression, and sets its
/// parent to this node.
/// </summary>
/// <remarks>
/// Sets the left-hand side of the expression, and sets its
/// parent to this node.
/// </remarks>
/// <param name="left">the left-hand side of the expression</param>
/// <exception cref="System.ArgumentException">
/// } if left is
/// <code>null</code>
/// </exception>
public virtual void SetLeft(AstNode left)
{
AssertNotNull(left);
this.left = left;
// line number should agree with source position
SetLineno(left.GetLineno());
left.SetParent(this);
}