Skip to content

Commit 06e91f8

Browse files
author
Jeff Larkin
committed
WIP - Added more OpenACC clauses, deleted unused constructs
1 parent 4a57094 commit 06e91f8

File tree

1 file changed

+3
-50
lines changed

1 file changed

+3
-50
lines changed

syntaxes/openacc_lang.json

Lines changed: 3 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
]
4747
},
4848
{
49-
"begin": "(?i)\\b(copyin)\\s*(\\()",
49+
"begin": "(?i)\\b(copyin|copyout|copy|create|delete|no_create|present|attach|detach|device|host)\\s*(\\()",
5050
"beginCaptures": {
5151
"1": { "name": "string.regexp.openacc" },
5252
"2": {
@@ -116,7 +116,7 @@
116116
"patterns": [{ "include": "$self" }]
117117
},
118118
{
119-
"begin": "(?i)\\b(device_type)\\s*(\\()",
119+
"begin": "(?i)\\b(device_type|device_num|default_async)\\s*(\\()",
120120
"beginCaptures": {
121121
"1": { "name": "string.regexp.openacc" },
122122
"2": {
@@ -151,7 +151,7 @@
151151
},
152152
{
153153
"name": "string.regexp.openacc",
154-
"match": "(?i)\\b(async)(\\(\\d+\\))?\\b"
154+
"match": "(?i)\\b(async|wait)(\\(\\d+\\))?\\b"
155155
},
156156
{
157157
"name": "string.regexp.openacc",
@@ -503,19 +503,6 @@
503503
},
504504
"synchronization-constructs": {
505505
"patterns": [
506-
{
507-
"begin":
508-
"(?ix) \\G\\s+( barrier |(end\\s*)?master |(end\\s*)?ordered |(end\\s*)?task\\s*group |taskwait )\\b",
509-
"beginCaptures": { "1": { "name": "string.regexp.openacc" } },
510-
"end": "(?=[$\\n])",
511-
"patterns": [{ "include": "#invalid-word" }]
512-
},
513-
{
514-
"begin": "(?i)\\G\\s+(flush)\\b",
515-
"beginCaptures": { "1": { "name": "string.regexp.openacc" } },
516-
"end": "(?=[$\\n])",
517-
"patterns": [{ "include": "$self" }]
518-
},
519506
{
520507
"begin": "(?i)\\G\\s+(atomic)\\b",
521508
"beginCaptures": { "1": { "name": "string.regexp.openacc" } },
@@ -541,40 +528,6 @@
541528
},
542529
{ "include": "#invalid-word" }
543530
]
544-
},
545-
{
546-
"begin": "(?i)\\G\\s+(cancel)\\b",
547-
"beginCaptures": { "1": { "name": "string.regexp.openacc" } },
548-
"end": "(?=[$\\n])",
549-
"patterns": [
550-
{
551-
"begin": "(?i)\\G\\s+(do|parallel|sections|taskgroup)\\b",
552-
"beginCaptures": {
553-
"1": { "name": "string.regexp.openacc" }
554-
},
555-
"end": "(?=[$\\n])",
556-
"patterns": []
557-
},
558-
{ "include": "#invalid-word" }
559-
]
560-
},
561-
{
562-
"begin": "(?i)\\G\\s+(cancellation\\s+point)\\b",
563-
"beginCaptures": { "1": { "name": "string.regexp.openacc" } },
564-
"end": "(?=[$\\n])",
565-
"patterns": [
566-
{
567-
"name": "string.regexp.openacc",
568-
"match": "(?i)\\G\\s+(do|parallel|sections|taskgroup)\\b"
569-
},
570-
{ "include": "#invalid-word" }
571-
]
572-
},
573-
{
574-
"begin": "(?i)\\G\\s+((end\\s*)?critical)\\b",
575-
"beginCaptures": { "1": { "name": "string.regexp.openacc" } },
576-
"end": "(?=[$\\n])",
577-
"patterns": []
578531
}
579532
]
580533
},

0 commit comments

Comments
 (0)