private TexlNode ParseReplaceableExpr() { Contracts.Assert(_curs.TidCur == TokKind.ReplaceableLit); ReplaceableToken tok = _curs.TokMove().As <ReplaceableToken>(); Contracts.AssertValue(tok); if (tok.Value.StartsWith(TexlLexer.LocalizedTokenDelimiterStr, StringComparison.OrdinalIgnoreCase) || tok.Value.StartsWith(TexlLexer.ContextDependentTokenDelimiterStr, StringComparison.OrdinalIgnoreCase)) { return(new ReplaceableNode(ref _idNext, tok)); } return(CreateError(tok, TexlStrings.ErrBadToken)); }
public ReplaceableNode(ref int idNext, ReplaceableToken tok) : base(ref idNext, tok, new SourceList(tok)) { Value = tok.Value; Contracts.AssertValue(Value); }