Quantcast

RFC: Editor Placeholder Support

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RFC: Editor Placeholder Support

Daniel Marjamäki via cfe-dev
Hi,

I would like to add support for editor placeholder to Clang's lexer. The placeholder tokens will function similarly to the placeholders in the Swift compiler:

- An editor placeholder token starts with '<#' and ends with '#>'.
- When lexing the source that contains placeholders:
  - Clang will report an error when it finds the placeholder token.
  - Then the lexer will treat the placeholders as if they were expanded, e.g. given:

  void Class::method(<#int x#>)

The parser will see the tokens that correspond to the following source:

  void Class::method(int x)

Do you have any feedback/requests? Should placeholders be recognized at all times or just when Clang is used by the editor?

Cheers,
Alex


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Loading...