Microsoft.R.Core.Formatting.FormattingScope.FindMatchingCloseBrace C# (CSharp) 메소드

FindMatchingCloseBrace() 개인적인 메소드

private FindMatchingCloseBrace ( TokenStream tokens, int openBraceTokenIndex ) : int
tokens TokenStream
openBraceTokenIndex int
리턴 int
        private int FindMatchingCloseBrace(TokenStream<RToken> tokens, int openBraceTokenIndex) {
            var position = tokens.Position;
            tokens.Position = openBraceTokenIndex;

            var result = TokenBraceCounter<RToken>.GetMatchingBrace(tokens,
                new RToken(RTokenType.OpenCurlyBrace), new RToken(RTokenType.CloseCurlyBrace),
                new RTokenTypeComparer());

            tokens.Position = position;
            return result;
        }