I am trying to improve on StataEditor’s scope syntax for variable.parameter.stata
. In Stata, this scope is called a local
, starts with ` and ends with '. There can be an unlimited number of locals inside locals. A simple example would be:
`local' not_local `this is a long local `inside local' still part of local'
Below is part of the package’s original tmLanguage file.
<dict>
<key>begin</key>
<string>`(\S(?!'))*`(\S(?!'))*`</string>
<key>end</key>
<string>'\S*'\S*'</string>
<key>name</key>
<string>variable.parameter.stata</string>
</dict>
<dict>
<key>begin</key>
<string>`(\S(?!'))*`</string>
<key>end</key>
<string>'\S*'</string>
<key>name</key>
<string>variable.parameter.stata</string>
</dict>
<dict>
<key>begin</key>
<string>`</string>
<key>end</key>
<string>'</string>
<key>name</key>
<string>variable.parameter.stata</string>
</dict>
Any help is appreciated.