protected override void InitDetails(ParsingContext context, CompoundTerminalBase.CompoundTokenDetails details) { base.InitDetails(context, details); if (context.VsLineScanState.Value != 0) { //we are continuing partial string on the next line details.Flags = context.VsLineScanState.TerminalFlags; details.SubTypeIndex = context.VsLineScanState.TokenSubType; var stringInfo = _subtypes[context.VsLineScanState.TokenSubType]; details.StartSymbol = stringInfo.Start; details.EndSymbol = stringInfo.End; } }
protected override void ReadSuffix(ISourceStream source, CompoundTerminalBase.CompoundTokenDetails details) { base.ReadSuffix(source, details); //"char" type can be identified by suffix (like VB where c suffix identifies char) // in this case we have details.TypeCodes[0] == char and we need to set the IsChar flag if (details.TypeCodes != null && details.TypeCodes[0] == TypeCode.Char) { details.Flags |= (int)StringOptions.IsChar; } else //we may have IsChar flag set (from startEndSymbol, like in c# single quote identifies char) // in this case set type code if (details.IsSet((short)StringOptions.IsChar)) { details.TypeCodes = new TypeCode[] { TypeCode.Char } } ; }