Mercurial > hg > octave-jordi
comparison src/lex.l @ 608:a675e03540dd
[project @ 1994-08-13 23:50:19 by jwe]
author | jwe |
---|---|
date | Sat, 13 Aug 1994 23:50:19 +0000 |
parents | 4057f845c1ee |
children | 60f885cd0d87 |
comparison
equal
deleted
inserted
replaced
607:ae3b8b2924a0 | 608:a675e03540dd |
---|---|
1196 /* | 1196 /* |
1197 * Given information about the spacing surrounding an operator, | 1197 * Given information about the spacing surrounding an operator, |
1198 * return 1 if it looks like it should be treated as a binary | 1198 * return 1 if it looks like it should be treated as a binary |
1199 * operator. For example, | 1199 * operator. For example, |
1200 * | 1200 * |
1201 * [ 1 + 2 ] or [ 1+2 ] ==> binary | 1201 * [ 1 + 2 ] or [ 1+ 2] or [ 1+2 ] ==> binary |
1202 * | |
1203 * The case of [ 1+ 2 ] should also be treated as a binary operator, | |
1204 * but it is handled by the caller. | |
1205 */ | 1202 */ |
1206 static int | 1203 static int |
1207 looks_like_bin_op (int spc_prev, int spc_next) | 1204 looks_like_bin_op (int spc_prev, int spc_next) |
1208 { | 1205 { |
1209 return ((spc_prev && spc_next) || ! (spc_prev || spc_next)); | 1206 return ((spc_prev && spc_next) || ! spc_prev); |
1210 } | 1207 } |
1211 | 1208 |
1212 /* | 1209 /* |
1213 * Duh. | 1210 * Duh. |
1214 */ | 1211 */ |