()
| 1925 | } |
| 1926 | |
| 1927 | private TryStatement tryStatement() throws IOException { |
| 1928 | if (currentToken != Token.TRY) codeBug(); |
| 1929 | consumeToken(); |
| 1930 | |
| 1931 | // Pull out JSDoc info and reset it before recursing. |
| 1932 | Comment jsdocNode = getAndResetJsDoc(); |
| 1933 | |
| 1934 | int tryPos = ts.tokenBeg, lineno = lineNumber(), column = columnNumber(), finallyPos = -1; |
| 1935 | |
| 1936 | TryStatement pn = new TryStatement(tryPos); |
| 1937 | // Hnadled comment here because there should not be try without LC |
| 1938 | int lctt = peekToken(); |
| 1939 | while (lctt == Token.COMMENT) { |
| 1940 | Comment commentNode = scannedComments.get(scannedComments.size() - 1); |
| 1941 | pn.setInlineComment(commentNode); |
| 1942 | consumeToken(); |
| 1943 | lctt = peekToken(); |
| 1944 | } |
| 1945 | if (lctt != Token.LC) { |
| 1946 | reportError("msg.no.brace.try"); |
| 1947 | } |
| 1948 | AstNode tryBlock = getNextStatementAfterInlineComments(pn); |
| 1949 | int tryEnd = getNodeEnd(tryBlock); |
| 1950 | |
| 1951 | List<CatchClause> clauses = null; |
| 1952 | |
| 1953 | boolean sawDefaultCatch = false; |
| 1954 | int peek = peekToken(); |
| 1955 | while (peek == Token.COMMENT) { |
| 1956 | Comment commentNode = scannedComments.get(scannedComments.size() - 1); |
| 1957 | pn.setInlineComment(commentNode); |
| 1958 | consumeToken(); |
| 1959 | peek = peekToken(); |
| 1960 | } |
| 1961 | |
| 1962 | boolean previous = hasUndefinedBeenRedefined; |
| 1963 | if (peek == Token.CATCH) { |
| 1964 | while (matchToken(Token.CATCH, true)) { |
| 1965 | int catchLineNum = lineNumber(); |
| 1966 | if (sawDefaultCatch) { |
| 1967 | reportError("msg.catch.unreachable"); |
| 1968 | } |
| 1969 | int catchPos = ts.tokenBeg, |
| 1970 | lp = -1, |
| 1971 | rp = -1, |
| 1972 | guardPos = -1, |
| 1973 | catchLine = lineNumber(), |
| 1974 | catchColumn = columnNumber(); |
| 1975 | AstNode varName = null; |
| 1976 | AstNode catchCond = null; |
| 1977 | |
| 1978 | switch (peekToken()) { |
| 1979 | case Token.LP: |
| 1980 | { |
| 1981 | matchToken(Token.LP, true); |
| 1982 | lp = ts.tokenBeg; |
| 1983 | |
| 1984 | int tt = peekToken(); |
no test coverage detected