bugfix: keywords are sorted
This commit is contained in:
parent
5eba93d584
commit
c0a3d44060
5 changed files with 15 additions and 12 deletions
|
|
@ -41,11 +41,12 @@ type
|
||||||
tkGeneric, tkIf, tkImport, tkIn, tkInclude, tkInterface,
|
tkGeneric, tkIf, tkImport, tkIn, tkInclude, tkInterface,
|
||||||
tkIs, tkIsnot, tkIterator,
|
tkIs, tkIsnot, tkIterator,
|
||||||
tkLambda, tkLet,
|
tkLambda, tkLet,
|
||||||
tkMacro, tkMethod, tkMixin, tkUsing, tkMod, tkNil, tkNot, tkNotin,
|
tkMacro, tkMethod, tkMixin, tkMod, tkNil, tkNot, tkNotin,
|
||||||
tkObject, tkOf, tkOr, tkOut,
|
tkObject, tkOf, tkOr, tkOut,
|
||||||
tkProc, tkPtr, tkRaise, tkRef, tkReturn, tkShared, tkShl, tkShr, tkStatic,
|
tkProc, tkPtr, tkRaise, tkRef, tkReturn, tkShared, tkShl, tkShr, tkStatic,
|
||||||
tkTemplate,
|
tkTemplate,
|
||||||
tkTry, tkTuple, tkType, tkVar, tkWhen, tkWhile, tkWith, tkWithout, tkXor,
|
tkTry, tkTuple, tkType, tkUsing,
|
||||||
|
tkVar, tkWhen, tkWhile, tkWith, tkWithout, tkXor,
|
||||||
tkYield, # end of keywords
|
tkYield, # end of keywords
|
||||||
tkIntLit, tkInt8Lit, tkInt16Lit, tkInt32Lit, tkInt64Lit,
|
tkIntLit, tkInt8Lit, tkInt16Lit, tkInt32Lit, tkInt64Lit,
|
||||||
tkUIntLit, tkUInt8Lit, tkUInt16Lit, tkUInt32Lit, tkUInt64Lit,
|
tkUIntLit, tkUInt8Lit, tkUInt16Lit, tkUInt32Lit, tkUInt64Lit,
|
||||||
|
|
@ -75,12 +76,13 @@ const
|
||||||
"finally", "for", "from", "generic", "if",
|
"finally", "for", "from", "generic", "if",
|
||||||
"import", "in", "include", "interface", "is", "isnot", "iterator",
|
"import", "in", "include", "interface", "is", "isnot", "iterator",
|
||||||
"lambda", "let",
|
"lambda", "let",
|
||||||
"macro", "method", "mixin", "using", "mod",
|
"macro", "method", "mixin", "mod",
|
||||||
"nil", "not", "notin", "object", "of", "or",
|
"nil", "not", "notin", "object", "of", "or",
|
||||||
"out", "proc", "ptr", "raise", "ref", "return",
|
"out", "proc", "ptr", "raise", "ref", "return",
|
||||||
"shared", "shl", "shr", "static",
|
"shared", "shl", "shr", "static",
|
||||||
"template",
|
"template",
|
||||||
"try", "tuple", "type", "var", "when", "while", "with", "without", "xor",
|
"try", "tuple", "type", "using",
|
||||||
|
"var", "when", "while", "with", "without", "xor",
|
||||||
"yield",
|
"yield",
|
||||||
"tkIntLit", "tkInt8Lit", "tkInt16Lit", "tkInt32Lit", "tkInt64Lit",
|
"tkIntLit", "tkInt8Lit", "tkInt16Lit", "tkInt32Lit", "tkInt64Lit",
|
||||||
"tkUIntLit", "tkUInt8Lit", "tkUInt16Lit", "tkUInt32Lit", "tkUInt64Lit",
|
"tkUIntLit", "tkUInt8Lit", "tkUInt16Lit", "tkUInt32Lit", "tkUInt64Lit",
|
||||||
|
|
|
||||||
|
|
@ -28,9 +28,9 @@ type
|
||||||
wElif, wElse, wEnd, wEnum, wExcept, wExport,
|
wElif, wElse, wEnd, wEnum, wExcept, wExport,
|
||||||
wFinally, wFor, wFrom, wGeneric, wIf, wImport, wIn,
|
wFinally, wFor, wFrom, wGeneric, wIf, wImport, wIn,
|
||||||
wInclude, wInterface, wIs, wIsnot, wIterator, wLambda, wLet,
|
wInclude, wInterface, wIs, wIsnot, wIterator, wLambda, wLet,
|
||||||
wMacro, wMethod, wMixin, wUsing, wMod, wNil,
|
wMacro, wMethod, wMixin, wMod, wNil,
|
||||||
wNot, wNotin, wObject, wOf, wOr, wOut, wProc, wPtr, wRaise, wRef, wReturn,
|
wNot, wNotin, wObject, wOf, wOr, wOut, wProc, wPtr, wRaise, wRef, wReturn,
|
||||||
wShared, wShl, wShr, wStatic, wTemplate, wTry, wTuple, wType, wVar,
|
wShared, wShl, wShr, wStatic, wTemplate, wTry, wTuple, wType, wUsing, wVar,
|
||||||
wWhen, wWhile, wWith, wWithout, wXor, wYield,
|
wWhen, wWhile, wWith, wWithout, wXor, wYield,
|
||||||
|
|
||||||
wColon, wColonColon, wEquals, wDot, wDotDot,
|
wColon, wColonColon, wEquals, wDot, wDotDot,
|
||||||
|
|
@ -95,7 +95,7 @@ const
|
||||||
|
|
||||||
cppNimSharedKeywords* = {
|
cppNimSharedKeywords* = {
|
||||||
wAsm, wBreak, wCase, wConst, wContinue, wDo, wElse, wEnum, wExport,
|
wAsm, wBreak, wCase, wConst, wContinue, wDo, wElse, wEnum, wExport,
|
||||||
wFor, wIf, wReturn, wStatic, wTemplate, wTry, wWhile, wUsing }
|
wFor, wIf, wReturn, wStatic, wTemplate, wTry, wWhile, wUsing}
|
||||||
|
|
||||||
specialWords*: array[low(TSpecialWord)..high(TSpecialWord), string] = ["",
|
specialWords*: array[low(TSpecialWord)..high(TSpecialWord), string] = ["",
|
||||||
|
|
||||||
|
|
@ -107,11 +107,11 @@ const
|
||||||
"finally", "for", "from", "generic", "if",
|
"finally", "for", "from", "generic", "if",
|
||||||
"import", "in", "include", "interface", "is", "isnot", "iterator",
|
"import", "in", "include", "interface", "is", "isnot", "iterator",
|
||||||
"lambda", "let",
|
"lambda", "let",
|
||||||
"macro", "method", "mixin", "using", "mod", "nil", "not", "notin",
|
"macro", "method", "mixin", "mod", "nil", "not", "notin",
|
||||||
"object", "of", "or",
|
"object", "of", "or",
|
||||||
"out", "proc", "ptr", "raise", "ref", "return",
|
"out", "proc", "ptr", "raise", "ref", "return",
|
||||||
"shared", "shl", "shr", "static",
|
"shared", "shl", "shr", "static",
|
||||||
"template", "try", "tuple", "type", "var",
|
"template", "try", "tuple", "type", "using", "var",
|
||||||
"when", "while", "with", "without", "xor",
|
"when", "while", "with", "without", "xor",
|
||||||
"yield",
|
"yield",
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,13 +7,14 @@ finally for from
|
||||||
generic
|
generic
|
||||||
if import in include interface is isnot iterator
|
if import in include interface is isnot iterator
|
||||||
lambda let
|
lambda let
|
||||||
macro method mixin using mod
|
macro method mixin mod
|
||||||
nil not notin
|
nil not notin
|
||||||
object of or out
|
object of or out
|
||||||
proc ptr
|
proc ptr
|
||||||
raise ref return
|
raise ref return
|
||||||
shared shl shr static
|
shared shl shr static
|
||||||
template try tuple type
|
template try tuple type
|
||||||
|
using
|
||||||
var
|
var
|
||||||
when while with without
|
when while with without
|
||||||
xor
|
xor
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ const
|
||||||
"interface", "is", "isnot", "iterator", "lambda", "let", "macro", "method",
|
"interface", "is", "isnot", "iterator", "lambda", "let", "macro", "method",
|
||||||
"mixin", "mod", "nil", "not", "notin", "object", "of", "or", "out", "proc",
|
"mixin", "mod", "nil", "not", "notin", "object", "of", "or", "out", "proc",
|
||||||
"ptr", "raise", "ref", "return", "shared", "shl", "shr", "static",
|
"ptr", "raise", "ref", "return", "shared", "shl", "shr", "static",
|
||||||
"template", "try", "tuple", "type", "var", "when", "while", "with",
|
"template", "try", "tuple", "type", "using", "var", "when", "while", "with",
|
||||||
"without", "xor", "yield"]
|
"without", "xor", "yield"]
|
||||||
|
|
||||||
proc getSourceLanguage*(name: string): TSourceLanguage =
|
proc getSourceLanguage*(name: string): TSourceLanguage =
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
discard """
|
discard """
|
||||||
output: '''110
|
output: '''3060
|
||||||
true'''
|
true'''
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue