Changeset 5137f9f


Ignore:
Timestamp:
Apr 1, 2020, 12:46:13 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:
cfbc703d
Parents:
f586539
Message:

Added statements support to vscode coloring

File:
1 edited

Legend:

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

    rf586539 r5137f9f  
    22        "scopeName": "source.cfa",
    33        "patterns": [
    4                 { "include": "#comments"},
     4                { "include": "#comment"},
    55                { "include": "#preprocessor"},
    66                { "include": "#extern"},
    77                { "include": "#declaration"},
    88                { "include": "#constant"},
    9                 { "include": "#operators"}
     9                { "include": "#statement"},
     10                { "include": "#operator"}
    1011        ],
    1112        "repository": {
     
    133134                        }
    134135                },
    135                 "comments": {
     136                "comment": {
    136137                        "patterns":[
    137138                                { "include": "#comments.line"},
     
    287288                        }
    288289                },
    289                 "operators": {
     290                "operator": {
    290291                        "patterns":[
    291292                                {
     
    298299                                }
    299300                        ]
     301                },
     302                "statement": {
     303                        "patterns":[
     304                                { "match": "\\b(if)\\s*\\("         , "captures": { "1": { "name": "keyword.control.if.cfa"        } } },
     305                                { "match": "\\b(for)\\s*\\("        , "captures": { "1": { "name": "keyword.control.for.cfa"       } } },
     306                                { "match": "\\b(while)\\s*\\("      , "captures": { "1": { "name": "keyword.control.while.cfa"     } } },
     307                                { "match": "\\b(switch)\\s*\\("     , "captures": { "1": { "name": "keyword.control.switch.cfa"    } } },
     308                                { "match": "\\b(choose)\\s*\\("     , "captures": { "1": { "name": "keyword.control.choose.cfa"    } } },
     309                                { "match": "\\b(waitfor)\\s*\\("    , "captures": { "1": { "name": "keyword.control.waitfor.cfa"   } } },
     310                                { "match": "\\b(when)\\s*\\("       , "captures": { "1": { "name": "keyword.control.when.cfa"      } } },
     311                                { "match": "\\b(timeout)\\s*\\("    , "captures": { "1": { "name": "keyword.control.timeout.cfa"   } } },
     312                                { "match": "\\b(or)\\b"             , "captures": { "1": { "name": "keyword.contol.or.cfa"         } } },
     313                                { "match": "\\b(else)\\b"           , "captures": { "1": { "name": "keyword.contol.else.cfa"       } } },
     314                                { "match": "\\b(do)\\b"             , "captures": { "1": { "name": "keyword.contol.do.cfa"         } } },
     315                                { "match": "\\b(case)\\b"           , "captures": { "1": { "name": "keyword.contol.case.cfa"       } } },
     316                                { "match": "\\b(default)\\b"        , "captures": { "1": { "name": "keyword.contol.default.cfa"    } } },
     317                                { "match": "\\b(suspend)\\b"        , "captures": { "1": { "name": "keyword.contol.suspend.cfa"    } } },
     318                                { "match": "\\b(try)\\b"            , "captures": { "1": { "name": "keyword.contol.try.cfa"        } } },
     319                                { "match": "\\b(catch(Resume)?)\\b" , "captures": { "1": { "name": "keyword.contol.catch.cfa"      } } },
     320                                { "match": "\\b(finally)\\b"        , "captures": { "1": { "name": "keyword.contol.finally.cfa"    } } },
     321                                { "match": "\\b(goto)\\b"           , "captures": { "1": { "name": "keyword.contol.goto.cfa"       } } },
     322                                { "match": "\\b(return)\\b"         , "captures": { "1": { "name": "keyword.contol.return.cfa"     } } },
     323                                { "match": "\\b(break)\\b"          , "captures": { "1": { "name": "keyword.contol.break.cfa"      } } },
     324                                { "match": "\\b(continue)\\b"       , "captures": { "1": { "name": "keyword.contol.continue.cfa"   } } },
     325                                { "match": "\\b(fallthr(u|ough))\\b", "captures": { "1": { "name": "keyword.contol.fallthrough.cfa"} } },
     326                                { "match": "\\b(throw(Resume)?)\\b" , "captures": { "1": { "name": "keyword.contol.throw.cfa"      } } }
     327                        ]
    300328                }
    301329        }
Note: See TracChangeset for help on using the changeset viewer.