This compiler error will occur if a string is not terminated (ie. there is no matching apostrophe at the end of the string). For example:
if WeekdayOf(Today()) in [6,7]
sRESULT = 'Weekend !
To prevent such errors, always write both apostophes, '', used for strings, at the same time, and only then go back and fill out the text inside (this is analogous to the method of writing skeleton blocks when using block structures).