< prev index next >

src/jdk.jshell/share/classes/jdk/jshell/CompletenessAnalyzer.java

Print this page

243         QUES(TokenKind.QUES, XEXPR|XDECL, true),  //  ?
244         DOT(TokenKind.DOT, XEXPR|XDECL),  //  .
245         STAR(TokenKind.STAR, XEXPR, true),  //  * (MAPPED: DOTSTAR)
246 
247         // Statement keywords
248         ASSERT(TokenKind.ASSERT, XSTMT1|XSTART),  //  assert
249         BREAK(TokenKind.BREAK, XSTMT1|XTERM|XSTART),  //  break
250         CATCH(TokenKind.CATCH, XSTMT1|XSTART),  //  catch
251         CONTINUE(TokenKind.CONTINUE, XSTMT1|XTERM|XSTART),  //  continue
252         DO(TokenKind.DO, XSTMT1|XSTART),  //  do
253         ELSE(TokenKind.ELSE, XSTMT1|XTERM|XSTART),  //  else
254         FINALLY(TokenKind.FINALLY, XSTMT1|XSTART),  //  finally
255         FOR(TokenKind.FOR, XSTMT1|XSTART),  //  for
256         IF(TokenKind.IF, XSTMT1|XSTART),  //  if
257         RETURN(TokenKind.RETURN, XSTMT1|XTERM|XSTART),  //  return
258         SWITCH(TokenKind.SWITCH, XSTMT1|XEXPR1),  //  switch
259         SYNCHRONIZED(TokenKind.SYNCHRONIZED, XSTMT1|XDECL),  //  synchronized
260         THROW(TokenKind.THROW, XSTMT1|XSTART),  //  throw
261         TRY(TokenKind.TRY, XSTMT1|XSTART),  //  try
262         WHILE(TokenKind.WHILE, XSTMT1|XSTART),  //  while

263 
264         // Statement keywords that we shouldn't see -- inside braces
265         CASE(TokenKind.CASE, XSTMT|XSTART),  //  case
266         DEFAULT(TokenKind.DEFAULT, XSTMT|XSTART),  //  default method, default case -- neither we should see
267 
268         // Expressions (can terminate)
269         INTLITERAL(TokenKind.INTLITERAL, XEXPR1|XTERM),  //
270         LONGLITERAL(TokenKind.LONGLITERAL, XEXPR1|XTERM),  //
271         FLOATLITERAL(TokenKind.FLOATLITERAL, XEXPR1|XTERM),  //
272         DOUBLELITERAL(TokenKind.DOUBLELITERAL, XEXPR1|XTERM),  //
273         CHARLITERAL(TokenKind.CHARLITERAL, XEXPR1|XTERM),  //
274         STRINGLITERAL(TokenKind.STRINGLITERAL, XEXPR1|XTERM),  //
275         TRUE(TokenKind.TRUE, XEXPR1|XTERM),  //  true
276         FALSE(TokenKind.FALSE, XEXPR1|XTERM),  //  false
277         NULL(TokenKind.NULL, XEXPR1|XTERM),  //  null
278         THIS(TokenKind.THIS, XEXPR1|XTERM),  //  this  -- shouldn't see
279 
280         // Expressions maybe terminate  //TODO handle these case separately
281         PLUSPLUS(TokenKind.PLUSPLUS, XEXPR1|XTERM),  //  ++
282         SUBSUB(TokenKind.SUBSUB, XEXPR1|XTERM),  //  --

243         QUES(TokenKind.QUES, XEXPR|XDECL, true),  //  ?
244         DOT(TokenKind.DOT, XEXPR|XDECL),  //  .
245         STAR(TokenKind.STAR, XEXPR, true),  //  * (MAPPED: DOTSTAR)
246 
247         // Statement keywords
248         ASSERT(TokenKind.ASSERT, XSTMT1|XSTART),  //  assert
249         BREAK(TokenKind.BREAK, XSTMT1|XTERM|XSTART),  //  break
250         CATCH(TokenKind.CATCH, XSTMT1|XSTART),  //  catch
251         CONTINUE(TokenKind.CONTINUE, XSTMT1|XTERM|XSTART),  //  continue
252         DO(TokenKind.DO, XSTMT1|XSTART),  //  do
253         ELSE(TokenKind.ELSE, XSTMT1|XTERM|XSTART),  //  else
254         FINALLY(TokenKind.FINALLY, XSTMT1|XSTART),  //  finally
255         FOR(TokenKind.FOR, XSTMT1|XSTART),  //  for
256         IF(TokenKind.IF, XSTMT1|XSTART),  //  if
257         RETURN(TokenKind.RETURN, XSTMT1|XTERM|XSTART),  //  return
258         SWITCH(TokenKind.SWITCH, XSTMT1|XEXPR1),  //  switch
259         SYNCHRONIZED(TokenKind.SYNCHRONIZED, XSTMT1|XDECL),  //  synchronized
260         THROW(TokenKind.THROW, XSTMT1|XSTART),  //  throw
261         TRY(TokenKind.TRY, XSTMT1|XSTART),  //  try
262         WHILE(TokenKind.WHILE, XSTMT1|XSTART),  //  while
263         WITHFIELD(TokenKind.WITHFIELD, XEXPR),  //  withfield
264 
265         // Statement keywords that we shouldn't see -- inside braces
266         CASE(TokenKind.CASE, XSTMT|XSTART),  //  case
267         DEFAULT(TokenKind.DEFAULT, XSTMT|XSTART),  //  default method, default case -- neither we should see
268 
269         // Expressions (can terminate)
270         INTLITERAL(TokenKind.INTLITERAL, XEXPR1|XTERM),  //
271         LONGLITERAL(TokenKind.LONGLITERAL, XEXPR1|XTERM),  //
272         FLOATLITERAL(TokenKind.FLOATLITERAL, XEXPR1|XTERM),  //
273         DOUBLELITERAL(TokenKind.DOUBLELITERAL, XEXPR1|XTERM),  //
274         CHARLITERAL(TokenKind.CHARLITERAL, XEXPR1|XTERM),  //
275         STRINGLITERAL(TokenKind.STRINGLITERAL, XEXPR1|XTERM),  //
276         TRUE(TokenKind.TRUE, XEXPR1|XTERM),  //  true
277         FALSE(TokenKind.FALSE, XEXPR1|XTERM),  //  false
278         NULL(TokenKind.NULL, XEXPR1|XTERM),  //  null
279         THIS(TokenKind.THIS, XEXPR1|XTERM),  //  this  -- shouldn't see
280 
281         // Expressions maybe terminate  //TODO handle these case separately
282         PLUSPLUS(TokenKind.PLUSPLUS, XEXPR1|XTERM),  //  ++
283         SUBSUB(TokenKind.SUBSUB, XEXPR1|XTERM),  //  --
< prev index next >