diff options
Diffstat (limited to 'src/code.l')
-rw-r--r-- | src/code.l | 43 |
1 files changed, 37 insertions, 6 deletions
@@ -122,6 +122,7 @@ static bool g_insideJava; static bool g_insideCS; static bool g_insidePHP; static bool g_insideProtocolList; +static bool g_insideSlice; static bool g_lexInit = FALSE; @@ -1834,7 +1835,8 @@ KEYWORD_OBJC ("@public"|"@private"|"@protected"|"@class"|"@implementation"|"@int KEYWORD ("asm"|"__assume"|"auto"|"class"|"const"|"delete"|"enum"|"explicit"|"extern"|"false"|"friend"|"gcnew"|"gcroot"|"set"|"get"|"inline"|"internal"|"mutable"|"namespace"|"new"|"null"|"nullptr"|"override"|"operator"|"pin_ptr"|"private"|"protected"|"public"|"raise"|"register"|"remove"|"self"|"sizeof"|"static"|"struct"|"__super"|"function"|"template"|"generic"|"this"|"true"|"typedef"|"typeid"|"typename"|"union"|"using"|"virtual"|"volatile"|"abstract"|"final"|"import"|"synchronized"|"transient"|"alignas"|"alignof"|{KEYWORD_OBJC}) FLOWKW ("break"|"catch"|"continue"|"default"|"do"|"else"|"finally"|"return"|"switch"|"throw"|"throws"|"@catch"|"@finally") FLOWCONDITION ("case"|"for"|"foreach"|"for each"|"goto"|"if"|"try"|"while"|"@try") -TYPEKW ("bool"|"byte"|"char"|"double"|"float"|"int"|"long"|"object"|"short"|"signed"|"unsigned"|"void"|"wchar_t"|"size_t"|"boolean"|"id"|"SEL"|"string"|"nullptr"|"LocalObject"|"Object"|"Value") +TYPEKW ("bool"|"byte"|"char"|"double"|"float"|"int"|"long"|"object"|"short"|"signed"|"unsigned"|"void"|"wchar_t"|"size_t"|"boolean"|"id"|"SEL"|"string"|"nullptr") +TYPEKWSL ("LocalObject"|"Object"|"Value") CASTKW ("const_cast"|"dynamic_cast"|"reinterpret_cast"|"static_cast") CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'")) ARITHOP "+"|"-"|"/"|"*"|"%"|"--"|"++" @@ -2542,6 +2544,20 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" addType(); g_name+=yytext; } +<Body,TemplDecl,ObjCMethod>{TYPEKWSL}/{B}* { + if (!g_insideSlice) + { + REJECT; + } + else + { + startFontClass("keywordtype"); + g_code->codify(yytext); + endFontClass(); + addType(); + g_name+=yytext; + } + } <Body>"generic"/{B}*"<"[^\n\/\-\.\{\"\>]*">"{B}* { startFontClass("keyword"); g_code->codify(yytext); @@ -3013,6 +3029,20 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" g_code->codify(yytext); endFontClass(); } +<MemberCall2,FuncCall,OldStyleArgs,TemplCast>{TYPEKWSL}/([^a-z_A-Z0-9]) { + if (!g_insideSlice) + { + REJECT; + } + else + { + addParmType(); + g_parmName=yytext; + startFontClass("keywordtype"); + g_code->codify(yytext); + endFontClass(); + } + } <MemberCall2,FuncCall>{FLOWKW}/([^a-z_A-Z0-9]) { addParmType(); g_parmName=yytext; @@ -3759,11 +3789,12 @@ void parseCCode(CodeOutputInterface &od,const char *className,const QCString &s, g_sourceFileDef = new FileDef("",(exName?exName:"generated")); cleanupSourceDef = TRUE; } - g_insideObjC = lang==SrcLangExt_ObjC; - g_insideJava = lang==SrcLangExt_Java; - g_insideCS = lang==SrcLangExt_CSharp; - g_insidePHP = lang==SrcLangExt_PHP; - g_insideCpp = lang==SrcLangExt_Cpp; + g_insideObjC = lang==SrcLangExt_ObjC; + g_insideJava = lang==SrcLangExt_Java; + g_insideCS = lang==SrcLangExt_CSharp; + g_insidePHP = lang==SrcLangExt_PHP; + g_insideCpp = lang==SrcLangExt_Cpp; + g_insideSlice = lang==SrcLangExt_Slice; if (g_sourceFileDef) { setCurrentDoc("l00001"); |