Parse a bracketed type, which is of the form:

<pre>
BracketedType ::= '(' Type ')'
</pre>

@return
181419
private Type parseBracketedType(EnclosingScope scope) {
		int start = index;
		match(LeftBrace);
		Type type = parseType(scope);
		match(RightBrace);
		return type;
	}
210276
public String getLiteralType(Type type) {
		String result = "";
		if (type != null) {
			if (ParameterizedType.class.isAssignableFrom(type.getClass())) {
				ParameterizedType parameterizedType = (ParameterizedType) type;
				result = parameterizedType.toString();
			} else {
				result = ((Class) type).getCanonicalName();
			}
		}
		return result;
	}
1150316
private String getTypeString(Type type) {
        String typeQualifiedName = type.qualifiedTypeName().replaceFirst("^java\\.lang\\.", "");
        typeQualifiedName = typeQualifiedName.replaceFirst("^com\\.qspin\\.qtaste\\.testsuite\\.(QTaste\\w*Exception)", "$1");
        String typeDocFileName = null;
        if (typeQualifiedName.startsWith("com.qspin.")) {
            String javaDocDir = typeQualifiedName.startsWith("com.qspin.qtaste.") ? QTaste_JAVADOC_URL_PREFIX :
                  SUT_JAVADOC_URL_PREFIX;
            typeDocFileName = javaDocDir + typeQualifiedName.replace('.', '/') + ".html";
        }
        String typeString = typeQualifiedName;
        if (typeDocFileName != null) {
            typeString = "<A HREF=\"" + typeDocFileName + "\">" + typeString + "</A>";
        }
        if (type.asParameterizedType() != null) {
            ParameterizedType parametrizedType = type.asParameterizedType();
            final Type[] parameterTypes = parametrizedType.typeArguments();
            if (parameterTypes.length > 0) {
                String[] parametersTypeStrings = new String[parameterTypes.length];
                for (int i = 0; i < parameterTypes.length; i++) {
                    parametersTypeStrings[i] = getTypeString(parameterTypes[i]);
                }
                typeString += "&lt;" + Strings.join(parametersTypeStrings, ",") + "&gt;";
            }
        }
        typeString += type.dimension();

        return typeString;
    }
454261
private AtomicValue parseIntegerLiteral() {

        String value = mToken.getContent();
        String type = "xs:integer";

        if (is(TokenType.VALUE, false)) {

            // is at least decimal literal (could also be a double literal)
            if (mToken.getType() == TokenType.POINT) {
                // TODO: not so nice, try to find a better solution
                final boolean isDouble = mScanner.lookUpTokens(2).getType() == TokenType.E_NUMBER;
                value = parseDecimalLiteral(value);
                type = isDouble ? "xs:double" : "xs:decimal";
            }

            // values containing an 'e' are double literals
            if (mToken.getType() == TokenType.E_NUMBER) {
                value = parseDoubleLiteral(value);
                type = "xs:double";
            }

        } else {
            // decimal literal that starts with a "."
            final boolean isDouble = mScanner.lookUpTokens(2).getType() == TokenType.E_NUMBER;
            value = parseDecimalLiteral("");
            type = isDouble ? "xs:double" : "xs:decimal";
        }

        is(TokenType.SPACE, true);

        final AtomicValue mIntLiteral =
            new AtomicValue(TypedValue.getBytes(value), NamePageHash.generateHashForString(type));
        return mIntLiteral;
    }
1362655
public String getTypeString() {
        if (isPrimitive()) {
            return null;
        }
        if (typeString == null) {
            Class<?> t = getTypeInternal();
            String typeName = t.getName().replace('.', '/');
            String str = (t.isArray()) ? typeName : ("L" + typeName + ';');
            typeString = str.intern();
        }
        return typeString;
    }
504504
public final TypeParser.type_return type() throws RecognitionException {
        TypeParser.type_return retval = new TypeParser.type_return();
        retval.start = input.LT(1);

        CommonTree root_0 = null;

        TypeParser.typeExpression_return typeExpression1 = null;



        try {
            // org/javaruntype/type/parser/Type.g:101:5: ( typeExpression )
            // org/javaruntype/type/parser/Type.g:101:7: typeExpression
            {
            root_0 = (CommonTree)adaptor.nil();

            pushFollow(FOLLOW_typeExpression_in_type160);
            typeExpression1=typeExpression();

            state._fsp--;

            adaptor.addChild(root_0, typeExpression1.getTree());

            }

            retval.stop = input.LT(-1);

            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }

            catch (RecognitionException e) {
            	throw e;
            }
        finally {
        }
        return retval;
    }
79819
JCExpression bracketsSuffix(JCExpression t) {
        if ((mode & EXPR) != 0 && token.kind == DOT) {
            mode = EXPR;
            int pos = token.pos;
            nextToken();
            accept(CLASS);
            if (token.pos == endPosTable.errorEndPos) {
                // error recovery
                Name name;
                if (LAX_IDENTIFIER.accepts(token.kind)) {
                    name = token.name();
                    nextToken();
                } else {
                    name = names.error;
                }
                t = F.at(pos).Erroneous(List.<JCTree>of(toP(F.at(pos).Select(t, name))));
            } else {
                Tag tag = t.getTag();
                // Type annotations are illegal on class literals. Annotated non array class literals
                // are complained about directly in term3(), Here check for type annotations on dimensions
                // taking care to handle some interior dimension(s) being annotated.
                if ((tag == TYPEARRAY && TreeInfo.containsTypeAnnotation(t)) || tag == ANNOTATED_TYPE)
                    syntaxError("no.annotations.on.dot.class");
                t = toP(F.at(pos).Select(t, names._class));
            }
        } else if ((mode & TYPE) != 0) {
            if (token.kind != COLCOL) {
                mode = TYPE;
            }
        } else if (token.kind != COLCOL) {
            syntaxError(token.pos, "dot.class.expected");
        }
        return t;
    }
1089558
public static IType parseTypeLiteral(String typeName) {
    try {
      IType type = GosuParserFactory.createParser(typeName).parseTypeLiteral(null).getType().getType();
      if (type instanceof IErrorType) {
        throw new RuntimeException("Type not found: " + typeName);
      }
      return type;
    } catch (ParseResultsException e) {
      throw new RuntimeException("Type not found: " + typeName, e);
    }
  }
146852
protected Name parseNodeTypeName( TokenStream tokens ) {
        tokens.consume('[');
        Name name = parseName(tokens);
        tokens.consume(']');
        return name;
    }
1079366
private function _parse_variable_to()
    {
        $parts = explode('#', $this->_to);
        empty($parts[1]) && $parts[1] = 'index';
        
        $part = is_int(strpos($parts[0], ':')) ? $parts[0] : $parts[1];
        
        preg_match('/:(\w+)/', $part, $m);
        $type = $m[1];
        
        return $type;
    }
681805
private Node parseContextTypeExpression(JsDocToken token) {
    if (token == JsDocToken.QMARK) {
      return newNode(Token.QMARK);
    } else {
      return parseBasicTypeExpression(token);
    }
  }
504857
public String getTypeGenericsSimple() {
        final String type = getType();
        if (type.contains("<")) {
            return type.substring(type.indexOf('<') + 1, type.length() - 1);
        }
        return "";
    }
1012443
public SQLAST parse() {
        ParseTree parseTree = SQLParserFactory.newInstance(databaseType, sql).execute().getChild(0);
        if (parseTree instanceof ErrorNode) {
            throw new SQLParsingUnsupportedException(String.format("Unsupported SQL of `%s`", sql));
        }
        Optional<SQLStatementRule> sqlStatementRule = parsingRuleRegistry.findSQLStatementRule(databaseType, parseTree.getClass().getSimpleName());
        if (sqlStatementRule.isPresent()) {
            return new SQLAST((ParserRuleContext) parseTree, sqlStatementRule.get());
        }
        if (parsingRuleRegistry instanceof EncryptParsingRuleRegistry) {
            return new SQLAST((ParserRuleContext) parseTree);
        }
        throw new SQLParsingUnsupportedException(String.format("Unsupported SQL of `%s`", sql));
    }
91584
private Type parseIntersectionType(EnclosingScope scope) {
		int start = index;
		Type t = parseArrayType(scope);

		// Now, attempt to look for union and/or intersection types

// =============================================================================
// FIXME: this is commented out in connection with RFC#20. The intention is that
// it should be restored at some point in the future.
// =============================================================================
//		if (tryAndMatch(true, Ampersand) != null) {
//			// This is a union type
//			ArrayList<Type> types = new ArrayList<>();
//			types.add(t);
//			do {
//				types.add(parseArrayType(scope));
//			} while (tryAndMatch(true, Ampersand) != null);
//			//
//			Type[] bounds = types.toArray(new Type[types.size()]);
//			t = annotateSourceLocation(new Type.Intersection(bounds),start);
//		}
		return t;
	}
590898
public Object parseValue() {
    Object val;
    switch(T.getType()) {
      case LCURLY:
        val = parseObject();
        break;
      case LSQUARE:
        val = parseArray();
        break;
      case INTEGER:
        if(useBig) {
          val = new BigInteger(T.getString());
        } else {
          try {
            val = Integer.parseInt(T.getString());
          } catch(NumberFormatException e0) {
            // we have an overflow, the tokenizer guarantees the format is correct
            try {
              val = Long.parseLong(T.getString());
            } catch(NumberFormatException e1) {
              val = 0;
            }
          }
        }
        advance();
        break;
      case DOUBLE:
        if(useBig) {
          val = new BigDecimal(T.getString());
        } else {
          val = Double.parseDouble(T.getString());
        }
        advance();
        break;
      case STRING:
        val = T.getString();
        advance();
        break;
      case TRUE:
        val = true;
        advance();
        break;
      case FALSE:
        val = false;
        advance();
        break;
      case NULL:
        val = null;
        advance();
        break;
      default:
        val = null;
        addError();
    }
    return val;
  }
1138820
function() {
      switch (this.type) {
        case _Numeric:
        case _String:
        case _RegularExpression:
        case _Boolean:
        case _Null:
          return this.parseLiteral();
        case _Identifier:
          return this.parseIdentifier();
        case _Keyword:
          return this.parsePrimaryKeywordExpression();
        case _Punctuator:
          return this.parsePrimaryPunctuatorExpression();
        case _Template:
          return this.parseTemplateLiteral();
        default:
          this.unexpected();
      }
    }
712637
private function parseInternal(): Type
    {
        $typeName = $this->match(Lexer::T_IDENTIFIER);
        if (! $this->lexer->isNextToken(Lexer::T_OPEN_BRACKET)) {
            return new Type($typeName);
        }

        $this->match(Lexer::T_OPEN_BRACKET);

        $params = [];
        do {
            if ($this->lexer->isNextToken(Lexer::T_IDENTIFIER)) {
                $params[] = $this->parseInternal();
            } elseif ($this->lexer->isNextToken(Lexer::T_STRING)) {
                $params[] = $this->match(Lexer::T_STRING);
            } else {
                $this->syntaxError();
            }
        } while (Lexer::T_COMMA === $this->lexer->lookahead['type'] && $this->lexer->moveNext());

        $this->match(Lexer::T_CLOSED_BRACKET);

        return new Type($typeName, $params);
    }