"Fossies" - the Fresh Open Source Software Archive

Member "highlight-3.57-x64/langDefs/c.lang" (12 May 2020, 2640 Bytes) of package /windows/www/highlight-3.57-x64.zip:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "c.lang": 3.56_vs_3.57.

    1 
    2 Description="C and C++"
    3 
    4 Categories = {"source"}
    5 
    6 Digits = [[ (?:0x|0X|0b)[0-9a-fA-F']+|\d*[\.]?\d+(?:[eE][\-\+]\d+)?[lLuU]* ]]
    7 
    8 Keywords={
    9   { Id=1,
   10     List={
   11       "goto", "break", "return", "continue", "asm", "case", "default", "if", "else", "switch", "while", "for", "do", "sizeof",
   12       "typeof", "stdcall", "cdecl", "const_cast", "delete", "dynamic_cast", "goto", "namespace", "new", "pascal",
   13       "reinterpret_cast", "static_cast", "this", "throw", "try", "catch", "using", "true", "false", "bitand", "and", "bitor", "or", "xor",
   14       "compl", "and_eq", "or_eq", "xor_eq", "not", "not_eq", "assert", "static_assert",
   15       "alignas","alignof","concept","consteval","constexpr","constinit","co_await","co_return","co_yield","decltype",
   16       "noexcept","requires","thread_local",
   17     }
   18   },
   19   { Id=2,
   20     List= {
   21       "int", "long", "short", "char", "void", "signed", "unsigned", "float", "double", "size_t", "wchar_t",
   22       "ptrdiff_t", "sig_atomic_t", "fpos_t", "clock_t", "time_t", "va_list", "jmp_buf", "FILE", "DIR", "div_t", "ldiv_t", "static",
   23       "mbstate_t", "wctrans_t", "wint_t", "wctype_t", "const", "bool", "complex", "struct", "union", "enum",
   24       "int8_t", "int16_t", "int32_t", "int64_t", "uint8_t", "uint16_t", "uint32_t", "uint64_t", "int_least8_t", "int_least16_t",
   25       "int_least32_t", "int_least64_t", "uint_least8_t", "uint_least16_t", "uint_least32_t", "uint_least64_t",
   26       "int_fast8_t", "int_fast16_t", "int_fast32_t", "int_fast64_t", "uint_fast8_t", "uint_fast16_t", "uint_fast32_t",
   27       "uint_fast64_t", "intptr_t", "uintptr_t", "intmax_t", "uintmax_t", "char8_t","char16_t","char32_t"
   28     }
   29   },
   30   { Id=3,
   31     List= {
   32       "typedef", "inline", "auto", "class", "explicit", "extern", "friend", "inline", "mutable", "operator",
   33       "register", "template", "private", "protected", "public", "typeid", "virtual", "volatile", "constexpr", "nullptr", "decltype"
   34     }
   35   },
   36   { Id=3,
   37     Regex=[[(\w+)\s*\:\:]]
   38   },
   39   { Id=4,
   40     Regex=[[(\w+)\s*\(]]
   41   }
   42 }
   43 
   44 Strings = {
   45   Delimiter=[["|']],
   46   RawPrefix="R",
   47   Interpolation = [[ %\w ]],
   48 }
   49 
   50 Comments = {
   51   { Block=true,
   52     Nested=false,
   53     Delimiter = { [[\/\*]], [[\*\/]] }
   54   },
   55   {
   56     Block=false,
   57     Delimiter = { [[//]] }
   58   }
   59 }
   60 
   61 IgnoreCase=false
   62 
   63 PreProcessor = {
   64   Prefix=[[#]],
   65   Continuation="\\",
   66 }
   67 
   68 Operators=[[\(|\)|\[|\]|\{|\}|\,|\;|\.|\:|\&|<|>|\!|=|\/|\*|\%|\+|\-|\~|\||\^|\?]]
   69 
   70 EnableIndentation=true
   71 
   72 -- resolve issue with C++14 number separator syntax
   73 function OnStateChange(oldState, newState, token)
   74 
   75   if token=="'" and oldState==HL_NUMBER and newState==HL_STRING then
   76     return HL_NUMBER
   77   end
   78 
   79   return newState
   80 end