Loyc.Syntax.LNodeExt.WithoutOuterParens C# (CSharp) Method

WithoutOuterParens() public static method

Removes a single pair of parentheses, if the node has a #trivia_inParens attribute. Returns the same node when no parens are present.
public static WithoutOuterParens ( this self ) : LNode
self this
return LNode
		public static LNode WithoutOuterParens(this LNode self)
		{
			LNode parens;
			self = WithoutAttrNamed(self, S.TriviaInParens, out parens);
			// Restore original node range
			if (parens != null && self.Range.Contains(parens.Range))
				return self.WithRange(parens.Range);
			return self;
		}