Skip to content

Commit c91fa7b

Browse files
committed
Bug fixed
Grammer of Placeholder for String fixed
1 parent 314c124 commit c91fa7b

File tree

2 files changed

+66
-80
lines changed

2 files changed

+66
-80
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<p align="center"> <img src="https://github.com/jeyllani/pinescript/blob/main/images/pineicon.png?raw=true"> </p>
2-
<h2 align="center"> Pine Script V5 </h2> </center>
2+
<h2 align="center"> Pine Script V5 </h2> </center>
33
<h3 align="center">⭐ Syntax Highlighting | Snippets | Hovers ⭐ </h3> </center>
44

55
---

syntaxes/ps.tmLanguage.json

Lines changed: 65 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -238,88 +238,74 @@
238238
"strings": {
239239
"patterns": [
240240
{
241-
"match": "\\B(\")([^\"]*)(\")",
242-
"captures": {
243-
"0": {"name": "string.quoted.double.ps"},
244-
"1": {"name": "punctuation.definition.string.begin.ps"},
245-
"3": {"name": "punctuation.definition.string.end.ps"},
246-
"2": {
247-
"patterns": [
248-
{
249-
"match": "\\\\.",
250-
"name": "constant.character.escaped.ps"
251-
},
252-
{
253-
"match": "(\\{)([^\\}]*)(\\})",
254-
"captures": {
255-
"0": {"name": "variable.parameter.ps"},
256-
"1": {"name": "constant.character.format.placeholder.other.ps"},
257-
"3": {"name": "constant.character.format.placeholder.other.ps"},
258-
"2": {"patterns": [
259-
{
260-
"match": "\\,",
261-
"name": "punctuation.separator.comma.ps"
262-
},
263-
{
264-
"match": "\\b([0-9]+)\\b",
265-
"name": "constant.numeric.decimal.ps"
266-
},
267-
{
268-
"match": "[^\\s,]+",
269-
"name": "variable.parameter.ps"
270-
}
271-
]}
241+
"begin": "\"",
242+
"beginCaptures": {"0": {"name": "punctuation.definition.string.begin.ps"}},
243+
"end": "\"",
244+
"endCaptures": {"0": {"name": "punctuation.definition.string.end.ps"}},
245+
"name": "string.quoted.double.ps",
246+
"patterns": [
247+
{
248+
"match": "\\\\.",
249+
"name": "constant.character.escaped.ps"
250+
},
251+
{
252+
"match": "(\\{)([\\w\\s\\.,#]+)(\\})",
253+
"captures": {
254+
"0": {"name": "variable.parameter.ps"},
255+
"1": {"name": "constant.character.format.placeholder.other.ps"},
256+
"3": {"name": "constant.character.format.placeholder.other.ps"},
257+
"2": {"patterns": [
258+
{
259+
"match": "\\,",
260+
"name": "punctuation.separator.comma.ps"
261+
},
262+
{
263+
"match": "\\b([0-9]+)\\b",
264+
"name": "constant.numeric.decimal.ps"
265+
},
266+
{
267+
"match": "[^\\s,]+",
268+
"name": "variable.parameter.ps"
272269
}
273-
},
274-
{
275-
"match": "\\S+",
276-
"name": "string.quoted.double.ps"
277-
}
278-
]
279-
}
280-
}
281-
},
282-
{
283-
"match": "\\B(')([^']*)(')",
284-
"captures": {
285-
"0": {"name": "string.quoted.single.ps"},
286-
"1": {"name": "punctuation.definition.string.begin.ps"},
287-
"3": {"name": "punctuation.definition.string.end.ps"},
288-
"2": {
289-
"patterns": [
290-
{
291-
"match": "\\\\.",
292-
"name": "constant.character.escaped.ps"
293-
},
294-
{
295-
"match": "(\\{)([^\\}]*)(\\})",
296-
"captures": {
297-
"0": {"name": "variable.parameter.ps"},
298-
"1": {"name": "constant.character.format.placeholder.other.ps"},
299-
"3": {"name": "constant.character.format.placeholder.other.ps"},
300-
"2": {"patterns": [
301-
{
302-
"match": "\\,",
303-
"name": "punctuation.separator.comma.ps"
304-
},
305-
{
306-
"match": "\\b([0-9]+)\\b",
307-
"name": "constant.numeric.decimal.ps"
308-
},
309-
{
310-
"match": "[^\\s,]+",
311-
"name": "variable.parameter.ps"
312-
}
313-
]}
270+
]}
271+
}
272+
}
273+
]
274+
},
275+
{
276+
"begin": "'",
277+
"beginCaptures": {"1": {"name": "punctuation.definition.string.begin.ps"}},
278+
"end": "'",
279+
"endCaptures": {"1": {"name": "punctuation.definition.string.end.ps"}},
280+
"name": "string.quoted.single.ps",
281+
"patterns": [
282+
{
283+
"match": "\\\\.",
284+
"name": "constant.character.escaped.ps"
285+
},
286+
{
287+
"match": "(\\{)([\\w\\s\\.,#]+)(\\})",
288+
"captures": {
289+
"0": {"name": "variable.parameter.ps"},
290+
"1": {"name": "constant.character.format.placeholder.other.ps"},
291+
"3": {"name": "constant.character.format.placeholder.other.ps"},
292+
"2": {"patterns": [
293+
{
294+
"match": "\\,",
295+
"name": "punctuation.separator.comma.ps"
296+
},
297+
{
298+
"match": "\\b([0-9]+)\\b",
299+
"name": "constant.numeric.decimal.ps"
300+
},
301+
{
302+
"match": "[^\\s,]+",
303+
"name": "variable.parameter.ps"
314304
}
315-
},
316-
{
317-
"match": "\\S+",
318-
"name": "string.quoted.single.ps"
319-
}
320-
]
305+
]}
306+
}
321307
}
322-
}
308+
]
323309
}
324310
]
325311
},

0 commit comments

Comments
 (0)