Skip to content

Report printf formatter strings or specifiers #174

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

Closed
rojepp opened this issue Jul 3, 2014 · 3 comments · Fixed by #272
Closed

Report printf formatter strings or specifiers #174

rojepp opened this issue Jul 3, 2014 · 3 comments · Fixed by #272

Comments

@rojepp
Copy link
Contributor

rojepp commented Jul 3, 2014

Context: fsprojects/zarchive-fsharpbinding#603

I'm implementing highlighting for printf specifiers, and the feature could get greater coverage if symbols were reported from FCS. Don mentioned that FCS could be adjusted to report symbols for printf specifiers and/or whole formatting strings, so I'm adding this request here.

An implementation should perhaps already leave room for the new printf format, should it be accepted. We might like to do different highlighting depending depending on which type of specifier it is.

This new symbol would be returned in GetAllUsesOfAllSymbolsInFile, perhaps others.

@7sharp9
Copy link
Member

7sharp9 commented Jul 22, 2014

I would like to understand where the symbol would be?

     §1  §2 §3
printfn "%s %i" "hello" 42

Would §1 §2 §3 all return symbols?

@dsyme
Copy link
Contributor

dsyme commented Jul 28, 2014

I think the idea is that "format string resolutions" would be reported via a new method.

dsyme added a commit to dsyme/FSharp.Compiler.Service that referenced this issue Nov 14, 2014
@dsyme
Copy link
Contributor

dsyme commented Nov 14, 2014

I did a pair programming session with @dungpa and we made a rough prototype of the changes that would be needed to implement this: https://github.com/dsyme/FSharp.Compiler.Service/tree/printf-specifiers. @dungpa will take it from here :)

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

Successfully merging a pull request may close this issue.

4 participants