"Fossies" - the Fresh Open Source Software Archive

Member "highlight-3.57-x64/plugins/cpp_wx.lua" (12 May 2020, 539 Bytes) of package /windows/www/highlight-3.57-x64.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Lua source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. 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 "cpp_wx.lua": 3.53_vs_3.54.

    1 --[[
    2 
    3 Sample plugin file for highlight 3.1
    4 
    5 Adds additional keywords to C++ syntax description
    6 
    7 USAGE: highlight -I main.cpp --plug-in=plugin.lua
    8 ]]
    9 
   10 Description="Add wxWidgets class names to C and C++ keywords"
   11 
   12 Categories = {"c++", "wxwidgets" }
   13 
   14 -- optional parameter: syntax description
   15 function syntaxUpdate(desc)
   16   if desc=="C and C++" then
   17     -- insert wxWidgets keywords
   18     table.insert( Keywords,
   19                   { Id=2, Regex=[[wx[A-Z]\w+]]
   20                   } )
   21   end
   22 end
   23 
   24 Plugins={
   25   { Type="lang", Chunk=syntaxUpdate },
   26 }