Ignore:
Timestamp:
Mar 31, 2020, 4:00:28 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
139a7e1
Parents:
822e4e5
Message:

improved handling of SUE in vscode coloring

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/vscode/uwaterloo.cforall-0.1.0/syntaxes/cfa.tmLanguage.json

    r822e4e5 r34d41ad  
    204204                                "declaration.type": {
    205205                                        "patterns": [
    206                                                         { "match": "\\b(void|bool|char|short|int|long|signed|unsigned|float|double)", "name": "storage.type.built-in.primitive.cfa"},
    207                                                         { "match": "\\b(zero_t|one_t|size_t|ssize_t|intptr_t|uintptr_t|\\$thread|\\$coroutine|\\$generator|\\$monitor)", "name": "storage.type.built-in.cfa"},
    208                                                         { "match": "\\b(extern|static|inline|volatile|const|thread_local)", "name": "storage.modifier.cfa"}
     206                                                        { "match": "(\\b|^|\\s)(void|bool|char|short|int|long|signed|unsigned|float|double)(\\b|$|\\s)", "name": "storage.type.built-in.primitive.cfa"},
     207                                                        { "match": "(\\b|^|\\s)(zero_t|one_t|size_t|ssize_t|intptr_t|uintptr_t|\\$thread|\\$coroutine|\\$generator|\\$monitor)(\\b|$|\\s)", "name": "storage.type.built-in.cfa"},
     208                                                        { "match": "(\\b|^|\\s)(extern|static|inline|volatile|const|thread_local)(\\b|$|\\s)", "name": "storage.modifier.cfa"}
    209209                                        ]
    210210                                },
    211211                                "declaration.aggregate": {
    212                                         "name": "meta.block.struct.cfa",
    213                                         "begin": "(struct|union|enum|trait|coroutine|generator|monitor|thread)\\s+(\\w+)\\s*(\\{)",
    214                                         "end": "(\\})(\\s+\\w+;)?",
    215                                         "beginCaptures": {
    216                                                 "0": { "name": "meta.head.struct.cfa" },
    217                                                 "1": { "name": "storage.type.struct.cfa"
    218                                                 }
    219                                         },
    220                                         "endCaptures": {
    221                                                 "1": { "name": "punctuation.section.block.end.bracket.curly.extern.cfa" }
    222                                         },
    223                                         "contentName": "meta.body.extern.cfa",
    224                                         "patterns": [{ "include": "#declaration" }]
     212                                        "patterns": [
     213                                                { "name": "storage.type.struct.cfa"   , "match": "(\\b|^|\\s)struct(\\s+\\w+)?(\\b|$|\\s)"   , "captures": { "2": { "name": "entity.name.type.struct.cfa"   }} },
     214                                                { "name": "storage.type.union.cfa"    , "match": "(\\b|^|\\s)union(\\s+\\w+)?(\\b|$|\\s)"    , "captures": { "2": { "name": "entity.name.type.union.cfa"    }} },
     215                                                { "name": "storage.type.enum.cfa"     , "match": "(\\b|^|\\s)enum(\\s+\\w+)?(\\b|$|\\s)"     , "captures": { "2": { "name": "entity.name.type.enum.cfa"     }} },
     216                                                { "name": "storage.type.trait.cfa"    , "match": "(\\b|^|\\s)trait(\\s+\\w+)?(\\b|$|\\s)"    , "captures": { "2": { "name": "entity.name.type.trait.cfa"    }} },
     217                                                { "name": "storage.type.generator.cfa", "match": "(\\b|^|\\s)generator(\\s+\\w+)?(\\b|$|\\s)", "captures": { "2": { "name": "entity.name.type.generator.cfa"}} },
     218                                                { "name": "storage.type.coroutine.cfa", "match": "(\\b|^|\\s)coroutine(\\s+\\w+)?(\\b|$|\\s)", "captures": { "2": { "name": "entity.name.type.coroutine.cfa"}} },
     219                                                { "name": "storage.type.thread.cfa"   , "match": "(\\b|^|\\s)thread(\\s+\\w+)?(\\b|$|\\s)"   , "captures": { "2": { "name": "entity.name.type.thread.cfa"   }} },
     220                                                { "name": "storage.type.monitor.cfa"  , "match": "(\\b|^|\\s)monitor(\\s+\\w+)?(\\b|$|\\s)"  , "captures": { "2": { "name": "entity.name.type.monitor.cfa"  }} },
     221                                                { "name": "storage.type.dtype.cfa"    , "match": "(\\b|^|\\s)dtype(\\s+\\w+)?(\\b|$|\\s)"    , "captures": { "2": { "name": "entity.name.type.dtype.cfa"    }} },
     222                                                { "name": "storage.type.otype.cfa"    , "match": "(\\b|^|\\s)otype(\\s+\\w+)?(\\b|$|\\s)"    , "captures": { "2": { "name": "entity.name.type.otype.cfa"    }} },
     223                                                { "name": "storage.type.ttype.cfa"    , "match": "(\\b|^|\\s)ttyp(\\s+\\w+)?(\\b|$|\\s)"     , "captures": { "2": { "name": "entity.name.type.ttype.cfa"    }} }
     224                                        ]
    225225                                }
    226226                        }
     
    295295                                {
    296296                                        "name": "keyword.operator.cfa",
    297                                         "match": "\\?|\\+\\+|--|\\~|\\!|\\=|\\\\|\\*=|\\*|/=|/|%=|%|\\+=|\\+|-=|-|<<=|<<|<=|<|>>=|>>|>=|>|==|\\!=|&=|&|\\^=|\\^|\\|=|\\||="
     297                                        "match": "\\?|\\+\\+|--|\\~|\\!|\\=|\\\\|->|\\*=|\\*|/=|/|%=|%|\\+=|\\+|-=|-|<<=|<<|<=|<|>>=|>>|>=|>|==|\\!=|&&|&=|&|\\^=|\\^|\\|\\||\\|=|\\||="
    298298                                }
    299299                        ]
Note: See TracChangeset for help on using the changeset viewer.