Skip to content

Commit a977cc1

Browse files
committed
fixed /// syntax
1 parent 016e631 commit a977cc1

File tree

3 files changed

+37
-15
lines changed

3 files changed

+37
-15
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "macaulay2",
33
"displayName": "Macaulay2",
44
"description": "Macaulay2 language support",
5-
"version": "0.0.2",
5+
"version": "0.0.3",
66
"repository": {
77
"type": "git",
88
"url": "https://github.com/coreysharris/vscode-macaulay2"

syntaxes/macaulay2.tmLanguage.json

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
"include": "#comments"
1010
},
1111
{
12-
"include": "#keywords"
12+
"include": "#strings"
1313
},
1414
{
15-
"include": "#strings"
15+
"include": "#keywords"
1616
},
1717
{
1818
"include": "#support"
@@ -56,13 +56,22 @@
5656
]
5757
},
5858
"strings": {
59-
"name": "string.quoted.double.macaulay2",
60-
"begin": "\"",
61-
"end": "\"",
6259
"patterns": [
6360
{
64-
"name": "constant.character.escape.macaulay2",
65-
"match": "\\\\."
61+
"name": "string.quoted.double.macaulay2",
62+
"begin": "\"",
63+
"end": "\"",
64+
"patterns": [
65+
{
66+
"name": "constant.character.escape.macaulay2",
67+
"match": "\\\\."
68+
}
69+
]
70+
},
71+
{
72+
"name": "string.tripleslash.macaulay2",
73+
"begin": "///",
74+
"end": "///"
6675
}
6776
]
6877
},
@@ -75,6 +84,11 @@
7584
},
7685
{
7786
"name": "comment.block.macaulay2",
87+
"begin": "-\\*",
88+
"end": "\\*-"
89+
},
90+
{
91+
"name": "comment.block.macaulay2.deprecated",
7892
"begin": "{\\*",
7993
"end": "\\*}"
8094
}

syntaxes/macaulay2.tmLanguage.yaml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ fileTypes: [m2]
44

55
patterns:
66
- include: '#comments'
7-
- include: '#keywords'
87
- include: '#strings'
8+
- include: '#keywords'
99
- include: '#support'
1010

1111
# variables:
@@ -31,19 +31,27 @@ repository:
3131
- name: keyword.operator.arithmetic.macaulay2
3232
match: '%|\*|/|//|-|\+|\\'
3333
strings:
34-
name: string.quoted.double.macaulay2
35-
begin: '"'
36-
end: '"'
3734
patterns:
38-
- name: constant.character.escape.macaulay2
39-
match: "\\\\."
40-
# match: "///\\(/?/?[^/]\\|\\(//\\)*////[^/]\\)*\\(//\\)*///"
35+
- name: string.quoted.double.macaulay2
36+
begin: '"'
37+
end: '"'
38+
patterns:
39+
- name: constant.character.escape.macaulay2
40+
match: "\\\\."
41+
- name: string.tripleslash.macaulay2
42+
begin: "///"
43+
end: "///"
44+
# - name: string.tripleslash2.macaulay2
45+
# match: "///\\(/?/?[^/]\\|\\(//\\)*////[^/]\\)*\\(//\\)*///"
4146
comments:
4247
patterns:
4348
- name: comment.line.double-dash.macaulay2
4449
begin: --
4550
end: $
4651
- name: comment.block.macaulay2
52+
begin: '-\*'
53+
end: '\*-'
54+
- name: comment.block.macaulay2.deprecated
4755
begin: '{\*'
4856
end: '\*}'
4957
support:

0 commit comments

Comments
 (0)