# Additions to the C syntax rules specific to the_Foundation.
name: C

# convention for declared typenames
rename: i([A-Z]\w+) Impl_$1

style: ^(?!.*?//)(?!.*?/\*).*\b(i(True|False|NullRange|Assert|InvalidPos|InvalidSize|Clamp|Clob|Swap|Max|Min|Release(Ptr)?))\b
    1: red bold
    flags: force green_masked

style: ^(?!.*?//)(?!.*?/\*).*\b(i((Const)?ForEach(Reverse)?|ForIndices|(Declare|Define)\w+|Connect|Disconnect(Object)?))\b
    1: red bold
    flags: force green_masked

style: \bi(Any(Object)?|Bool|Char|MultibyteChar|Range[isfd]|Rangeui|Rangecc|Address|Archive|Audience|Array|AtomicInt|Block(Hash)?|Buffer|Class|CommandLine|Datagram|File|FileInfo|Rect|Stream|String(Array|Hash(Node)?|List|Set)?|Hash|IntSet|List|Map(Node)?|Mutex|Condition|Object(List)?|Process|Ptr(Array|Set)|Queue|RegExp(Match)?|Pipe|Service|Socket|SortedArray|Thread(Pool)?|Time|Tls(Certificate|Request)|Toml|Int2|Float[34]|Bool[34v]|Mat[34]|WebRequest|Xml(Document|Element|Attribute)|\w+Iterator)\b
    0: yellow bold

style: \bi(LocalDef|NoReturn|BeginPublic|EndPublic)\b
    0: white bright

style: \b[a-z][A-Za-z0-9]+_[A-Z](?:(?!_)\w)+\b
    0: green bold

style: \b(\w+_)\b
    1: italic
    flags: force green_masked yellow_masked

style: \b[a-z][A-Za-z0-9]+_([A-Z](?:(?!_)\w)+)\s*\(
    1: cyan bold
    flags: force green_masked yellow_masked

style: \b([a-z][A-Za-z0-9]+_[A-Z](?:(?!_)\w)+_)\s*\(
    1: cyan italic bright
    flags: force green_masked yellow_masked

style: \bClass_\w+\b
    0: white bold

style: struct\s+(Impl_\w+)
    1: white bold

style: \b(d)(->|\b)
    1: white bold
