mirror of
https://github.com/ksherlock/mpw-shell.git
synced 2024-12-27 18:30:39 +00:00
phase 1 -- escape nl in comment joins the line.
This commit is contained in:
parent
ed341db9fa
commit
b9782a0926
10
phase1.cpp
10
phase1.cpp
@ -6,6 +6,7 @@ enum {
|
||||
st_text_esc,
|
||||
|
||||
st_comment,
|
||||
st_comment_esc,
|
||||
|
||||
st_vstring,
|
||||
st_vstring_esc,
|
||||
@ -42,6 +43,11 @@ int phase1::process(unsigned char c, int st) {
|
||||
line++;
|
||||
return st_text;
|
||||
|
||||
case st_comment_esc:
|
||||
multiline = true;
|
||||
line++;
|
||||
return st_text;
|
||||
|
||||
case st_text_esc:
|
||||
case st_vstring_esc:
|
||||
case st_dstring_esc:
|
||||
@ -82,9 +88,11 @@ text:
|
||||
break;
|
||||
|
||||
case st_comment:
|
||||
return st;
|
||||
if (c == esc) return st_comment_esc;
|
||||
return st_comment;
|
||||
break;
|
||||
|
||||
case st_comment_esc:
|
||||
case st_text_esc:
|
||||
case st_dstring_esc:
|
||||
case st_estring1_esc:
|
||||
|
Loading…
Reference in New Issue
Block a user