private static bool InRangeOf(IOilexerGrammarToken token, LineColumnPair start, LineColumnPair end) { bool nullWidthElement = start == end; if ((token.Line >= start.Line && token.Line <= end.Line)) { if (token.Line == start.Line) { if (start.Line == end.Line) { return(!nullWidthElement ? (token.Column + token.Length >= start.Column && token.Column + token.Length < end.Column) : token.Column == start.Column); } else { return(token.Column + token.Length >= start.Column); } } else if (token.Line == end.Line) { return(token.Column < end.Column); } else { return(true); } } return(false); }
protected override void PerformReclassification(IOilexerGrammarToken token, OilexerGrammarTokenType newClassification) { var currentTokenTag = this.tokens[token]; var newTokenTag = new GDTagSpan(currentTokenTag.Span, token, this.classificationTypes[newClassification]); this.tokens[token] = newTokenTag; }
protected override void PerformReclassification(IOilexerGrammarToken token, OilexerGrammarTokenType newClassification) { /* * * Reclassifications aren't necessary on the files used to * assist in identity resolution. * */ }
internal void ReclassifyToken(IOilexerGrammarToken token, ReclassificationKind kind) { switch (kind) { case ReclassificationKind.Keyword: case ReclassificationKind.NativeMethod: reclassifications.Add(token, OilexerGrammarTokenType.Keyword); break; case ReclassificationKind.Error: reclassifications.Add(token, OilexerGrammarTokenType.Error); break; } }
protected abstract void PerformReclassification(IOilexerGrammarToken token, OilexerGrammarTokenType newClassification);
public GDTokenTag(IOilexerGrammarToken token, IClassificationType classificationType) : base(classificationType) { this.Token = token; }
public GDTagSpan(SnapshotSpan span, IOilexerGrammarToken token, IClassificationType classificationType) : base(span, new GDTokenTag(token, classificationType)) { }