comparison src/syntax.c @ 7924:63a2327f0783

(scan_lists): Get error if eob within comment with depth!=0.
author Richard M. Stallman <rms@gnu.org>
date Thu, 16 Jun 1994 15:03:04 +0000
parents cd81dba38a49
children a6372621abd9
comparison
equal deleted inserted replaced
7923:457dc75d1d60 7924:63a2327f0783
931 931
932 case Scomment: 932 case Scomment:
933 if (!parse_sexp_ignore_comments) break; 933 if (!parse_sexp_ignore_comments) break;
934 while (1) 934 while (1)
935 { 935 {
936 if (from == stop) goto done; 936 if (from == stop)
937 {
938 if (depth == 0)
939 goto done;
940 goto lose;
941 }
937 c = FETCH_CHAR (from); 942 c = FETCH_CHAR (from);
938 if (SYNTAX (c) == Sendcomment 943 if (SYNTAX (c) == Sendcomment
939 && SYNTAX_COMMENT_STYLE (c) == comstyle) 944 && SYNTAX_COMMENT_STYLE (c) == comstyle)
940 /* we have encountered a comment end of the same style 945 /* we have encountered a comment end of the same style
941 as the comment sequence which began this comment 946 as the comment sequence which began this comment
1097 while (1) 1102 while (1)
1098 { 1103 {
1099 if (SYNTAX (c = FETCH_CHAR (from)) == Scomment 1104 if (SYNTAX (c = FETCH_CHAR (from)) == Scomment
1100 && SYNTAX_COMMENT_STYLE (c) == comstyle) 1105 && SYNTAX_COMMENT_STYLE (c) == comstyle)
1101 break; 1106 break;
1102 if (from == stop) goto done; 1107 if (from == stop)
1108 {
1109 if (depth == 0)
1110 goto done2;
1111 goto lose;
1112 }
1103 from--; 1113 from--;
1104 if (SYNTAX_COMSTART_SECOND (c) 1114 if (SYNTAX_COMSTART_SECOND (c)
1105 && SYNTAX_COMSTART_FIRST (FETCH_CHAR (from)) 1115 && SYNTAX_COMSTART_FIRST (FETCH_CHAR (from))
1106 && SYNTAX_COMMENT_STYLE (c) == comstyle 1116 && SYNTAX_COMMENT_STYLE (c) == comstyle
1107 && !char_quoted (from)) 1117 && !char_quoted (from))