isoloviev / google-code-prettify

Automatically exported from code.google.com/p/google-code-prettify
Apache License 2.0
0 stars 0 forks source link

C# language inherits Java's specific keywords, but actually only has a few of them #283

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
From prettify.js:

  var JAVA_KEYWORDS = [COMMON_KEYWORDS,
      "abstract,assert,boolean,byte,extends,final,finally,implements,import," +
      "instanceof,interface,null,native,package,strictfp,super,synchronized," +
      "throws,transient"];
  var CSHARP_KEYWORDS = [JAVA_KEYWORDS, …];

Of all the Java keywords, only the following few are actually also keywords in 
C#:

* abstract
* byte
* finally
* interface
* null

While the majority are not keywords in C#:

* assert
* boolean
* extends
* final
* implements
* import
* instanceof
* native
* package
* strictfp
* super
* synchronized
* throws
* transient

Therefore, please remove the Java keyword inheritance for C#.

Original issue reported on code.google.com by schup...@eml.cc on 10 May 2013 at 5:57

GoogleCodeExporter commented 8 years ago
For reference, here the list of C# keywords:
http://msdn.microsoft.com/en-us/library/x53a06bb.aspx

And here is the Java one:
http://docs.oracle.com/javase/tutorial/java/nutsandbolts/_keywords.html
http://en.wikipedia.org/wiki/List_of_Java_keywords

Original comment by amroamro...@gmail.com on 22 May 2013 at 12:11

GoogleCodeExporter commented 8 years ago
Done.

Original comment by mikesamuel@gmail.com on 26 Jun 2013 at 5:38