Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C# PROPOSAL: Add more option to escape from string template #21983

Closed
ParserApprentice opened this issue Sep 8, 2017 · 2 comments
Closed

C# PROPOSAL: Add more option to escape from string template #21983

ParserApprentice opened this issue Sep 8, 2017 · 2 comments

Comments

@ParserApprentice
Copy link

ParserApprentice commented Sep 8, 2017

C# PROPOSAL: Add more option to escape from string template

VS2017,

Current Status :
with C#7 local function,
I can use it as a string template for external lang.
eg.
cs_prop1

and this is the simple result ...
cs_prop2

or json text
cs_prop1_1

and the result...

cs_prop2_1

What I want to PROPOSE

"Add more option to escape from string template"
Currently, It may be specific after $

eg Razor style, $@@""

cs_prop3

cs-parse found $ and follow by @@
cs-parse should escape when it found @ in the string literal
as if it found { } in C#7 , (see Razor as example)

(and more)
eg. Json

cs_prop4

currently
other algorithms of string template should remain the same.

I think it would be useful in many aspects.
eg

  1. local data template definition
  2. easy integration with some small data in xml or json format
  3. for the IntelliSense,
    the IDE can escape from the C# parsing context
    and go to another proper parsing context (eg xml, json , css etc..)

Hope you consider this,
or suggest me if you have other ways

Thank you

@svick
Copy link
Contributor

svick commented Sep 8, 2017

Proposals to change the C# language belong in the csharplang repo. Could you move this issue there?

@ParserApprentice
Copy link
Author

This issue was moved to dotnet/csharplang#890

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants