git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5380 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
d4f0469dbe
commit
63d000e9c5
1 changed files with 15 additions and 5 deletions
|
@ -285,16 +285,26 @@ int CEXEBuild::doParse(const char *str)
|
|||
if (m_linebuild.getlen()>1)
|
||||
m_linebuild.resize(m_linebuild.getlen()-2);
|
||||
|
||||
// warn of comment with line-continuation
|
||||
if (m_linebuild.getlen())
|
||||
{
|
||||
LineParser prevline(inside_comment);
|
||||
prevline.parse((char*)m_linebuild.get());
|
||||
LineParser thisline(inside_comment);
|
||||
thisline.parse((char*)str);
|
||||
|
||||
if (prevline.inComment() && !thisline.inComment())
|
||||
{
|
||||
warning_fl("comment contains line-continuation character, following line will be ignored");
|
||||
}
|
||||
}
|
||||
|
||||
// add new line to line buffer
|
||||
m_linebuild.add(str,strlen(str)+1);
|
||||
|
||||
// keep waiting for more lines, if this line ends with a backslash
|
||||
if (str[0] && CharPrev(str,str+strlen(str))[0] == '\\')
|
||||
{
|
||||
line.parse((char*)m_linebuild.get());
|
||||
if (line.inComment())
|
||||
{
|
||||
warning_fl("comment contains line-continuation character, following line will be ignored");
|
||||
}
|
||||
return PS_OK;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue