private static Pattern CodePart() { QuantifiedPattern whileNot = WhileNotChar('\'', '"', '@', '/', '}', '$'); return(whileNot + MaybeMany( Any( NamedGroup("text", Snippets.CSharpEscapedTextLiteral()), NamedGroup("text", Snippets.CSharpVerbatimTextLiteral()), NamedGroup("char", Snippets.CSharpCharacterLiteral()), NamedGroup("comment", Snippets.CSharpMultilineComment()) ) + whileNot )); }
private static Pattern TextPart() { QuantifiedPattern whileNot = WhileNotChar('\\', '{', '"'); return(NamedGroup("text", whileNot + MaybeMany( Any( '\\' + NotNewLineChar(), "{{" ) + whileNot ) )); }