Mercurial > emacs
comparison src/syntax.c @ 18491:bf0d449581c8
(scan_sexps_forward): Split up a complex if-test.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 29 Jun 1997 00:33:39 +0000 |
parents | 9f7fdb0f76f3 |
children | 614b916ff5bf |
comparison
equal
deleted
inserted
replaced
18490:892910c06f24 | 18491:bf0d449581c8 |
---|---|
2412 while (from < end) | 2412 while (from < end) |
2413 { | 2413 { |
2414 UPDATE_SYNTAX_TABLE_FORWARD (from); | 2414 UPDATE_SYNTAX_TABLE_FORWARD (from); |
2415 code = SYNTAX (FETCH_CHAR (from)); | 2415 code = SYNTAX (FETCH_CHAR (from)); |
2416 INC_FROM; | 2416 INC_FROM; |
2417 | |
2417 if (code == Scomment) | 2418 if (code == Scomment) |
2418 state.comstr_start = prev_from; | 2419 state.comstr_start = prev_from; |
2419 | 2420 else if (code == Scomment_fence) |
2420 else if (code == Scomment_fence | |
2421 || (from < end && SYNTAX_COMSTART_FIRST (FETCH_CHAR (prev_from)) | |
2422 && SYNTAX_COMSTART_SECOND (FETCH_CHAR (from)))) | |
2423 { | 2421 { |
2424 /* Record the comment style we have entered so that only | 2422 /* Record the comment style we have entered so that only |
2425 the comment-end sequence of the same style actually | 2423 the comment-end sequence of the same style actually |
2426 terminates the comment section. */ | 2424 terminates the comment section. */ |
2427 state.comstyle = ( code == Scomment_fence | 2425 state.comstyle = ( code == Scomment_fence |
2429 : SYNTAX_COMMENT_STYLE (FETCH_CHAR (from))); | 2427 : SYNTAX_COMMENT_STYLE (FETCH_CHAR (from))); |
2430 state.comstr_start = prev_from; | 2428 state.comstr_start = prev_from; |
2431 if (code != Scomment_fence) INC_FROM; | 2429 if (code != Scomment_fence) INC_FROM; |
2432 code = Scomment; | 2430 code = Scomment; |
2433 } | 2431 } |
2432 else if (from < end) | |
2433 if (SYNTAX_COMSTART_FIRST (FETCH_CHAR (prev_from))) | |
2434 if (SYNTAX_COMSTART_SECOND (FETCH_CHAR (from))) | |
2435 /* Duplicate code to avoid a very complex if-expression | |
2436 which causes trouble for the SGI compiler. */ | |
2437 { | |
2438 /* Record the comment style we have entered so that only | |
2439 the comment-end sequence of the same style actually | |
2440 terminates the comment section. */ | |
2441 state.comstyle = ( code == Scomment_fence | |
2442 ? ST_COMMENT_STYLE | |
2443 : SYNTAX_COMMENT_STYLE (FETCH_CHAR (from))); | |
2444 state.comstr_start = prev_from; | |
2445 if (code != Scomment_fence) INC_FROM; | |
2446 code = Scomment; | |
2447 } | |
2434 | 2448 |
2435 if (SYNTAX_PREFIX (FETCH_CHAR (prev_from))) | 2449 if (SYNTAX_PREFIX (FETCH_CHAR (prev_from))) |
2436 continue; | 2450 continue; |
2437 switch (SWITCH_ENUM_CAST (code)) | 2451 switch (SWITCH_ENUM_CAST (code)) |
2438 { | 2452 { |