"Fossies" - the Fresh Open Source Software Archive

Member "highlight-3.57-x64/langDefs/pas.lang" (12 May 2020, 2016 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 "pas.lang": 3.53_vs_3.54.

    1 Description="Pascal"
    2 
    3 Categories = {"source"}
    4 
    5 Digits=[[ (?:0x|0X|\$)[0-9a-fA-F]+|\d*[\.\_]?\d+(?:[eE][\-\+]\d+)?[lLuUbfdm]* ]]
    6 
    7 Keywords={
    8   { Id=1,
    9     List={"absolute", "abstract", "and", "array", "as", "asm", "assembler", "automated",
   10           "begin", "case", "cdecl", "class", "const", "constructor", "destructor", "dispid",
   11           "dispinterface", "div",   "dynamic", "end", "except", "export", "exports", "external",
   12           "far", "file", "finalization", "finally", "forward", "function", "goto",
   13           "implementation", "in", "initialization", "inherited", "inline", "interface",
   14           "is", "label", "library", "message", "mod", "near", "nil", "not", "object",
   15           "of", "or", "out", "override", "packed", "pascal", "private", "procedure",
   16           "program", "property", "protected", "public", "published", "raise", "record",
   17           "register",  "resourcestring", "safecall", "set", "shl", "shr", "stdcall",
   18           "threadvar", "try", "type", "unit", "uses", "var", "virtual", "xor",
   19           "if", "else", "then", "downto", "do", "for", "repeat", "while", "to", "until", "with"},
   20   },
   21   { Id=2,
   22     List={"boolean", "char", "integer", "pointer", "real", "text", "true", "false", "cardinal",
   23           "longint", "byte", "word", "single", "double", "int64","string"},
   24   },
   25   { Id=4,
   26     Regex=[[(\w+)\s*\(]],
   27   },
   28 }
   29 
   30 Strings={
   31   Delimiter=[["|']],
   32   Escape="#[[:digit:]]+"
   33 }
   34 
   35 IgnoreCase=true
   36 
   37 Comments={
   38   { Block=false,
   39     Delimiter= { [[//]] },
   40   },
   41   { Block=true,
   42     Nested=false,
   43     Delimiter= { [[\{(?!\$)]],[[\}]] }
   44   },
   45   { Block=true,
   46     Nested=false,
   47     Delimiter= { [[\(\*]],[[\*\)]] }
   48   }
   49 }
   50 
   51 PreProcessor = {
   52   Prefix=[[{]],
   53   Continuation="\x13",
   54 }
   55 
   56 NestedSections = {
   57   {
   58     Lang="assembler",
   59     Delimiter= { [[asm]], [[end;]] }
   60   }
   61 }
   62 
   63 Operators=[[\(|\)|\[|\]|,|;|:|&|<|>|\!|\=|\/|\*|\%|\+|\-|\@|\.|\^]]
   64 
   65 function OnStateChange(oldState, newState, token)
   66   if token=="}" and oldState==HL_PREPROC then
   67     return HL_PREPROC_END
   68   end
   69   return newState
   70 end