Commit c43355f0 authored by Miklos Magyari's avatar Miklos Magyari
Browse files

Fixed partition scanner not to detect comments inside strings (issue #476)


Signed-off-by: Miklos Magyari's avatarMiklos Magyari <miklos.magyari@sigmatechnology.se>
parent 3046f0bf
......@@ -30,9 +30,10 @@ public final class PartitionScanner extends RuleBasedPartitionScanner {
public PartitionScanner() {
IToken commentToken = new Token(TTCN3_COMMENT);
IPredicateRule[] rules = new IPredicateRule[2];
rules[0] = new MultiLineRule("/*", "*/", commentToken, '\0', true);
rules[1] = new EndOfLineRule("//", commentToken);
IPredicateRule[] rules = new IPredicateRule[3];
rules[0] = new TTCN3StringDetectionPatternRule(new Token(""));
rules[1] = new MultiLineRule("/*", "*/", commentToken, '\0', true);
rules[2] = new EndOfLineRule("//", commentToken);
setPredicateRules(rules);
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment