本文整理匯總了C#中AstNode.GetProp方法的典型用法代碼示例。如果您正苦於以下問題:C# AstNode.GetProp方法的具體用法?C# AstNode.GetProp怎麽用?C# AstNode.GetProp使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類AstNode
的用法示例。
在下文中一共展示了AstNode.GetProp方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: SetBody
/// <summary>Sets function body, and sets its parent to this node.</summary>
/// <remarks>
/// Sets function body, and sets its parent to this node.
/// Also sets the encoded source bounds based on the body bounds.
/// Assumes the function node absolute position has already been set,
/// and the body node's absolute position and length are set.<p>
/// </remarks>
/// <param name="body">
/// function body. Its parent is set to this node, and its
/// position is updated to be relative to this node.
/// </param>
/// <exception cref="System.ArgumentException">
/// if body is
/// <code>null</code>
/// </exception>
public virtual void SetBody(AstNode body)
{
AssertNotNull(body);
this.body = body;
if (true.Equals(body.GetProp(Node.EXPRESSION_CLOSURE_PROP)))
{
SetIsExpressionClosure(true);
}
int absEnd = body.GetPosition() + body.GetLength();
body.SetParent(this);
this.SetLength(absEnd - this.position);
SetEncodedSourceBounds(this.position, absEnd);
}