Skip to content

Commit c2b61c1

Browse files
committed
Merge pull request #33 from mcous/fix-s-prefixed-strings
Fix prefixed string handling
2 parents 3c50ad5 + 3d84ff9 commit c2b61c1

File tree

1 file changed

+21
-68
lines changed

1 file changed

+21
-68
lines changed

grammars/scala.cson

Lines changed: 21 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -76,97 +76,50 @@
7676
'interpolation-expression' :
7777
'patterns': [
7878
{
79-
'name': "interpolation.expression.embedded"
79+
'name': 'source.embedded.scala'
8080
'begin': '(\\$\\{)'
8181
'patterns': [
82-
{
83-
'name': 'margin'
84-
'match': '^\\s*\\|'
85-
}
86-
{
87-
'include': '#code'
88-
}
82+
{ 'include': '$self' }
8983
]
9084
'end': '(\\})'
9185
'captures':
92-
'1':
93-
'name': 'delimiters.scala'
86+
'0':
87+
'name': 'punctuation.section.embedded.scala'
9488
}
9589
{
96-
'match': '\\$(\\w+)'
90+
'name': 'source.embedded.scala'
91+
'match': '(\\$)\\w+'
9792
'captures':
9893
'1':
99-
'name': 'variable'
100-
}
101-
{
102-
'name': "scala.expression.embedded"
103-
'begin': '(""")'
104-
'patterns': [
105-
{ 'include': "#code"}
106-
]
107-
'end': '(""")'
108-
'captures':
109-
'1':
110-
'name': 'delimiters.scala'
111-
}
112-
]
113-
'quasiquotes-patterns':
114-
'patterns': [
115-
{
116-
'include': '#interpolation-expression'
117-
}
118-
{
119-
'include': '#code'
94+
'name': 'punctuation.section.embedded.scala'
12095
}
12196
]
12297
'interpolations':
12398
'patterns': [
12499
{
125-
'name': "scala.quasiquote.embedded"
126-
'begin': '(q""")'
127-
'patterns': [
128-
{ 'include': "#quasiquotes-patterns"}
129-
]
130-
'end': '(""")'
131-
'captures':
132-
'1':
133-
'name': 'delimiters.scala'
134-
}
135-
{
136-
'name': "scala.quasiquote.embedded"
137-
'begin': '(q")'
138-
'patterns': [
139-
{ 'include': "#quasiquotes-patterns"}
140-
]
141-
'end': '(")'
142-
'captures':
143-
'1':
144-
'name': 'delimiters.scala'
145-
}
146-
{
147-
'name': "scala.string-interpolation"
148-
'begin': '(s""")'
100+
'name': 'string.quoted.triple.scala'
101+
'begin': '\\w+"""'
149102
'beginCaptures':
150-
'1':
151-
'name': 'start'
152-
'end': '(""")'
103+
'0':
104+
'name': 'punctuation.definition.string.begin.scala'
105+
'end': '"""(?!")'
153106
'endCaptures':
154-
'1':
155-
'name': 'end.scala'
107+
'0':
108+
'name': 'punctuation.definition.string.end.scala'
156109
'patterns': [
157110
{ 'include': '#interpolation-expression' }
158111
]
159112
}
160113
{
161-
'name': "scala.string-interpolation"
162-
'begin': '(s")'
114+
'name': "string.quoted.double.scala"
115+
'begin': '\\w+"'
163116
'beginCaptures':
164-
'1':
165-
'name': 'start'
166-
'end': '(")'
117+
'0':
118+
'name': 'punctuation.definition.string.begin.scala'
119+
'end': '"'
167120
'endCaptures':
168-
'1':
169-
'name': 'end.scala'
121+
'0':
122+
'name': 'punctuation.definition.string.end.scala'
170123
'patterns': [
171124
{ 'include': '#interpolation-expression' }
172125
]

0 commit comments

Comments
 (0)