{
if(!c || text[c-1] != '/') lastWasStar = true;
}
- else if(!inSingleLineComment && !inMultiLineComment && !inQuotes && ch == '\"')
+ else if(ch == '\"' && !inSingleLineComment && !inMultiLineComment && !inQuotes)
{
if(inString && !wasEscaped)
{
inString = true;
}
}
- else if(!inSingleLineComment && !inMultiLineComment && !inString && ch == '\'')
+ else if(ch == '\'' && !inSingleLineComment && !inMultiLineComment && !inString)
{
if(inQuotes && !wasEscaped)
inQuotes = false;
if(!wasEscaped)
escaped = true;
}
- else
+ else if(ch == '#' && !inQuotes && !inString && !inMultiLineComment && !inSingleLineComment)
{
- if(!inQuotes && !inString && !inMultiLineComment && !inSingleLineComment && ch == '#')
+ if(firstWord)
{
- if(firstWord)
- {
- inPrep = true;
- }
+ inPrep = true;
}
}
- firstWord = false;
+ else if(ch != ' ' && ch != '\t')
+ firstWord = false;
}
continuedSingleLineComment = inSingleLineComment && (line.count && line.text[line.count - 1] == '\\');
}