Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Dropping D keywords' relevance to the baseline of 1 (mostly) to simpl…

…ify things.
  • Loading branch information...
commit 1abf336ad3d23706756c10182d072046bdb6d92a 1 parent 7612789
@isagalaev authored
Showing with 19 additions and 19 deletions.
  1. +19 −19 src/languages/d.js
View
38 src/languages/d.js
@@ -31,38 +31,38 @@ hljs.LANGUAGES.d = function() {
*/
var D_KEYWORDS = {
keyword: {
- 'abstract': 1, 'alias': 5, 'align': 5, 'asm': 1, 'assert': 10, 'auto': 10,
- 'body': 5, 'break': 1, 'byte': 1,
+ 'abstract': 1, 'alias': 1, 'align': 1, 'asm': 1, 'assert': 1, 'auto': 1,
+ 'body': 1, 'break': 1, 'byte': 1,
'case': 1, 'cast': 1, 'catch': 1, 'class': 1, 'const': 1, 'continue': 1,
- 'debug': 5, 'default': 1, 'delete': 1, 'deprecated': 5, 'do': 1,
+ 'debug': 1, 'default': 1, 'delete': 1, 'deprecated': 1, 'do': 1,
'else': 1, 'enum': 1, 'export': 1, 'extern': 1,
- 'final': 1, 'finally': 1, 'for': 1, 'foreach': 5, 'foreach_reverse': 10,
+ 'final': 1, 'finally': 1, 'for': 1, 'foreach': 1, 'foreach_reverse': 10,
'goto': 1,
- 'if': 1, 'immutable': 5, 'import': 1, 'in': 2, 'inout': 10, 'int': 1, 'interface': 1, 'invariant': 5, 'is': 5,
- 'lazy': 10,
- 'macro': 2, 'mixin': 3, 'module': 2,
- 'new': 1, 'nothrow': 5,
+ 'if': 1, 'immutable': 1, 'import': 1, 'in': 1, 'inout': 1, 'int': 1, 'interface': 1, 'invariant': 1, 'is': 1,
+ 'lazy': 1,
+ 'macro': 1, 'mixin': 1, 'module': 1,
+ 'new': 1, 'nothrow': 1,
'out': 1, 'override': 1,
- 'package': 1, 'pragma': 1, 'private': 1, 'protected': 1, 'public': 1, 'pure': 5,
+ 'package': 1, 'pragma': 1, 'private': 1, 'protected': 1, 'public': 1, 'pure': 1,
'ref': 1, 'return': 1,
- 'scope': 5, 'shared': 5, 'static': 1, 'struct': 1, 'super': 1, 'switch': 1, 'synchronized': 1,
- 'template': 2, 'this': 1, 'throw': 1, 'try': 1, 'typedef': 1, 'typeid': 5, 'typeof': 1,
- 'union': 1, 'unittest': 5,
- 'version': 5, 'void': 1, 'volatile': 1,
+ 'scope': 1, 'shared': 1, 'static': 1, 'struct': 1, 'super': 1, 'switch': 1, 'synchronized': 1,
+ 'template': 1, 'this': 1, 'throw': 1, 'try': 1, 'typedef': 1, 'typeid': 1, 'typeof': 1,
+ 'union': 1, 'unittest': 1,
+ 'version': 1, 'void': 1, 'volatile': 1,
'while': 1, 'with': 1,
- '__FILE__': 1, '__LINE__': 1, '__gshared': 5, '__thread': 5, '__traits': 10,
- '__DATE__': 2, '__EOF__': 2, '__TIME__': 2, '__TIMESTAMP__': 2, '__VENDOR__': 2, '__VERSION__': 2
+ '__FILE__': 1, '__LINE__': 1, '__gshared': 10, '__thread': 10, '__traits': 10,
+ '__DATE__': 1, '__EOF__': 1, '__TIME__': 1, '__TIMESTAMP__': 1, '__VENDOR__': 1, '__VERSION__': 1
},
built_in: {
'bool': 1,
- 'cdouble': 5, 'cent': 5, 'cfloat': 5, 'char': 1, 'creal': 5,
- 'dchar': 10, 'delegate': 5, 'double': 1, 'dstring': 10,
+ 'cdouble': 1, 'cent': 1, 'cfloat': 1, 'char': 1, 'creal': 1,
+ 'dchar': 1, 'delegate': 1, 'double': 1, 'dstring': 1,
'float': 1, 'function': 1,
- 'idouble': 5, 'ifloat': 5, 'ireal': 5,
+ 'idouble': 1, 'ifloat': 1, 'ireal': 1,
'long': 1,
'real': 1,
'short': 1, 'string': 1,
- 'ubyte': 5, 'ucent': 5, 'uint': 5, 'ulong': 5, 'ushort': 5,
+ 'ubyte': 1, 'ucent': 1, 'uint': 1, 'ulong': 1, 'ushort': 1,
'wchar': 1, 'wstring': 1
},
literal: {

3 comments on commit 1abf336

@xfix

foreach was 5? Seriously? That makes me wonder how it passed. As far I know, it's keyword in PHP and Perl and possibly other languages.

@isagalaev
Owner

Well, I have to admit that dealing with relevance is more of a black magic for new contributors. This is why I routinely go over the code and simplify things like this that I notice.

@xfix

I've checked more. Also C#, Tcl and Windows PowerShell have this keyword.

Also, I have noticed is. I think that Python and CoffeeScript have it and there are already accepted proposals to add it to next edition of JavaScript. And it's one of methods in jQuery. Such two letter properties are dangerous anyways.

Please sign in to comment.
Something went wrong with that request. Please try again.