Commit b7f86c2
committed
rs274: only allow a line starting with ";py," to go to convert_comment
Semicolon to indicate everything following ";" is to be ignored and
treated as a comment until the end of the line was added via commit
2ea4151 15 years ago.
11 years ago commit 38abee6 allowed
comments following a semicolon to be passed to convert_comment
(interp_convert.cc) no matter where the semicolon appeared in the line.
Per the commit notes:
"rationale: enable ;py,<some executable Python command>"
This causes unexpected behavior if more than one comment of each type
(semicolon, and text appearing between "()") appeared on a
line and they both had one of the allowable commands in the
convert_comment function. Per the RS274 standard: "If more than one
comment appears on a line, only the last one will be used; each of the
other comments will be read and its format will be checked, but it will
be ignored thereafter.".
This commit brings the code back in line with the original intents of
the aforementioned commits; ignore anything after a ";", and allow
lines starting with ";py," to execute python code. It also more closely
aligns to the RS274 standard.1 parent d473941 commit b7f86c2
1 file changed
Lines changed: 5 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
305 | | - | |
306 | | - | |
| 305 | + | |
| 306 | + | |
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
313 | | - | |
314 | 313 | | |
315 | 314 | | |
316 | | - | |
317 | | - | |
318 | | - | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
319 | 318 | | |
320 | 319 | | |
321 | 320 | | |
| |||
0 commit comments