public override string GetValueInContext( CollatingSequence usedCollatingSequence, bool apostCompilerOption, IDictionary <string, string> symbolicCharactersMap, int charactersCountContext) { char repeatedChar = base.GetCharValueInContext(usedCollatingSequence, apostCompilerOption, symbolicCharactersMap); return(new string(repeatedChar, charactersCountContext)); }
public char GetCharValueInContext( CollatingSequence usedCollatingSequence, bool apostCompilerOption, IDictionary <string, string> symbolicCharactersMap) { string strValue = base.GetValueInContext(usedCollatingSequence, apostCompilerOption, symbolicCharactersMap, 1); if (!String.IsNullOrEmpty(strValue)) { return(strValue[0]); } else { throw new InvalidOperationException("Unexpected literal token type"); } }
public virtual string GetValueInContext( CollatingSequence usedCollatingSequence, bool apostCompilerOption, IDictionary <string, string> symbolicCharactersMap, int charactersCountContext) { if (IsSymbolicCharacterReference) { string symbolicCharacterValue = null; if (symbolicCharactersMap.TryGetValue(Token.Text, out symbolicCharacterValue)) { return(symbolicCharacterValue); } else { throw new InvalidOperationException("Undefined symbolic character reference"); } } switch (Token.TokenType) { case TokenType.HIGH_VALUE: case TokenType.HIGH_VALUES: // Represents one or more occurrences of the character that has // the highest/lowest ordinal position in the collating sequence used. return(usedCollatingSequence.GetHighValueChar().ToString()); case TokenType.LOW_VALUE: case TokenType.LOW_VALUES: // Represents one or more occurrences of the character that has // the highest/lowest ordinal position in the collating sequence used. return(usedCollatingSequence.GetLowValueChar().ToString()); case TokenType.QUOTE: case TokenType.QUOTES: // The quotation mark character ("), if the QUOTE compiler option is in effect // The apostrophe character (’), if the APOST compiler option is in effect if (apostCompilerOption) { return("'"); } else { return("\""); } default: return(Value); } }
public override string GetValueInContext(CollatingSequence sequence, bool option, IDictionary <string, string> map, int count) { return(value); }