11{
2- 	 "$schema" : " https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json" 
3- 	 "name" : " Pine Script" 
4- 	 "patterns" : [
2+    "$schema" : " https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json" 
3+    "name" : " Pine Script" 
4+    "patterns" : [
55    {
66      "match" : " //.*" 
77      "name" : " comment.pine" 
88    },
99    {
10- 			 "include" : " #constants" 
11- 		 },
10+        "include" : " #constants" 
11+      },
1212    {
13- 			 "include" : " #functions" 
14- 		 },
13+        "include" : " #functions" 
14+      },
1515    {
16- 			 "include" : " #operators" 
17- 		 },
16+        "include" : " #operators" 
17+      },
1818    {
19- 			 "include" : " #keywords" 
20- 		 },
21- 		 {
22- 			 "include" : " #strings" 
23- 		 }
24- 	 ],
25- 	 "repository" : {
19+        "include" : " #keywords" 
20+      },
21+      {
22+        "include" : " #strings" 
23+      }
24+    ],
25+    "repository" : {
2626    "strings" : {
2727      "patterns" : [
2828        {
3838              "name" : " punctuation.definition.string.end.pine" 
3939            }
4040          },
41-           "name"   : " string.quoted.double.pine" 
41+           "name" : " string.quoted.double.pine" 
4242          "patterns" : [
4343            {
4444              "match" : " \\\\ ." 
5050          "begin" : " '" 
5151          "beginCaptures" : {
5252            "1" : {
53- 							 "name" : " punctuation.definition.string.begin.pine" 
53+                "name" : " punctuation.definition.string.begin.pine" 
5454            }
5555          },
5656          "end" : " '" 
5959              "name" : " punctuation.definition.string.end.pine" 
6060            }
6161          },
62-           "name"   : " string.quoted.double.pine" 
62+           "name" : " string.quoted.double.pine" 
6363          "patterns" : [
6464            {
6565              "match" : " \\\\ ." 
7474        {
7575          "match" : " \\ b(abs|acos|alertcondition|alma|asin|atan|atr|avg|bar(color|since)|bb|bbw|bgcolor|bool|cci|ceil|change|cmo|cog|color|color\\ .new|correlation|cos|cross|crossover|crossunder|cum|dayofmonth|dayofweek|dev|dmi|ema|exp|falling|fill|financial|fixnan|float|floor|heikinashi|highest|highestbars|hline|hma|hour|iff|input|int|kagi|kc|kcw|label|line|linebreak|linreg|log|log10|lowest|lowestbars|macd|max|max_bars_back|mfi|min|minute|mom|month|na|nz|offset|percentile_linear_interpolation|percentile_nearest_rank|pivothigh|pivotlow|plot|plotarrow|plotbar|plotcandle|plotchar|plotshape|pointfigure|pow|quandl|renko|rising|rma|roc|round|rsi|sar|second|security|sign|sin|sma|sqrt|stdev|stoch|str\\ .replace_all|strategy|string|study|sum|supertrend|swma|tan|tickerid|time|timestamp|tostring|tr|tsi|valuewhen|variance|vwma|weekofyear|wma|wpr|year)(?=\\ ()" 
7676          "captures" : {
77- 						 "1" : {
78- 								 "name" : " support.function.pine" 
79- 						 }
80- 					 }
77+              "1" : {
78+                "name" : " support.function.pine" 
79+              }
80+            }
8181        },
8282        {
8383          "match" : " \\ barray\\ .(avg|clear|concat|copy|covariance|fill|get|includes|indexof|insert|lastindexof|max|median|min|mode|new_bool|new_color|new_float|new_int|pop|push|remove|reverse|set|shift|size|slice|sort|standardize|stdev|sum|unshift|variance)(?=\\ ()" 
8484          "captures" : {
85- 						 "1" : {
86- 								 "name" : " support.function.pine" 
87- 						 }
88- 					 }
85+              "1" : {
86+                "name" : " support.function.pine" 
87+              }
88+            }
8989        },
9090        {
9191          "match" : " \\ blabel\\ .(delete|get_text|get_x|get_y|new|set_color|set_size|set_text|set_textalign|set_textcolor|set_tooltip|set_x|set_xloc|set_xy|set_y|set_yloc)(?=\\ ()" 
9292          "captures" : {
93- 						 "1" : {
94- 								 "name" : " support.function.pine" 
95- 						 }
96- 					 }
93+              "1" : {
94+                "name" : " support.function.pine" 
95+              }
96+            }
9797        },
9898        {
9999          "match" : " \\ bline\\ .(delete|get_price|get_x1|get_x2|get_y1|get_y2|new|set_color|set_extend|set_style|set_width|set_x1|set_x2|set_xloc|set_xy1|set_xy2|set_y1|set_y2)(?=\\ ()" 
100100          "captures" : {
101- 						 "1" : {
102- 								 "name" : " support.function.pine" 
103- 						 }
104- 					 }
101+              "1" : {
102+                "name" : " support.function.pine" 
103+              }
104+            }
105105        },
106106        {
107107          "match" : " \\ bstrategy\\ .(cancel|cancel_all|close|close_all|entry|exit|order)(?=\\ ()" 
108108          "captures" : {
109- 						 "1" : {
110- 								 "name" : " support.function.pine" 
111- 						 }
112- 					 }
109+              "1" : {
110+                "name" : " support.function.pine" 
111+              }
112+            }
113113        },
114114        {
115115          "match" : " \\ bstrategy\\ .risk\\ .(allow_entry_in|max_cons_loss_days|max_drawdown|max_intraday_filled_orders|max_intraday_loss|max_position_size)(?=\\ ()" 
116116          "captures" : {
117- 						 "1" : {
118- 								 "name" : " support.function.pine" 
119- 						 }
120- 					 }
117+              "1" : {
118+                "name" : " support.function.pine" 
119+              }
120+            }
121121        },
122122        {
123123          "match" : " [a-zA-Z_][a-zA-Z0-9_]*\\ s*(?=\\ =)" 
126126        {
127127          "match" : " ([a-zA-Z_][a-zA-Z0-9_]*)\\ (.*\\ )\\ s(=>)\\ s" 
128128          "captures" : {
129- 						 "1" : {
130- 							 "name" : " support.function.pine" 
131- 						 },
132- 						 "2" : {
133- 							 "name" : " keyword.operator.assignment.pine" 
134- 						 }
135- 					 }
129+              "1" : {
130+                "name" : " support.function.pine" 
131+              },
132+              "2" : {
133+                "name" : " keyword.operator.assignment.pine" 
134+              }
135+            }
136136        }
137137      ]
138138    },
139139    "constants" : {
140-       "patterns" :[
140+       "patterns" :  [
141141        {
142142          "match" : " \\ b(true|false)\\ b" 
143143          "name" : " constant.language.pine" 
301301      ]
302302    },
303303    "keywords" : {
304- 			"patterns" : [{
305- 				"name" : " keyword.control.pine" 
306- 				"match" : " \\ b(if|else|while|for|return)\\ b" 
307- 			}]
308- 		}
309- 	},
310- 	"scopeName" : " source.pine" 
304+       "patterns" : [
305+         {
306+           "name" : " keyword.control.pine" 
307+           "match" : " \\ b(if|else|while|for|return)\\ b" 
308+         }
309+       ]
310+     }
311+   },
312+   "scopeName" : " source.pine" 
311313}
0 commit comments