コード例 #1
0
        private Tuple <string, TypeIdParserScanData.SubsetEntry, bool> ParseCaptureOrSubset(TokenTransition expected, bool advance = true, bool error = true)
        {
            var capture = ParseCaptureInternal(expected, false, advance);

            TypeIdParserScanData.SubsetEntry subset = null;
            if (capture == null)
            {
                subset = ParseSubset(expected, advance, error);
            }
            else
            {
                return(new Tuple <string, TypeIdParserScanData.SubsetEntry, bool>(capture.Capture, null, true));
            }
            return(new Tuple <string, TypeIdParserScanData.SubsetEntry, bool>(null, subset, false));
        }
コード例 #2
0
        public ITITypeParameterIdentityRule ParseTypeParameterIdentity()
        {
            ITIQualifiedTypeNameRule type;

            TypeIdParserScanData.SubsetEntry lsq = ParseSubset(TokenTransitions.CommonSymbols.LeftSquareBracket, true, false);
            if (lsq != null)
            {
                type = ParseQualifiedTypeNameInternal(true);
                ParseSubset(TokenTransitions.CommonSymbols.RightSquareBracket);
            }
            else
            {
                type = ParseQualifiedTypeNameInternal(true, true);
            }
            return(new TITypeParameterIdentityRule(type));
        }