This project is read-only.

Change keywords: private => priv, public => pub

Topics: General
Apr 4, 2014 at 3:41 PM
Edited Jul 22, 2014 at 8:49 AM
Subject. Thank you for any help.
Apr 4, 2014 at 5:36 PM
Hi John,

Just curious, if you want to create a new language, you might want to grab something like ANTLR, how will Roslyn help you then?


Apr 4, 2014 at 6:00 PM
Edited Jul 22, 2014 at 8:45 AM
Apr 5, 2014 at 1:06 PM
Edited Apr 5, 2014 at 1:07 PM
Would it be enough for you to be able to define synonyms for existing keywords and types and their combinatins?

For example:
using @xprop = [XmlElement] public string { get; set; }

public class Student
    @xprop Name;
    @xprop Address;
Apr 5, 2014 at 7:41 PM
Hi John,

It appears you can use the GetKeywordKind and GetText in SyntaxFacts.cs for that.

I have for example modified 'namespace' to 'module', 'class' to 'cls', and 'using' to 'import'. This enables code like this:
import Console =System.Console;

module ConsoleApplication1
    cls Program
Please note that this doesn't seem to work always. I've tried to modify 'static' and 'virtual' but (unless I've done something) wrong, it does seem that this doesn't work Always.
Apr 13, 2014 at 12:19 AM
Edited Jul 22, 2014 at 8:44 AM
Apr 13, 2014 at 2:55 AM
@John2014 Searching for SyntaxFacts in the Roslyn source browser shows that it's a partial type. Both of the mentioned methods are in SyntaxKindFacts.cs.
Apr 24, 2014 at 2:57 PM
Edited Apr 26, 2014 at 7:42 PM
Jun 17, 2014 at 9:58 AM
Edited Aug 19, 2014 at 8:27 AM
Looks like we can't use words for public|static|internal|private|protected > 9 chars.