| 110 cxstring input = cx_strn(prop->input.space + prop->input.pos, |
110 cxstring input = cx_strn(prop->input.space + prop->input.pos, |
| 111 prop->input.size - prop->input.pos); |
111 prop->input.size - prop->input.pos); |
| 112 cxstring nl = cx_strchr(input, '\n'); |
112 cxstring nl = cx_strchr(input, '\n'); |
| 113 while (nl.length > 0) { |
113 while (nl.length > 0) { |
| 114 // check for line continuation |
114 // check for line continuation |
| 115 char previous = nl.ptr > input.ptr ? nl.ptr[-1] : prop->buffer.space[prop->buffer.size-1]; |
115 char previous = nl.ptr > input.ptr ? nl.ptr[-1] : cx_strat(cx_bstr(&prop->buffer), -1); |
| 116 if (previous == continuation) { |
116 if (previous == continuation) { |
| 117 // this nl is a line continuation, check the next newline |
117 // this nl is a line continuation, check the next newline |
| 118 nl = cx_strchr(cx_strsubs(nl, 1), '\n'); |
118 nl = cx_strchr(cx_strsubs(nl, 1), '\n'); |
| 119 } else { |
119 } else { |
| 120 break; |
120 break; |