** check whether current token is in the follow set of a block. ** 'until' closes syntactical blocks, but do not close scope, ** so it is handled in separate. */
| 862 | ** so it is handled in separate. |
| 863 | */ |
| 864 | static int block_follow (LexState *ls, int withuntil) { |
| 865 | switch (ls->t.token) { |
| 866 | case TK_ELSE: case TK_ELSEIF: |
| 867 | case TK_END: case TK_EOS: |
| 868 | return 1; |
| 869 | case TK_UNTIL: return withuntil; |
| 870 | default: return 0; |
| 871 | } |
| 872 | } |
| 873 | |
| 874 | |
| 875 | static void statlist (LexState *ls) { |