diff --git a/.vscode/launch.json b/.vscode/launch.json
new file mode 100644
index 0000000..8384213
--- /dev/null
+++ b/.vscode/launch.json
@@ -0,0 +1,13 @@
+// A launch configuration that launches the extension inside a new window
+{
+ "version": "0.1.0",
+ "configurations": [
+ {
+ "name": "Launch Extension",
+ "type": "extensionHost",
+ "request": "launch",
+ "runtimeExecutable": "${execPath}",
+ "args": ["--extensionDevelopmentPath=${workspaceRoot}" ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c596dec..2930dac 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,8 +1,114 @@
# Changelog
-All notable changes to this project will be documented in this file.
-The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
-and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
+## [1.6.1] - 2018-06-12
+
+- Fix links in README
+
+## [1.6.0] - 2018-06-12
+
+- Update for Unicode identifiers. You should be able to use unicode anywhere it's legal now and have it be correctly colored. #84
+- Fix bug with multiple expressions in parentheses. #46
+- Fix comments inside locals, and fix comments inside globals used with `${...}`. #90
+- Color macros better in list extended function. #75
+- Allow macros within subscripts. #74 and #57
+- Make comment highlighting stubbornly accurate. See [this Statalist post](https://www.statalist.org/forums/forum/general-stata-discussion/general/1448244-understanding-stata-s-comment-hierarchy) for more information about how Stata highlights in practice, and [go here for an example](examples/comments.md).
+- Add note to README that language-latex and language-markdown must be installed for dynamic documents syntax highlighting to work
+- Update to highlight dynamic documents in Markdown and LaTeX
+- Add highlighting for Python-like docstrings in block comments
+- Don't alert for error around braces (`{}`) inside function calls
+
+- Add support for factor variables. Fixes #70
+- Fix coloring for macro functions that take multiple new macros as arguments, i.e. `tempvar`, `tempfile`, and `tempname`. Fixes #71
+- Add regex functions to autocomplete. Fixes #69
+- Alert when variable labels are >80 characters. Fixes #72
+
+## [1.2.8] - 2017-11-28
+- Fix syntax command. Fixes #61
+- Add some user-written commands. Fixes #64
+
+## [1.2.7] - 2017-11-20
+- allow there to be no spaces before = in gen command. Fixes https://github.com/kylebarron/language-stata/issues/59.
+
+## [1.2.6] - 2017-11-18
+- No changes
+
+## [1.2.5] - 2017-11-18
+- allow /* to start a comment block anywhere, not just after whitespace. Fixes https://github.com/kylebarron/language-stata/issues/55
+
+## [1.2.4] - 2017-11-18
+- Fix `gen` command
+- Fix global macro coloring when using `\` as a path delimiter in strings. (i.e. `"$datadir\file.dta"`). Fixes [#52](https://github.com/kylebarron/language-stata/issues/52).
+- Allow for markdown code block in strings to not apply "macro" tags in specific situations. Allows e.g. `di "```stata"` as long as there's no `'` character in the text. Fixes [#53](https://github.com/kylebarron/language-stata/issues/53).
+
+## [1.2.3] - 2017-11-11
+- Fix bugs created in 1.2.1
+ - Namely, fix the list of macro reserved names
+
+## [1.2.2] - 2017-11-11
+- Fix bugs created in 1.2.1
+
+## [1.2.1] - 2017-11-10
+- Fix macro extended function bugs
+- Add macro checking to `foreach` and `syntax`
+- Restore name checking to `gen`
+- Fix bug for brackets before comma in the `syntax` command
+- Add `\` as an operator for use with matrices
+- Allow functions to be embedded within subscripts
+
+## [1.2.0] - 2017-11-03
+- Color SQL queries used in the `odbc` command. (The `language-sql` base package must be active.)
+- Regex bug fixes and enhancements:
+ - Color parentheses forming capture groups
+ - In regular `regexm()`, color as illegal any group starting with `*`, `?`, or `+`.
+ - Color lookaheads and lookbehinds in `ustrregexm()`
+ - Fix highlighting of enclosed functions in `regexm()` and `ustrregexm()`
+- Standardize highlighting for `regress` and other "model commands". (Had been colored as _functions_, should be colored as _commands_.)
+
+## [1.1.2] - 2017-10-12
+- Color `==` as illegal in `replace var == 0`
+- Fix `log` coloring so that `filename.log` isn't colored
+- Bugfixes with `drop` and `keep` commands
+- Allow embedded macros in extended macro functions
+- Miscellaneous bugs fixed by adding `\\b` so that something like `if_yes` doesn't color `if`
+
+## [1.1.1] - 2017-10-11
+- Fixed bug where, e.g. only `label vari` was colored of `label variable ...`. There were many instances of code that could have been affected that were fixed.
+
+## [1.1.0] - 2017-10-11
+- Improved `syntax` command to correctly color across multiple lines. Solves https://github.com/kylebarron/language-stata/issues/19
+- Colors extended macro functions inside local macros as well as during macro instantiation.
+- Allow macros in `forvalues` loop statement, like ``forval i = `start_num' / `end_num' {``
+- Allow for local and global macros within regular expression match strings
+- Color `_all` as a constant
+- Include Mata functions from old [atom-language-stata](https://github.com/benwhalley/atom-language-stata) package
+- `drop` and `keep` alert you if you type `drop varlist if` or `drop varlist in`. (It's only legal to use `if` or `in` without a _varlist_).
+
+## [1.0.4] - 2017-10-02
+- Fix highlighting for global macro with braces inside loop
+- Now the `}` line can only be colored as error if there's text on that line and if there's at least one space before the `}`.
+- Remove some deprecated functions
+- Turn off docblockr tag if appears immediately after word character
+- Show error for `gen var == 5`
+
+## [1.0.3] - 2017-10-02
+- Fix comment bug created in 1.0.2.
+ - Disallow star-comments inside block-comments
+
+## [1.0.2] - 2017-10-02
+- Fix bug to allow nested comment blocks
+- Fix docblockr tag coloring
+
+## [1.0.1] - 2017-10-01
+- Fix `*regexr*()` functions to color regex before typing the second comma
+
+## [1.0.0] - 2017-09-30
+### Added
+- Unicode regex support. This includes support for the entire (or at least most) of the ICU regex engine.
+- Colors invalid escapes as illegal in the standard regex parser, like \w or \s.
+
+### Fixed
+- color regex functions within other functions
+- Don't color as illegal the {} within the `spacebef` and `spaceaft` functions in the outreg package.
## [0.5.16] - 2017-09-22
### Added
@@ -17,3 +123,4 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Fixed
- Regex highlighting error that colored capturing groups wrong
+-
\ No newline at end of file
diff --git a/README.md b/README.md
index cfe9ad1..2eeae30 100644
--- a/README.md
+++ b/README.md
@@ -1,14 +1,13 @@
-# Stata language support in Atom
-[](https://atom.io/packages/language-stata)
-[](https://atom.io/packages/language-stata)
-[](https://github.com/kylebarron/language-stata/blob/master/LICENSE)
-
+# Stata language support in Visual Studio Code
[](https://github.com/kylebarron/language-stata)
[](https://github.com/kylebarron/language-stata)
-#### Stata syntax highlighting in Atom, built from the ground up.
+#### Stata syntax highlighting in Visual Studio Code, built from the ground up.
+Also [available for Atom](https://github.com/kylebarron/language-stata).
+
+
+Code snippet from [Gtools](https://github.com/mcaceresb/stata-gtools), a faster implementation of Stata's collapse and egen using C plugins. Shown with the [Material](https://marketplace.visualstudio.com/items?itemName=Equinusocio.vsc-material-theme) theme.
-Note: This is a new package that replaces the [previous](https://github.com/benwhalley/atom-language-stata) syntax highlighter. Please add [issues](https://github.com/kylebarron/language-stata/issues) for any bugs, comments, or suggestions.
## Features
@@ -16,26 +15,65 @@ This package highlights:
- System commands, functions, and function arguments
- Macros, both global and local
- Accurately colors nested macros and escaped macros in strings when you want the inner macro to evaluate at runtime
+ - Colors macro extended functions inside `` `: ... '`` as well as after `local lname:`
+- Comments, [more accurately than Stata's Do-file Editor](examples/comments.md).
- Regular expressions
+ - Colors both the limited syntax provided through the `regexr()` and `regexm()` functions, as well as the vastly expanded regex syntax provided in Stata 14 and 15 through the `ustrregexm()`, `ustrregexrf()`, and `ustrregexra()` functions.
+- Dynamic Markdown and LaTeX documents. [Instructions below.](#dynamic-documents)
Other nice features:
-- Autocomplete for built-in commands and functions, and for your macros as you write them.
+- Works with unicode identifiers. Use unicode anywhere it's legal Stata syntax.
- Alerts you if your variable name is illegal, i.e. if your variable name is more than 32 chars, starts with a number, or is a reserved name.
- Alerts you if you have any text other than } on a line ending a foreach/forvalues/if/else command
-- Local macro back tick autocompletion. When you write a `, Atom automatically fills in a ' after your cursor
+- Local macro back tick autocompletion. When you write a `, Visual Studio Code automatically fills in a ' after your cursor
- Makes it easy to spot incorrect nesting of compound quotes
- Support for programming ligatures for all valid Stata syntax for fonts that support them, like the [Fira Code](https://github.com/tonsky/FiraCode) font.
-- Highlights [Docblockr](https://atom.io/packages/docblockr)-style keywords inside comments (anything like `@Note`)
+- Highlights SQL queries used in the odbc command. (The language-sql base package must be active.)
+
+#### Note
+Some themes may not color all parts of the syntax.
## Installation
+Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
+```
+ext install stata-enhanced
+```
-To install, do one of the following:
-- Go to Preferences/Settings > Install > Packages; and then search for "language-stata-plus"
-- At the command line, type `apm install language-stata-plus`
+## Running Code
-The local macro back tick autocompletion won't function until you fully restart Atom. Do `ctrl-shift-P` or `cmd-shift-P` to bring up the command palette, type `Window: Reload`, and click enter.
+This package doesn't have the capabilities to run your code in Stata. If you're using Linux, you can use my [scripts](https://github.com/kylebarron/stata-autokey) with the [Autokey](https://github.com/autokey-py3/autokey) automation utility to quickly run selections of your files in a graphical session of Stata.
-## Running Code
+You might also be interested in trying to port Atom's `stata-exec` package.
+
+## Dynamic Documents
+
+
+
+Stata 15 brought new features for working with dynamic documents. The [`dyndoc`](https://www.stata.com/help.cgi?dyndoc) command lets you write in Markdown and converts your file and code to HTML for viewing in a web browser.
+
+It also added the [`dyntext`](https://www.stata.com/help.cgi?dyntext) command, which fills in Stata output for any text file, without touching the text itself. This lets you then use third-party document generators like [Pandoc](https://pandoc.org/) and [LaTeX](https://www.latex-project.org/) to generate documents.
+
+This package now provides syntax highlighting for Stata code written inside Stata's [dynamic tags](https://www.stata.com/help.cgi?dynamic+tags) for Markdown and LaTeX documents.
+
+By default, this package's Markdown and LaTeX syntax highlighting will be applied for files ending in `.domd` and `.dotex` respectively. **The [Markdown All in One](https://marketplace.visualstudio.com/items?itemName=yzhang.markdown-all-in-one) and [LaTeX Workshop](https://marketplace.visualstudio.com/items?itemName=James-Yu.latex-workshop) packages must be installed for the highlighting to work.**
+
+If you name your file with a different extension, you can manually set the highlighting by clicking on the "Plain Text" button on the bottom right of the screen (or by pressing CTRL+SHIFT+L) and then selecting `Stata Dyndoc (Markdown)` or `Stata Dyndoc (LaTeX)` from the drop-down menu.
+
+### Examples
+
+An example of the PDF output of using `dyntext` and Pandoc is in the examples folder: [`dyntext.pdf`](examples/dyntext.pdf).
+
+That file was created by running
+
+```stata
+dyntext dyntext.domd, saving(dyntext.md) replace
+```
+from inside Stata 15, and then with
+
+```
+pandoc dyntext.md -o dyntext.pdf
+```
-Check out the `script` or `stata-exec` packages. If you're using Linux, you can use my [scripts](https://github.com/kylebarron/stata-autokey) with the [Autokey](https://github.com/autokey-py3/autokey) automation utility to quickly run selections of your files in a graphical session of Stata.
+on the command line using [Pandoc](https://pandoc.org/).
+The file [`dyntext.dotex`](examples/dyntext.dotex) is a proof-of-concept and should compile with LaTeX but the output is not shown here.
diff --git a/examples/README.md b/examples/README.md
new file mode 100644
index 0000000..a3dbb0f
--- /dev/null
+++ b/examples/README.md
@@ -0,0 +1,33 @@
+# Examples
+
+## Comments
+
+See [comments.md](comments.md) for information on how Stata deals with comments.
+
+## Dynamic Documents
+
+The file [`dyntext.pdf`](dyntext.pdf) in this folder was created with
+
+```stata
+dyntext dyntext.domd, saving(dyntext.md) replace
+```
+
+from inside Stata 15, and then with
+
+```
+pandoc dyntext.md -o dyntext.pdf
+```
+
+on the command line using [Pandoc](https://pandoc.org/).
+
+The file [`dyntext.dotex`](dyntext.dotex) is a proof-of-concept and should compile with LaTeX but the output is not shown here.
+
+---
+
+#### `dyntext.domd`:
+
+
+
+#### `dyntext.dotex`:
+
+
diff --git a/examples/comments.md b/examples/comments.md
new file mode 100644
index 0000000..cb58a0e
--- /dev/null
+++ b/examples/comments.md
@@ -0,0 +1,47 @@
+# Accurate comment highlighting
+
+The intricates of Stata's comment syntax highlighting were brought to my attention by [this Statalist post](https://www.statalist.org/forums/forum/general-stata-discussion/general/1448244-understanding-stata-s-comment-hierarchy).
+
+This package now highlights comments more accurately than the Stata Do-file Editor. This way you'll know exactly which parts of your do-file will actually run.
+
+VS Code highlighter:
+
+
+Dofile Editor:
+
+
+Stata output (with Stata SE 15.1)
+
+
+Here's the example text.
+
+```stata
+* /* This will be a multi-line comment
+disp "Not printed"
+*/
+
+* // /* Ignored due to inline comment
+disp "Printed 1"
+
+// /* Also ignored due to inline comment
+disp "Printed 2"
+
+*// /* This is not an inline comment, so this is multi-line again
+disp "Not printed"
+*/
+
+* ///
+disp "Not printed. Line continuation applies"
+
+* line continuation ///
+///
+disp "Not printed. Line continuation applies"
+
+// /// Line continuation ignored due to inline comment
+disp "Printed 3"
+
+/*
+/* Nested */
+disp "Not printed"
+*/* disp "Not printed"
+```
\ No newline at end of file
diff --git a/examples/dyntext.domd b/examples/dyntext.domd
new file mode 100644
index 0000000..40d2d48
--- /dev/null
+++ b/examples/dyntext.domd
@@ -0,0 +1,145 @@
+<>
+
+# Using Stata dynamic tags in a text file with the dyndoc command
+
+Let us consider an example where we study the **mpg** and **weight** variables
+in **auto.dta**. In our examples below, we will first write the commands so
+that they will be displayed in our target HTML file. Then, we will write the
+commands so that Stata will process the Stata dynamic tags, displaying the
+results of the Stata commands in the target HTML file.
+
+
+We first use the **sysuse** command to load the dataset and then describe
+the data using the **describe** command.
+
+```
+<>
+<>
+sysuse auto, clear
+describe
+<>
+<>
+```
+
+This produces the following Stata results:
+
+```
+<>
+sysuse auto, clear
+describe
+<>
+```
+
+Now, we want to check if **mpg** is always greater than 0 and less than 100.
+We use the **assert** command to perform the check. In this case, we do not
+want to include any output in the target HTML file, so we use the **quietly**
+attribute to modify the behavior of the **dd_do** Stata dynamic tag.
+
+```
+<>
+<>
+assert mpg > 0 & mpg < 100
+<>
+<>
+
+<>
+assert mpg > 0 & mpg < 100
+<>
+
+```
+
+If the data do not satisfy the conditions, **dyndoc** will fail with an error
+message, which will occur if we run the same **assert** command in a do-file.
+
+
+Next, we want to summarize the **weight** variable:
+
+```
+<>
+<>
+summarize weight
+<>
+<>
+```
+
+This produces the following in the target HTML file:
+
+```
+<>
+summarize weight
+<>
+```
+
+We want to use the minimum and maximum values of **weight** in a sentence.
+Instead of copying and pasting the numbers from the **summarize** output, we can
+use the **dd_display** Stata dynamic tag with the **r(min)** and **r(max)**
+stored results:
+
+```
+<>
+The variable weight has minimum value <> and
+has maximum value <>.
+<>
+```
+
+This produces the following in the target HTML file:
+
+```
+
+> The variable weight has minimum value <>
+and has maximum value <>.
+
+```
+
+The **dd_display** dynamic tag uses Stata's **display** command to evaluate
+expressions. It can be used as a calculator. For example, if we want to
+include the $$range = max - min$$ in a sentence, instead of calculating the
+number and then copying and pasting it, we can use
+
+```
+<>
+The variable weight has range <>.
+<>
+```
+
+which produces the following in the target HTML file:
+
+```
+
+> The variable weight has range <>.
+
+```
+
+Now, we want to graph **mpg** and **weight** using a scatterplot. We use the
+**dd_do** tag with the **nooutput** attribute to generate the scatterplot
+first. The **nooutput** attribute leaves the command in the output only,
+
+```
+<>
+<>
+scatter mpg weight, mcolor(blue%50)
+<>
+<>
+```
+
+which generates a scatterplot of **mpg** and **weight** with 50% opacity
+color markers.
+
+```
+<>
+scatter mpg weight, mcolor(blue%50)
+<>
+```
+
+Now, we want to export the graph to a file and include an image link to the
+file.
+
+```
+<>
+<>
+<>
+```
+
+This produces a graph of 400 pixels high.
+
+<>
\ No newline at end of file
diff --git a/examples/dyntext.dotex b/examples/dyntext.dotex
new file mode 100644
index 0000000..d4355c6
--- /dev/null
+++ b/examples/dyntext.dotex
@@ -0,0 +1,92 @@
+<>
+
+\documentclass[12pt]{article}
+\usepackage{graphicsx}
+\begin{document}
+
+\section{Using Stata dynamic tags in a text file with the \texttt{dyntext} command}
+
+Let us consider an example where we study the \texttt{mpg} and \texttt{weight} variables in
+\texttt{auto.dta}. In our examples below, we will first write the commands so that
+they will be displayed in our output text file. Then, we will write the
+commands so that Stata will process the Stata dynamic tags, displaying the
+results of the Stata commands in the output text file.
+
+We first use the \texttt{sysuse} command to load the dataset and then describe
+the data using the \texttt{describe} command.
+
+<>
+<>
+sysuse auto, clear
+describe
+<>
+<>
+
+This produces the following Stata results:
+
+<>
+sysuse auto, clear
+describe
+<>
+
+Now, we want to check if \texttt{mpg} is always greater than 0 and less than 100.
+We use the \texttt{assert} command to perform the check. In this case, we do not
+want to include any output in the output text file, so we use the \texttt{quietly}
+attribute to modify the behavior of the \texttt{dd_do} Stata dynamic tag.
+
+<>
+<>
+assert mpg > 0 & mpg < 100
+<>
+<>
+
+<>
+assert mpg > 0 & mpg < 100
+<>
+
+If the data do not satisfy the conditions, \texttt{dyntext} will fail with an error
+message, which will occur if we run the same \texttt{assert} command in a do-file.
+
+Next, we want to summarize the \texttt{weight} variable:
+
+<>
+<>
+summarize weight
+<>
+<>
+
+This produces the following in the output text file:
+
+<>
+summarize weight
+<>
+
+We want to use the minimum and maximum values of \texttt{weight} in a sentence.
+Instead of copying and pasting the numbers from the \texttt{summarize} output, we can
+use the \texttt{dd_display} Stata dynamic tag with the \texttt{r(min)} and \texttt{r(max)}
+stored results
+
+<>
+The variable weight has minimum value <> and
+has maximum value <>.
+<>
+
+which produces the following in the output text file:
+
+> The variable weight has minimum value <>
+and has maximum value <>.
+
+The \texttt{dd_display} dynamic tag uses Stata's \texttt{display} command to evaluate
+expressions. It can be used as a calculator. For example, if we want to
+include the $range = max - min$ in a sentence, instead of calculating the
+number and then copying and pasting it, we can use
+
+<>
+The variable weight has range <>.
+<>
+
+which produces the following in the output text file:
+
+> The variable weight has range <>.
+
+\end{document}
\ No newline at end of file
diff --git a/examples/dyntext.md b/examples/dyntext.md
new file mode 100644
index 0000000..c236120
--- /dev/null
+++ b/examples/dyntext.md
@@ -0,0 +1,153 @@
+
+# Using Stata dynamic tags in a text file with the dyndoc command
+
+Let us consider an example where we study the **mpg** and **weight** variables
+in **auto.dta**. In our examples below, we will first write the commands so
+that they will be displayed in our target HTML file. Then, we will write the
+commands so that Stata will process the Stata dynamic tags, displaying the
+results of the Stata commands in the target HTML file.
+
+
+We first use the **sysuse** command to load the dataset and then describe
+the data using the **describe** command.
+
+```
+<>
+sysuse auto, clear
+describe
+<>
+```
+
+This produces the following Stata results:
+
+```
+. sysuse auto, clear
+(1978 Automobile Data)
+
+. describe
+
+Contains data from /home/kyle/local/stata/ado/base/a/auto.dta
+ obs: 74 1978 Automobile Data
+ vars: 12 13 Apr 2016 17:45
+ size: 3,182 (_dta has notes)
+--------------------------------------------------------------------------------
+ storage display value
+variable name type format label variable label
+--------------------------------------------------------------------------------
+make str18 %-18s Make and Model
+price int %8.0gc Price
+mpg int %8.0g Mileage (mpg)
+rep78 int %8.0g Repair Record 1978
+headroom float %6.1f Headroom (in.)
+trunk int %8.0g Trunk space (cu. ft.)
+weight int %8.0gc Weight (lbs.)
+length int %8.0g Length (in.)
+turn int %8.0g Turn Circle (ft.)
+displacement int %8.0g Displacement (cu. in.)
+gear_ratio float %6.2f Gear Ratio
+foreign byte %8.0g origin Car type
+--------------------------------------------------------------------------------
+Sorted by: foreign
+
+```
+
+Now, we want to check if **mpg** is always greater than 0 and less than 100.
+We use the **assert** command to perform the check. In this case, we do not
+want to include any output in the target HTML file, so we use the **quietly**
+attribute to modify the behavior of the **dd_do** Stata dynamic tag.
+
+```
+<>
+assert mpg > 0 & mpg < 100
+<>
+
+
+```
+
+If the data do not satisfy the conditions, **dyndoc** will fail with an error
+message, which will occur if we run the same **assert** command in a do-file.
+
+
+Next, we want to summarize the **weight** variable:
+
+```
+<>
+summarize weight
+<>
+```
+
+This produces the following in the target HTML file:
+
+```
+. summarize weight
+
+ Variable | Obs Mean Std. Dev. Min Max
+-------------+---------------------------------------------------------
+ weight | 74 3019.459 777.1936 1760 4840
+
+```
+
+We want to use the minimum and maximum values of **weight** in a sentence.
+Instead of copying and pasting the numbers from the **summarize** output, we can
+use the **dd_display** Stata dynamic tag with the **r(min)** and **r(max)**
+stored results:
+
+```
+The variable weight has minimum value <> and
+has maximum value <>.
+```
+
+This produces the following in the target HTML file:
+
+```
+
+> The variable weight has minimum value 1760.00
+and has maximum value 4840.00.
+
+```
+
+The **dd_display** dynamic tag uses Stata's **display** command to evaluate
+expressions. It can be used as a calculator. For example, if we want to
+include the $$range = max - min$$ in a sentence, instead of calculating the
+number and then copying and pasting it, we can use
+
+```
+The variable weight has range <>.
+```
+
+which produces the following in the target HTML file:
+
+```
+
+> The variable weight has range 3080.00.
+
+```
+
+Now, we want to graph **mpg** and **weight** using a scatterplot. We use the
+**dd_do** tag with the **nooutput** attribute to generate the scatterplot
+first. The **nooutput** attribute leaves the command in the output only,
+
+```
+<>
+scatter mpg weight, mcolor(blue%50)
+<>
+```
+
+which generates a scatterplot of **mpg** and **weight** with 50% opacity
+color markers.
+
+```
+. scatter mpg weight, mcolor(blue%50)
+
+```
+
+Now, we want to export the graph to a file and include an image link to the
+file.
+
+```
+<>
+```
+
+This produces a graph of 400 pixels high.
+
+
\ No newline at end of file
diff --git a/examples/dyntext.pdf b/examples/dyntext.pdf
new file mode 100644
index 0000000..4ba39c1
Binary files /dev/null and b/examples/dyntext.pdf differ
diff --git a/examples/graph.pdf b/examples/graph.pdf
new file mode 100644
index 0000000..b176020
Binary files /dev/null and b/examples/graph.pdf differ
diff --git a/grammars/stata-dyndoc-latex.json b/grammars/stata-dyndoc-latex.json
new file mode 100644
index 0000000..9d9a2a3
--- /dev/null
+++ b/grammars/stata-dyndoc-latex.json
@@ -0,0 +1,15 @@
+{
+ "scopeName": "source.dyndoc.latex.stata",
+ "name": "Stata Dyndoc (LaTeX)",
+ "fileTypes": [
+ "dotex"
+ ],
+ "patterns": [
+ {
+ "include": "source.dyndoc.stata"
+ },
+ {
+ "include": "text.tex.latex"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/grammars/stata-dyndoc-md.json b/grammars/stata-dyndoc-md.json
new file mode 100644
index 0000000..7110eef
--- /dev/null
+++ b/grammars/stata-dyndoc-md.json
@@ -0,0 +1,35 @@
+{
+ "scopeName": "source.dyndoc.md.stata",
+ "name": "Stata Dyndoc (Markdown)",
+ "fileTypes": [
+ "domd"
+ ],
+ "patterns": [
+ {
+ "begin": "^\\s*([`~]{3,})(stata)?$",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.md"
+ }
+ },
+ "end": "^\\s*(\\1)$",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.md"
+ }
+ },
+ "name": "fenced.code.md",
+ "patterns": [
+ {
+ "include": "source.dyndoc.stata"
+ }
+ ]
+ },
+ {
+ "include": "source.dyndoc.stata"
+ },
+ {
+ "include": "text.html.markdown"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/grammars/stata-dyndoc.json b/grammars/stata-dyndoc.json
new file mode 100644
index 0000000..b7f8de2
--- /dev/null
+++ b/grammars/stata-dyndoc.json
@@ -0,0 +1,207 @@
+{
+ "scopeName": "source.dyndoc.stata",
+ "name": "Stata Dyndoc",
+ "patterns": [
+ {
+ "begin": "(<<)(dd_do)(:)?([^>]+)?(>>)([^\r\n]*)?",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.definition.tag.begin.html"
+ },
+ "2": {
+ "name": "entity.name.tag.block.$2.html"
+ },
+ "3": {
+ "name": "punctuation.separator.key-value.dyndoc.stata"
+ },
+ "4": {
+ "patterns": [
+ {
+ "match": "quietly|quietl|quiet|quie|qui",
+ "name": "keyword.control.flow.dyndoc.stata"
+ },
+ {
+ "match": "nocommands|nocommand|nocomman|nocomma|nocomm|nocom",
+ "name": "keyword.control.flow.dyndoc.stata"
+ },
+ {
+ "match": "nooutput|nooutpu|nooutp|noout",
+ "name": "keyword.control.flow.dyndoc.stata"
+ },
+ {
+ "match": "noprompt|nopromp|noprom",
+ "name": "keyword.control.flow.dyndoc.stata"
+ }
+ ]
+ },
+ "5": {
+ "name": "punctuation.definition.tag.end.html"
+ },
+ "6": {
+ "name": "invalid.illegal.name.dyndoc.stata"
+ }
+ },
+ "end": "(<)(dd_do)(>>)([^\r\n]*)?",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.definition.tag.begin.html"
+ },
+ "2": {
+ "name": "entity.name.tag.block.$2.html"
+ },
+ "3": {
+ "name": "punctuation.definition.tag.end.html"
+ },
+ "4": {
+ "name": "invalid.illegal.name.dyndoc.stata"
+ }
+ },
+ "name": "meta.tag.block.$2.html",
+ "patterns": [
+ {
+ "include": "source.stata"
+ }
+ ]
+ },
+ {
+ "begin": "(<<)(dd_display|dd_graph)(:)",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.definition.tag.begin.html"
+ },
+ "2": {
+ "name": "entity.name.tag.block.$2.html"
+ },
+ "3": {
+ "name": "punctuation.separator.key-value.dyndoc.stata"
+ }
+ },
+ "end": "(>>)",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.definition.tag.end.html"
+ }
+ },
+ "name": "meta.tag.block.$2.html",
+ "patterns": [
+ {
+ "include": "source.stata"
+ }
+ ]
+ },
+ {
+ "begin": "(<<)(dd_include|dd_skip_if)(:)",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.definition.tag.begin.html"
+ },
+ "2": {
+ "name": "entity.name.tag.block.$2.html"
+ },
+ "3": {
+ "name": "punctuation.separator.key-value.dyndoc.stata"
+ }
+ },
+ "end": "(>>)([^\r\n]*)?",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.definition.tag.end.html"
+ },
+ "2": {
+ "name": "invalid.illegal.name.dyndoc.stata"
+ }
+ },
+ "name": "meta.tag.block.$2.html"
+ },
+ {
+ "begin": "(<<)(dd_ignore)(>>)([^\r\n]*)?",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.definition.tag.begin.html"
+ },
+ "2": {
+ "name": "entity.name.tag.block.$2.html"
+ },
+ "3": {
+ "name": "punctuation.definition.tag.end.html"
+ },
+ "4": {
+ "name": "invalid.illegal.name.dyndoc.stata"
+ }
+ },
+ "end": "(<)(dd_ignore)(>>)([^\r\n]*)?",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.definition.tag.begin.html"
+ },
+ "2": {
+ "name": "entity.name.tag.block.$2.html"
+ },
+ "3": {
+ "name": "punctuation.definition.tag.end.html"
+ },
+ "4": {
+ "name": "invalid.illegal.name.dyndoc.stata"
+ }
+ },
+ "name": "meta.tag.block.$2.html",
+ "patterns": [
+ {
+ "include": "$self"
+ }
+ ]
+ },
+ {
+ "match": "(<<)(dd_skip_else|dd_skip_end)(>>)([^\r\n]*)?",
+ "captures": {
+ "1": {
+ "name": "punctuation.definition.tag.begin.html"
+ },
+ "2": {
+ "name": "entity.name.tag.block.$2.html"
+ },
+ "3": {
+ "name": "punctuation.definition.tag.end.html"
+ },
+ "4": {
+ "name": "invalid.illegal.name.dyndoc.stata"
+ }
+ },
+ "name": "meta.tag.block.$2.html"
+ },
+ {
+ "match": "(<<)(dd_version)(:)\\s*([0-9]+)(>>)([^\r\n]*)?",
+ "captures": {
+ "1": {
+ "name": "punctuation.definition.tag.begin.html"
+ },
+ "2": {
+ "name": "entity.name.tag.block.$2.html"
+ },
+ "3": {
+ "name": "punctuation.separator.key-value.dyndoc.stata"
+ },
+ "4": {
+ "name": "constant.numeric.integer.dyndoc.stata"
+ },
+ "5": {
+ "name": "punctuation.definition.tag.end.html"
+ },
+ "6": {
+ "name": "invalid.illegal.name.dyndoc.stata"
+ }
+ },
+ "name": "meta.tag.block.$2.html"
+ },
+ {
+ "begin": "<>",
+ "captures": {
+ "0": {
+ "name": "punctuation.definition.comment.dyndoc.stata"
+ }
+ },
+ "end": "<>",
+ "name": "comment.block.dyndoc.stata"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/grammars/stata.cson b/grammars/stata.cson
deleted file mode 100644
index 3c04ed6..0000000
--- a/grammars/stata.cson
+++ /dev/null
@@ -1,1334 +0,0 @@
-'scopeName': 'source.stata'
-'name': 'Stata'
-'fileTypes': [
- 'do',
- 'ado',
- 'mata'
-]
-'foldingStartMarker': '\\{\\s*$'
-'foldingStopMarker': '^\\s*\\}'
-'patterns': [
- {
- 'comment': 'color regexm with regular quotes i.e. " '
- 'match': '(regexm)(\\()([^,]+)(,)\\s*(\")([^"]+)(\")\\s*(\\))'
- 'captures':
- '1':
- 'name': 'support.function.builtin.stata'
- '2':
- 'name': 'punctuation.definition.parameters.begin.stata'
- '3':
- 'patterns': [
- {
- 'include': '#string-compound'
- }
- {
- 'include': '#string-regular'
- }
- {
- 'include': '#macro-local'
- }
- {
- 'include': '#macro-global'
- }
- {
- 'include': '#builtin_functions'
- }
- {
- 'match': '[A-Za-z_][A-Za-z0-9_]{0,31}'
- 'name': 'variable.parameter.function.stata'
- }
- {
- 'include': '#comments-triple-slash'
- }
- ]
- '4':
- 'name': 'punctuation.definition.variable.begin.stata' # the comma
- '5':
- 'name': 'punctuation.definition.string.begin.stata'
- '6':
- 'patterns': [
- {
- 'include': '#regex'
- }
- # {
- # 'include': '#comments-triple-slash'
- # }
- # Unknown if this helps. Regex not colored when regexm split over multiple lines as of 9/11/2017, 1:32:26 AM
- ]
- '7':
- 'name': 'punctuation.definition.string.end.stata'
- '8':
- 'name': 'punctuation.definition.parameters.end.stata'
- }
- {
- 'comment': 'color regexm with compound quotes'
- 'match': '(regexm)(\\()([^,]+)(,)\\s*(`\")([^"]+)(\"\')\\s*(\\))'
- 'captures':
- '1':
- 'name': 'support.function.builtin.stata'
- '2':
- 'name': 'punctuation.definition.parameters.begin.stata'
- '3':
- 'patterns': [
- {
- 'include': '#string-compound'
- }
- {
- 'include': '#string-regular'
- }
- {
- 'include': '#macro-local'
- }
- {
- 'include': '#macro-global'
- }
- {
- 'include': '#builtin_functions'
- }
- {
- 'match': '[A-Za-z_][A-Za-z0-9_]{0,31}'
- 'name': 'variable.parameter.function.stata'
- }
- {
- 'include': '#comments-triple-slash'
- }
- ]
- '4':
- 'name': 'punctuation.definition.variable.begin.stata' # the comma
- '5':
- 'name': 'punctuation.definition.string.begin.stata'
- '6':
- 'patterns': [
- {
- 'include': '#regex'
- }
- # {
- # 'include': '#comments-triple-slash'
- # }
- # Unknown if this helps. Regex not colored when regexm split over multiple lines as of 9/11/2017, 1:32:26 AM
- ]
- '7':
- 'name': 'punctuation.definition.string.end.stata'
- '8':
- 'name': 'punctuation.definition.parameters.end.stata'
- }
- {
- 'comment': 'color regexm with regular quotes i.e. " '
- 'match': '(regexr)(\\()([^,]+)(,)\\s*(\")([^"]+)(\")\\s*(,)([^\\)]*)(\\))'
- 'captures':
- '1':
- 'name': 'support.function.builtin.stata'
- '2':
- 'name': 'punctuation.definition.parameters.begin.stata'
- '3':
- 'patterns': [
- {
- 'include': '#string-compound'
- }
- {
- 'include': '#string-regular'
- }
- {
- 'include': '#macro-local'
- }
- {
- 'include': '#macro-global'
- }
- {
- 'include': '#builtin_functions'
- }
- {
- 'match': '[A-Za-z_][A-Za-z0-9_]{0,31}'
- 'name': 'variable.parameter.function.stata'
- }
- {
- 'include': '#comments'
- }
- ]
- '4':
- 'name': 'punctuation.definition.variable.begin.stata' # the comma
- '5':
- 'name': 'punctuation.definition.string.begin.stata'
- '6':
- 'patterns': [
- {
- 'include': '#regex'
- }
- ]
- '7':
- 'name': 'punctuation.definition.string.end.stata'
- '8':
- 'name': 'punctuation.definition.variable.begin.stata' # the comma
- '9':
- 'patterns': [
- {
- 'include': '#string-compound'
- }
- {
- 'include': '#string-regular'
- }
- {
- 'include': '#macro-local'
- }
- {
- 'include': '#macro-global'
- }
- {
- 'include': '#builtin_functions'
- }
- {
- 'match': '[A-Za-z_][A-Za-z0-9_]{0,31}'
- 'name': 'variable.parameter.function.stata'
- }
- {
- 'include': '#comments-triple-slash'
- }
- ]
- '10':
- 'name': 'punctuation.definition.parameters.end.stata'
- }
- {
- 'comment': 'color regexm with compound quotes i.e. `"text"\' '
- 'match': '(regexr)(\\()([^,]+)(,)\\s*(`\")([^"]+)(\"\')\\s*(,)([^\\)]*)(\\))'
- 'captures':
- '1':
- 'name': 'support.function.builtin.stata'
- '2':
- 'name': 'punctuation.definition.parameters.begin.stata'
- '3':
- 'patterns': [
- {
- 'include': '#string-compound'
- }
- {
- 'include': '#string-regular'
- }
- {
- 'include': '#macro-local'
- }
- {
- 'include': '#macro-global'
- }
- {
- 'include': '#builtin_functions'
- }
- {
- 'match': '[A-Za-z_][A-Za-z0-9_]{0,31}'
- 'name': 'variable.parameter.function.stata'
- }
- {
- 'include': '#comments'
- }
- ]
- '4':
- 'name': 'punctuation.definition.variable.begin.stata' # the comma
- '5':
- 'name': 'punctuation.definition.string.begin.stata'
- '6':
- 'patterns': [
- {
- 'include': '#regex'
- }
- ]
- '7':
- 'name': 'punctuation.definition.string.end.stata'
- '8':
- 'name': 'punctuation.definition.variable.begin.stata' # the comma
- '9':
- 'patterns': [
- {
- 'include': '#string-compound'
- }
- {
- 'include': '#string-regular'
- }
- {
- 'include': '#macro-local'
- }
- {
- 'include': '#macro-global'
- }
- {
- 'include': '#builtin_functions'
- }
- {
- 'match': '[A-Za-z_][A-Za-z0-9_]{0,31}'
- 'name': 'variable.parameter.function.stata'
- }
- {
- 'include': '#comments-triple-slash'
- }
- ]
- '10':
- 'name': 'punctuation.definition.parameters.end.stata'
- }
- {
- 'include': '#builtin_functions'
- }
- {
- 'include': '#other_functions'
- }
- {
- 'include': '#comments'
- }
- {
- 'include': '#numbers'
- }
- {
- 'include': '#operators'
- }
- {
- 'include': '#macro-local'
- }
- {
- 'include': '#macro-global'
- }
- {
- 'include': '#string-compound'
- }
- {
- 'include': '#string-regular'
- }
- {
- 'include': '#builtin_variables'
- }
- {
- 'include': '#subsetting'
- }
- {
- 'begin': '\\b(gl(o|ob|oba|obal)?)\\s+(?=[a-zA-Z_`\\$])'
- 'beginCaptures':
- '1':
- 'name': 'storage.modifier.macro.test.stata'
- 'end': '(\\})|(?=\\"|\\s|\\n|/|,)'
- 'patterns': [
- {
- 'include': '#reserved_names'
- }
- {
- 'match': '([A-Za-z_][A-Za-z0-9_]{0,31})'
- 'name': 'entity.name.type.class.stata'
- }
- {
- 'include': '#macro-local'
- }
- {
- 'include': '#macro-global'
- }
- ]
- }
- {
- 'begin': '\\b(loc(a|al)?)\\s+(\\+\\+|\\-\\-)?(?=[a-zA-Z_`\\$])'
- 'beginCaptures':
- '1':
- 'name': 'storage.modifier.macro.test.stata'
- '3':
- 'name': 'keyword.operator.arithmetic.stata'
- 'end': '(?=:|\\"|\\s|\\n|/|,)'
- 'patterns': [
- {
- 'include': '#reserved_names'
- }
- {
- 'match': '([A-Za-z_][A-Za-z0-9_]{0,31})'
- 'name': 'entity.name.type.class.stata'
- }
- {
- 'include': '#macro-local'
- }
- {
- 'include': '#macro-global'
- }
- ]
- }
- {
- 'begin': '\\b(tempvar|tempname|tempfile)\\s+(?=[a-zA-Z_`\\$])'
- 'beginCaptures':
- '1':
- 'name': 'storage.modifier.macro.test.stata'
- 'end': '(?=\\"|\\s|\\n|/|,)'
- 'patterns': [
- {
- 'include': '#reserved_names'
- }
- {
- 'match': '([A-Za-z_][A-Za-z0-9_]{0,31})'
- 'name': 'entity.name.type.class.stata'
- }
- {
- 'include': '#macro-local'
- }
- {
- 'include': '#macro-global'
- }
- ]
- }
- {
- 'comment': 'keywords that delimit flow conditionals'
- 'name': 'keyword.control.conditional.stata'
- 'match': '\\b(if|else if|else)\\b'
- }
- {
- 'captures':
- '1':
- 'name': 'storage.type.scalar.stata'
- 'match': '^\\s*(sca(l|la|lar)?(\\s+de(f|fi|fin|fine)?)?)\\s+(?!(drop|dir?|l(i|is|ist)?)\\s+)'
- }
- {
- 'begin': '\\b(mer(g|ge)?)\\s+(1|m|n)(:)(1|m|n)'
- 'beginCaptures':
- '1':
- 'name': 'keyword.control.flow.stata'
- '3':
- 'patterns': [
- {
- 'include': '#numbers'
- }
- {
- 'match': 'm|n'
- 'name': ''
- }
- ]
- '4':
- 'name': 'punctuation.separator.key-value'
- '5':
- 'patterns': [
- {
- 'include': '#numbers'
- }
- {
- 'match': 'm|n'
- 'name': ''
- }
- ]
- 'end': 'using'
- 'patterns': [
- {
- 'include': '#builtin_variables'
- }
- {
- 'include': '#macro-local'
- }
- {
- 'include': '#macro-global'
- }
- {
- 'include': '#comments'
- }
- ]
- }
- {
- 'captures':
- '1':
- 'name': 'keyword.control.flow.stata'
- '2':
- 'name': 'entity.name.type.class.stata'
- '3':
- 'name': 'keyword.control.flow.stata'
- 'match': '\\b(foreach)\\s+([a-zA-Z0-9_]{1,31})\\s+(in|of var(l|li|lis|list)?|of new(l|li|lis|list)?|of num(l|li|lis|list)?)\\b'
- }
- {
- 'begin': '\\b(foreach)\\s+([a-zA-Z0-9_]{1,31})\\s+(of loc(a|al)?|of glo(b|ba|bal)?)\\b\\s*'
- 'beginCaptures':
- '1':
- 'name': 'keyword.control.flow.stata'
- '2':
- 'name': 'entity.name.type.class.stata'
- '3':
- 'name': 'keyword.control.flow.stata'
- 'end': '(?=\\s*\\{)'
- 'patterns': [
- {
- 'include': '#reserved_names'
- }
- {
- 'match': '([A-Za-z_][A-Za-z0-9_]{0,31})'
- 'name': 'entity.name.type.class.stata'
- }
- {
- 'include': '#macro-local'
- }
- {
- 'include': '#macro-global'
- }
- ]
- }
- {
- 'captures':
- '1':
- 'name': 'keyword.control.flow.stata'
- '2':
- 'name': 'entity.name.type.class.stata'
- '3':
- 'name': 'keyword.operator.assignment.stata'
- '4':
- 'patterns': [
- {
- 'include': '#numbers'
- }
- {
- 'include': '#operators'
- }
- ]
- 'match': '\\b(forvalues)\\s+([a-zA-Z0-9_]{1,31})\\s*(=)\\s*([0-9\\(\\)/:\. ]+)\\s*'
- }
- {
- 'comment': 'keywords that delimit loops'
- 'name': 'keyword.control.flow.stata'
- 'match': '\\b(while|continue)\\b'
- }
- {
- 'captures':
- '1':
- 'name': 'keyword.other.stata'
- 'comment': 'keywords that haven\'t fit into other groups (yet).'
- 'match': '\\b(as|ass|asse|asser|assert)\\b'
- }
- {
- 'match': '\\b(by(s|so|sor|sort)?|statsby|rolling|bootstrap|jackknife|permute|simulate|svy|mi est(i|im|ima|imat|imate)?|nestreg|stepwise|xi|fp|mfp|vers(i|io|ion)?)\\b'
- 'name': 'storage.type.function.stata'
- 'comment': 'prefixes that require a colon'
- }
- {
- 'comment': 'prefixes that don\'t need a colon'
- 'name': 'keyword.control.flow.stata'
- 'match': '\\b(qui(e|et|etl|etly)?|n(o|oi|ois|oisi|oisil|oisily)?|cap(t|tu|tur|ture)?)\\b:?'
- }
- {
- 'match': '\\s*(pr(o|og|ogr|ogra|ogram)?)\\s+((di(r)?|drop|l(i|is|ist)?)\\s+)([A-Za-z_][A-Za-z0-9_]{0,31})'
- 'captures':
- '1':
- 'name': 'storage.type.function.stata'
- '2':
- 'name': 'storage.type.function.stata'
- '7':
- 'name': 'entity.name.function.stata'
- }
- {
- 'begin': '^\\s*(pr(o|og|ogr|ogra|ogram)?)\\s+(de(f|fi|fin|fine)?\\s+)?'
- 'beginCaptures':
- '1':
- 'name': 'storage.type.function.stata'
- '3':
- 'name': 'storage.type.function.stata'
- 'end': '(?=,|\\n|/)'
- 'patterns': [
- {
- 'include': '#macro-local'
- }
- {
- 'include': '#macro-global'
- }
- {
- 'match': '([A-Za-z_][A-Za-z0-9_]{0,31})'
- 'name': 'entity.name.function.stata'
- }
- {
- 'match': '[^A-za-z_0-9,\\n/ ]+'
- 'name': 'invalid.illegal.name.stata'
- }
- ]
- }
- {
- 'match': '\\b(form(a|at)?)\\s*([A-Za-z_][A-Za-z0-9_]{0,31})*\\s*(%)(\-)?(0)?([0-9]+)(\.)([0-9]+)(e|f|g)(c)?'
- 'captures':
- '1': 'keyword.functions.data.stata.test'
- }
- {
- "captures":
- "1":
- "name": "support.function.models.stata"
- "comment": "model commands."
- "match": "\\b(anova|xtmixed|regress|ivregress|xtreg|xtreg_be|xtreg_fe|xtreg_ml|xtreg_pa_p|xtreg_re|xtregar|xtrere_p|xtset|xtsf_ll|xtsf_llti|xtsum|xttab|xttest0|xttobit|xttobit_8|xttobit_p|xttrans)\\b"
- }
- {
- 'comment': ' If you put braces following the if or else, (same with foreach, etc)
- 1. the open brace must appear on the same line as the if or else;
- 2. nothing may follow the open brace except, of course, comments;
- the first command to be executed must appear on a new line;
- 3. the close brace must appear on a line by itself.'
- 'begin': '(\\{)\\s*([^\\n]*)(?=\\n)'
- 'beginCaptures':
- '1':
- 'name': 'keyword.control.block.begin.stata'
- '2':
- 'patterns': [
- {
- 'include': '#comments'
- }
- {
- 'match': '[^\\n]+'
- 'name': 'illegal.invalid.name.stata'
- }
- ]
- 'comment': 'It\'s a complicated regex so that it\'ll alert you if you have text on the same line as the }'
- 'comment': 'correct with nothing else on the line but whitespace; before and after; before; after; correct'
- 'end': '^\\s*(\\})\\s*$|^\\s*([^\\*"\\}]+)\\s*(\\})\\s*([^\\*"\\}/\\n]+)|^\\s*([^"\\*\\}]+)\\s*(\\})|\\s*(\\})\\s*([^"\\*\\}/\\n]+)|(\\})$'
- 'endCaptures':
- '1':
- 'name': 'keyword.control.block.end.stata'
- '2':
- 'name': 'invalid.illegal.name.stata'
- '3':
- 'name': 'keyword.control.block.end.stata'
- '4':
- 'name': 'invalid.illegal.name.stata'
- '5':
- 'name': 'invalid.illegal.name.stata'
- '6':
- 'name': 'keyword.control.block.end.stata'
- '7':
- 'name': 'keyword.control.block.end.stata'
- '8':
- 'name': 'invalid.illegal.name.stata'
- '9':
- 'name': 'keyword.control.block.end.stata'
- 'patterns': [
- {
- 'include': '$self'
- }
- ]
- }
- # Start manual functions:
- {
- 'comment': 'Color the syntax command'
- 'begin': '^\\s*(?=(syntax))'
- 'end': '\\n'
- 'patterns': [
- {
- 'comment': 'color before the comma'
- 'begin': '(syntax)\\s*'
- 'beginCaptures':
- '1':
- 'name': 'keyword.functions.program.stata'
- 'end': '(?=,|\\n)'
- 'patterns': [
- {
- 'match': '((\\[?)(varlist|varname|newvarlist|newvarname|namelist|name|anything|if|in|using|exp|fweight|aweight|pweight|iweight)(\\])?)+\\s*'
- 'captures':
- '2':
- 'name': 'punctuation.definition.parameters.begin.stata'
- '3':
- 'name': 'entity.name.type.class.stata'
- '4':
- 'name': 'punctuation.definition.parameters.end.stata'
- }
- {
- 'include': '$self'
- }
- ]
- }
- {
- 'comment': 'things to color after the comma'
- 'comment': 'TODO: This can be improved to alert when new macros are created with illegal meaning'
- 'begin': '(,)'
- 'beginCaptures':
- '1':
- 'name': 'punctuation.definition.variable.begin.stata'
- 'end': '(?=\\n)'
- 'patterns': [
- {
- 'comment': 'color options with parentheses'
- 'begin': '([a-zA-Z_0-9]+)(\\()'
- 'beginCaptures':
- '1':
- 'comment': 'these are the names that become macros'
- 'name': 'entity.name.type.class.stata'
- '2':
- 'name': 'keyword.operator.parentheses.stata'
- 'end': '(\\))'
- 'endCaptures':
- '1':
- 'name': 'keyword.operator.parentheses.stata'
- 'patterns': [
- {
- 'comment': 'the first word is often a type'
- 'match': '(int(e|eg|ege|eger)?|real|str(i|in|ing)?)'
- 'name': 'support.type.stata'
- }
- {
- 'include': '$self'
- }
- ]
- }
- {
- 'comment': 'true/false options'
- 'match': '[A-Za-z_0-9]+'
- 'name': 'entity.name.type.class.stata'
- }
- {
- 'include': '$self'
- }
- ]
- }
- ]
- }
- {
- 'captures':
- '1':
- 'name': 'keyword.functions.data.stata'
- 'comment': 'one-word commands',
- 'match': '\\b(sa(v|ve)|saveold|destring|replace|tostring|u(s|se)?|note(s)?|form(a|at)?)\\b'
- }
- {
- 'match': '\\b(exit|end)\\b'
- 'name': 'keyword.functions.data.stata'
- 'comment': 'programming commands'
- }
- {
- 'match':
- '\\b(gen(e|er|era|erat|erate)?|egen)\\s+((byte|int|long|float|double|str[1-9]?[0-9]?[0-9]?[0-9]?|strL)\\s+)?([^=]+)\\s*(=)'
- 'captures':
- '1':
- 'name': 'keyword.functions.data.stata'
- '3':
- 'name': 'support.type.stata'
- '5':
- 'patterns': [
- {
- 'include': '#illegal_names'
- }
- {
- 'include': '#macro-local'
- }
- ]
- '6':
- 'name': 'keyword.operator.assignment.stata'
- }
- {
- 'match': '\\b(set ty(p|pe)?)\\s+((byte|int|long|float|double|str[1-9]?[0-9]?[0-9]?[0-9]?|strL)?\\s+)'
- 'captures':
- '1':
- 'name': 'keyword.functions.data.stata'
- '3':
- 'name': 'support.type.stata'
- }
- {
- 'match': '\\b(la(b|be|bel)?)\\s+(da(t|ta)?|var(i|ia|iab|iabl|iable)?|de(f|fi|fin|fine)?|val(u|ue|ues)?|di(r)?|l(i|is|ist)?|copy|drop|save|lang(u|ua|uag|uage)?)'
- 'captures':
- '1':
- 'name': 'keyword.functions.data.stata'
- '3':
- 'name': 'keyword.functions.data.stata'
- }
- {
- 'match':
- '\\b(drop|keep)\\s+((if)\\s+(.+)\\s+(in)|(in)\\s+(.+)\\s+(if)|(if)|(in))?'
- 'captures':
- '1':
- 'name': 'keyword.functions.data.stata'
- '3':
- 'name': 'keyword.functions.data.stata'
- '4':
- 'patterns': [
- {
- 'include': '$self'
- }
- ]
- '5':
- 'name': 'keyword.functions.data.stata'
- '6':
- 'name': 'keyword.functions.data.stata'
- '7':
- 'patterns': [
- {
- 'include': '$self'
- }
- ]
- '8':
- 'name': 'keyword.functions.data.stata'
- '9':
- 'name': 'keyword.functions.data.stata'
- '10':
- 'name': 'keyword.functions.data.stata'
- }
- {
- 'begin': '^\\s*mata:?\\s*$'
- 'comment': 'won\'t match single-line Mata statements'
- 'contentName': 'source.mata'
- 'end': '^\\s*end\\s*$\\n?'
- 'name': 'meta.embedded.block.mata'
- 'patterns': [
- {
- 'include': 'source.mata'
- }
- ]
- }
- {
- 'include': '#commands-other'
- }
-]
-'repository':
- 'builtin_functions':
- 'patterns': [
- {
- 'begin': '\\b(bofd|Cdhms|Chms|Clock|clock|Cmdyhms|Cofc|cofC|Cofd|cofd|daily|date|day|dhms|dofb|dofC|dofc|dofh|dofm|dofq|dofw|dofy|dow|doy|halfyear|halfyearly|hh|hhC|hms|hofd|hours|mdy|mdyhms|minutes|mm|mmC|mofd|month|monthly|msofhours|msofminutes|msofseconds|qofd|quarter|quarterly|seconds|ss|ssC|tC|tc|td|th|tm|tq|tw|week|weekly|wofd|year|yearly|yh|ym|yofd|yq|yw|betaden|ibeta|ibetatail|invibeta|invibetatail|nbetaden|nibeta|invnibeta|binomialp|binomial|binomialtail|invbinomial|invbinomialtail|cauchyden|cauchy|cauchytail|invcauchy|invcauchytail|lncauchyden|chi2den|chi2|chi2tail|invchi2|invchi2tail|nchi2den|nchi2|nchi2tail|invnchi2|invnchi2tail|npnchi2|dunnettprob|invdunnettprob|exponentialden|exponential|exponentialtail|invexponential|invexponentialtail|Fden|F|Ftail|invF|invFtail|nFden|nF|nFtail|invnF|invnFtail|npnF|gammaden|gammap|gammaptail|invgammap|invgammaptail|dgammapda|dgammapdada|dgammapdadx|dgammapdx|dgammapdxdx|lnigammaden|hypergeometricp|hypergeometric|igaussianden|igaussian|igaussiantail|invigaussian|invigaussiantail|lnigaussianden|laplaceden|laplace|laplacetail|invlaplace|invlaplacetail|lnlaplaceden|logisticden|logisticden|logisticden|logistic|logistic|logistic|logistictail|logistictail|logistictail|invlogistic|invlogistic|invlogistic|invlogistictail|invlogistictail|invlogistictail|nbinomialp|nbinomial|nbinomialtail|invnbinomial|invnbinomialtail|normalden|normalden|normalden|normal|invnormal|lnnormalden|lnnormalden|lnnormalden|lnnormal|binormal|lnmvnormalden|poissonp|poisson|poissontail|invpoisson|invpoissontail|tden|t|ttail|invt|invttail|invnt|invnttail|ntden|nt|nttail|npnt|tukeyprob|invtukeyprob|weibullden|weibullden|weibull|weibull|weibulltail|weibulltail|invweibull|invweibull|invweibulltail|invweibulltail|weibullphden|weibullphden|weibullph|weibullph|weibullphtail|weibullphtail|invweibullph|invweibullph|invweibullphtail|invweibullphtail|lnwishartden|lniwishartden|abs|ceil|cloglog|comb|digamma|exp|floor|int|invcloglog|invlogit|ln|lnfactorial|lngamma|log|log10|logit|max|min|mod|reldif|round|sign|sqrt|sum|trigamma|trunc|cholesky|corr|diag|get|hadamard|I|inv|invsym|J|matuniform|nullmat|sweep|vec|vecdiag|coleqnumb|colnfreeparms|colnumb|colsof|det|diag0cnt|el|issymmetric|matmissing|mreldif|roweqnumb|rownfreeparms|rownumb|rowsof|trace|autocode|byteorder|c|chop|clip|cond|e|e|epsdouble|epsfloat|fileexists|fileread|filereaderror|filewrite|float|fmtwidth|inlist|inrange|irecode|matrix|maxbyte|maxdouble|maxfloat|maxint|maxlong|mi|minbyte|mindouble|minfloat|minint|minlong|missing|r|recode|replay|return|s|scalar|smallestdouble|runiform|runiform|runiformint|rbeta|rbinomial|rcauchy|rchi2|rexponential|rgamma|rhypergeometric|rigaussian|rlaplace|rlogistic|rlogistic|rlogistic|rnbinomial|rnormal|rnormal|rnormal|rpoisson|rt|rweibull|rweibull|rweibullph|rweibullph|abbrev|char|uchar|collatorlocale|collatorversion|indexnot|plural|plural|real|regexm|regexr|regexs|ustrregexm|ustrregexrf|ustrregexra|ustrregexs|soundex|strcat|strdup|string|string|stritrim|strlen|ustrlen|udstrlen|strlower|ustrlower|strltrim|ustrltrim|strmatch|strofreal|strofreal|strpos|ustrpos|strproper|ustrtitle|strreverse|ustrreverse|strrpos|ustrrpos|strrtrim|ustrrtrim|strtoname|ustrtoname|strtrim|ustrtrim|strupper|ustrupper|subinstr|usubinstr|subinword|substr|usubstr|udsubstr|tobytes|uisdigit|uisletter|ustrcompare|ustrcompareex|ustrfix|ustrfrom|ustrinvalidcnt|ustrleft|ustrnormalize|ustrright|ustrsortkey|ustrsortkeyex|ustrto|ustrtohex|ustrunescape|word|ustrword|wordbreaklocale|wordcount|ustrwordcount|abbrev|char|indexnot|itrim|length|lower|ltrim|plural|proper|real|regexm|regexr|regexs|reverse|rtrim|soundex|strcat|strdup|string|string|strmatch|strpos|strtoname|strtoname|subinstr|subinword|substr|trim|upper|word|wordcount|tin|twithin|acos|acosh|asin|asinh|atan|atan2|atanh|cos|cosh|sin|sinh|tan|tanh|mi)(\\()'
- 'beginCaptures':
- '1':
- 'name': 'support.function.builtin.stata'
- '2':
- 'name': 'punctuation.definition.parameters.begin.stata'
- 'end': '(\\))'
- 'endCaptures':
- '1':
- 'name': 'punctuation.definition.parameters.end.stata'
- 'patterns': [
- {
- 'include': '#builtin_functions'
- }
- {
- 'include': '#other_functions'
- }
- {
- 'match': '[A-Za-z_][A-Za-z0-9_]{0,31}'
- 'name': 'variable.parameter.function.stata'
- }
- {
- 'include': '#subsetting'
- }
- {
- 'include': '$self'
- }
- ]
- }
- ]
- 'other_functions':
- 'patterns': [
- {
- 'comment': 'this is to color [a-z]+() in options and custom functions'
- 'begin': '([a-zA-Z_]+)(\\()'
- 'beginCaptures':
- '1':
- 'name': 'support.function.custom.stata'
- '2':
- 'name': 'punctuation.definition.parameters.begin.stata'
- 'end': '(\\))'
- 'endCaptures':
- '1':
- 'name': 'punctuation.definition.parameters.end.stata'
- 'patterns': [
- {
- 'include': '#builtin_functions'
- }
- {
- 'include': '#other_functions'
- }
- {
- 'match': '[A-Za-z_][A-Za-z0-9_]{0,31}'
- 'name': 'variable.parameter.function.stata'
- }
- {
- 'include': '#subsetting'
- }
- {
- 'include': '$self'
- }
- ]
- }
- ]
- 'builtin_types':
- 'patterns': [
- {
- 'match': '\\b(byte|int|long|float|double|str[1-9]?[0-9]?[0-9]?[0-9]?|strL)\\b'
- 'name': 'support.type.stata'
- }
- ]
- 'builtin_variables':
- 'patterns': [
- {
- 'match': '\\b(_b|_coef|_cons|_n|_N|_rc|_se)\\b'
- 'name': 'variable.object.stata'
- }
- ]
- 'commands-other':
- 'patterns': [
- {
- 'comment': 'generic keywords that alter flow. Without disctintion. We can separate this after, but now they will be colored'
- 'match': '\\b(about|ac|ac_7|acprplot|acprplot_7|adjust|ado|adopath|adoupdate|alpha|ameans|an|ano|anov|anova|anova_estat|anova_terms|anovadef|aorder|ap|app|appe|appen|append|arch|arch_dr|arch_estat|arch_p|archlm|areg|areg_p|args|arima|arima_dr|arima_estat|arima_p|asmprobit|asmprobit_estat|asmprobit_lf|asmprobit_mfx__dlg|asmprobit_p|avplot|avplot_7|avplots|avplots_7|bcskew0|bgodfrey|binreg|bip0_lf|biplot|bipp_lf|bipr_lf|bipr_p|biprobit|bitest|bitesti|bitowt|blogit|bmemsize|boot|bootsamp|bootstrap_8|boxco_l|boxco_p|boxcox|boxcox_6|boxcox_p|bprobit|br|break|brier|bro|brow|brows|browse|brr|brrstat|bs|bs_7|bsampl_w|bsample|bsample_7|bsqreg|bstat|bstat_7|bstat_8|bstrap|bstrap_7|ca|ca_estat|ca_p|cabiplot|camat|canon|canon_8|canon_8_p|canon_estat|canon_p|caprojection|cat|cc|cchart|cchart_7|cci|cd|censobs_table|centile|cf|char|chdir|checkdlgfiles|checkestimationsample|checkhlpfiles|checksum|chelp|ci|cii|cl|class|classutil|clear|cli|clis|clist|clo|clog|clog_lf|clog_p|clogi|clogi_sw|clogit|clogit_lf|clogit_p|clogitp|clogl_sw|cloglog|clonevar|clslistarray|cluster|cluster_measures|cluster_stop|cluster_tree|cluster_tree_8|clustermat|cmdlog|cnr|cnre|cnreg|cnreg_p|cnreg_sw|cnsreg|codebook|collaps4|collapse|colormult_nb|colormult_nw|compare|compress|conf|confi|confir|confirm|conren|cons|const|constr|constra|constrai|constrain|constraint|contract|copy|copyright|copysource|cor|corc|corr|corr2data|corr_anti|corr_kmo|corr_smc|corre|correl|correla|correlat|correlate|corrgram|cou|coun|count|cox|cox_p|cox_sw|coxbase|coxhaz|coxvar|cprplot|cprplot_7|crc|cret|cretu|cretur|creturn|cross|cs|cscript|cscript_log|csi|ct|ct_is|ctset|ctst_5|ctst_st|cttost|cumsp|cumsp_7|cumul|cusum|cusum_7|cutil|d|datasig|datasign|datasigna|datasignat|datasignatu|datasignatur|datasignature|datetof|db|dbeta|de|dec|deco|decod|decode|deff|des|desc|descr|descri|describ|describe|dfbeta|dfgls|dfuller|di|di_g|dir|dirstats|dis|discard|disp|disp_res|disp_s|displ|displa|display|do|doe|doed|doedi|doedit|dotplot|dotplot_7|dprobit|drawnorm|ds|ds_util|dstdize|duplicates|durbina|dwstat|dydx|ed|edi|edit|eivreg|emdef|en|enc|enco|encod|encode|eq|erase|ereg|ereg_lf|ereg_p|ereg_sw|ereghet|ereghet_glf|ereghet_glf_sh|ereghet_gp|ereghet_ilf|ereghet_ilf_sh|ereghet_ip|eret|eretu|eretur|ereturn|err|erro|error|est|est_cfexist|est_cfname|est_clickable|est_expand|est_hold|est_table|est_unhold|est_unholdok|estat|estat_default|estat_summ|estat_vce_only|esti|estimates|etodow|etof|etomdy|expand|expandcl|fac|fact|facto|factor|factor_estat|factor_p|factor_pca_rotated|factor_rotate|factormat|fcast|fcast_compute|fcast_graph|fdades|fdadesc|fdadescr|fdadescri|fdadescrib|fdadescribe|fdasav|fdasave|fdause|fh_st|file|filefilter|fillin|find_hlp_file|findfile|findit|findit_7|fit|fl|fli|flis|flist|for5_0|fpredict|frac_154|frac_adj|frac_chk|frac_cox|frac_ddp|frac_dis|frac_dv|frac_in|frac_mun|frac_pp|frac_pq|frac_pv|frac_wgt|frac_xo|fracgen|fracplot|fracplot_7|fracpoly|fracpred|fron_ex|fron_hn|fron_p|fron_tn|fron_tn2|frontier|ftodate|ftoe|ftomdy|ftowdate|g|gamhet_glf|gamhet_gp|gamhet_ilf|gamhet_ip|gamma|gamma_d2|gamma_p|gamma_sw|gammahet|gdi_hexagon|gdi_spokes|genrank|genstd|genvmean|gettoken|gladder|gladder_7|glim_l01|glim_l02|glim_l03|glim_l04|glim_l05|glim_l06|glim_l07|glim_l08|glim_l09|glim_l10|glim_l11|glim_l12|glim_lf|glim_mu|glim_nw1|glim_nw2|glim_nw3|glim_p|glim_v1|glim_v2|glim_v3|glim_v4|glim_v5|glim_v6|glim_v7|glm|glm_6|glm_p|glm_sw|glmpred|glogit|glogit_8|glogit_p|gmeans|gnbre_lf|gnbreg|gnbreg_5|gnbreg_p|gomp_lf|gompe_sw|gomper_p|gompertz|gompertzhet|gomphet_glf|gomphet_glf_sh|gomphet_gp|gomphet_ilf|gomphet_ilf_sh|gomphet_ip|gphdot|gphpen|gphprint|gprefs|gprobi_p|gprobit|gprobit_8|gr|gr7|gr_copy|gr_current|gr_db|gr_describe|gr_dir|gr_draw|gr_draw_replay|gr_drop|gr_edit|gr_editviewopts|gr_example|gr_example2|gr_export|gr_print|gr_qscheme|gr_query|gr_read|gr_rename|gr_replay|gr_save|gr_set|gr_setscheme|gr_table|gr_undo|gr_use|graph|graph7|grebar|greigen|greigen_7|greigen_8|grmeanby|grmeanby_7|gs_fileinfo|gs_filetype|gs_graphinfo|gs_stat|gsort|gwood|h|hadimvo|hareg|hausman|haver|he|heck_d2|heckma_p|heckman|heckp_lf|heckpr_p|heckprob|hel|help|hereg|hetpr_lf|hetpr_p|hetprob|hettest|hexdump|hilite|hist|hist_7|histogram|hlogit|hlu|hmeans|hotel|hotelling|hprobit|hreg|hsearch|icd9|icd9_ff|icd9p|iis|impute|imtest|inbase|include|inf|infi|infil|infile|infix|inp|inpu|input|ins|insheet|insp|inspe|inspec|inspect|integ|inten|intreg|intreg_7|intreg_p|intrg2_ll|intrg_ll|intrg_ll2|ipolate|iqreg|ir|irf|irf_create|irfm|iri|is_svy|is_svysum|isid|istdize|ivprob_1_lf|ivprob_lf|ivprobit|ivprobit_p|ivreg|ivreg_footnote|ivtob_1_lf|ivtob_lf|ivtobit|ivtobit_p|jacknife|jknife|jknife_6|jknife_8|jkstat|joinby|kalarma1|kap|kap_3|kapmeier|kappa|kapwgt|kdensity|kdensity_7|ksm|ksmirnov|ktau|kwallis|labelbook|ladder|levels|levelsof|leverage|lfit|lfit_p|li|lincom|line|linktest|lis|list|lloghet_glf|lloghet_glf_sh|lloghet_gp|lloghet_ilf|lloghet_ilf_sh|lloghet_ip|llogi_sw|llogis_p|llogist|llogistic|llogistichet|lnorm_lf|lnorm_sw|lnorma_p|lnormal|lnormalhet|lnormhet_glf|lnormhet_glf_sh|lnormhet_gp|lnormhet_ilf|lnormhet_ilf_sh|lnormhet_ip|lnskew0|loadingplot|log|logi|logis_lf|logistic|logistic_p|logit|logit_estat|logit_p|loglogs|logrank|loneway|lookfor|lookup|lowess|lowess_7|lpredict|lrecomp|lroc|lroc_7|lrtest|ls|lsens|lsens_7|lsens_x|lstat|ltable|ltable_7|ltriang|lv|lvr2plot|lvr2plot_7|m|ma|mac|macr|macro|makecns|man|manova|manova_estat|manova_p|manovatest|mantel|mark|markin|markout|marksample|mat|mat_capp|mat_order|mat_put_rr|mat_rapp|mata|mata_clear|mata_describe|mata_drop|mata_matdescribe|mata_matsave|mata_matuse|mata_memory|mata_mlib|mata_mosave|mata_rename|mata_which|matalabel|matcproc|matlist|matname|matr|matri|matrix|matrix_input__dlg|matstrik|mcc|mcci|md0_|md1_|md1debug_|md2_|md2debug_|mds|mds_estat|mds_p|mdsconfig|mdslong|mdsmat|mdsshepard|mdytoe|mdytof|me_derd|mean|means|median|memory|memsize|meqparse|mfp|mfx|mhelp|mhodds|minbound|mixed_ll|mixed_ll_reparm|mkassert|mkdir|mkmat|mkspline|ml|ml_5|ml_adjs|ml_bhhhs|ml_c_d|ml_check|ml_clear|ml_cnt|ml_debug|ml_defd|ml_e0|ml_e0_bfgs|ml_e0_cycle|ml_e0_dfp|ml_e0i|ml_e1|ml_e1_bfgs|ml_e1_bhhh|ml_e1_cycle|ml_e1_dfp|ml_e2|ml_e2_cycle|ml_ebfg0|ml_ebfr0|ml_ebfr1|ml_ebh0q|ml_ebhh0|ml_ebhr0|ml_ebr0i|ml_ecr0i|ml_edfp0|ml_edfr0|ml_edfr1|ml_edr0i|ml_eds|ml_eer0i|ml_egr0i|ml_elf|ml_elf_bfgs|ml_elf_bhhh|ml_elf_cycle|ml_elf_dfp|ml_elfi|ml_elfs|ml_enr0i|ml_enrr0|ml_erdu0|ml_erdu0_bfgs|ml_erdu0_bhhh|ml_erdu0_bhhhq|ml_erdu0_cycle|ml_erdu0_dfp|ml_erdu0_nrbfgs|ml_exde|ml_footnote|ml_geqnr|ml_grad0|ml_graph|ml_hbhhh|ml_hd0|ml_hold|ml_init|ml_inv|ml_log|ml_max|ml_mlout|ml_mlout_8|ml_model|ml_nb0|ml_opt|ml_p|ml_plot|ml_query|ml_rdgrd|ml_repor|ml_s_e|ml_score|ml_searc|ml_technique|ml_unhold|mleval|mlf_|mlmatbysum|mlmatsum|mlog|mlogi|mlogit|mlogit_footnote|mlogit_p|mlopts|mlsum|mlvecsum|mnl0_|mor|more|mov|move|mprobit|mprobit_lf|mprobit_p|mrdu0_|mrdu1_|mvdecode|mvencode|mvreg|mvreg_estat|nbreg|nbreg_al|nbreg_lf|nbreg_p|nbreg_sw|nestreg|net|newey|newey_7|newey_p|news|nl|nl_7|nl_9|nl_9_p|nl_p|nl_p_7|nlcom|nlcom_p|nlexp2|nlexp2_7|nlexp2a|nlexp2a_7|nlexp3|nlexp3_7|nlgom3|nlgom3_7|nlgom4|nlgom4_7|nlinit|nllog3|nllog3_7|nllog4|nllog4_7|nlog_rd|nlogit|nlogit_p|nlogitgen|nlogittree|nlpred|nobreak|notes_dlg|nptrend|numlabel|numlist|odbc|old_ver|olo|olog|ologi|ologi_sw|ologit|ologit_p|ologitp|on|one|onew|onewa|oneway|op_colnm|op_comp|op_diff|op_inv|op_str|opr|opro|oprob|oprob_sw|oprobi|oprobi_p|oprobit|oprobitp|opts_exclusive|order|orthog|orthpoly|ou|out|outf|outfi|outfil|outfile|outs|outsh|outshe|outshee|outsheet|ovtest|pac|pac_7|palette|parse|parse_dissim|pause|pca|pca_8|pca_display|pca_estat|pca_p|pca_rotate|pcamat|pchart|pchart_7|pchi|pchi_7|pcorr|pctile|pentium|pergram|pergram_7|permute_8|personal|peto_st|pkcollapse|pkcross|pkequiv|pkexamine|pkexamine_7|pkshape|pksumm|pksumm_7|pl|plo|plot|plugin|pnorm|pnorm_7|poisgof|poiss_lf|poiss_sw|poisso_p|poisson|poisson_estat|post|postclose|postfile|postutil|pperron|prais|prais_e|prais_e2|prais_p|predict|predictnl|preserve|print|prob|probi|probit|probit_estat|probit_p|proc_time|procoverlay|procrustes|procrustes_estat|procrustes_p|profiler|prop|proportion|prtest|prtesti|pwcorr|pwd|q\s|qby|qbys|qchi|qchi_7|qladder|qladder_7|qnorm|qnorm_7|qqplot|qqplot_7|qreg|qreg_c|qreg_p|qreg_sw|qu|quadchk|quantile|quantile_7|que|quer|query|range|ranksum|ratio|rchart|rchart_7|rcof|recast|recode|reg|reg3|reg3_p|regdw|regr|regre|regre_p2|regres|regres_p|regress|regress_estat|regriv_p|remap|ren|rena|renam|rename|renpfix|repeat|reshape|restore|ret|retu|retur|return|rmdir|robvar|roccomp|roccomp_7|roccomp_8|rocf_lf|rocfit|rocfit_8|rocgold|rocplot|rocplot_7|roctab|roctab_7|rologit|rologit_p|rot|rota|rotat|rotate|rotatemat|rreg|rreg_p|ru|run|runtest|rvfplot|rvfplot_7|rvpplot|rvpplot_7|safesum|sample|sampsi|savedresults|sc|scatter|scm_mine|sco|scob_lf|scob_p|scobi_sw|scobit|scor|score|scoreplot|scoreplot_help|scree|screeplot|screeplot_help|sdtest|sdtesti|se|search|separate|seperate|serrbar|serrbar_7|serset|set|set_defaults|sfrancia|sh|she|shel|shell|shewhart|shewhart_7|signestimationsample|signrank|signtest|simul|simul_7|simulate_8|sktest|sleep|slogit|slogit_d2|slogit_p|smooth|snapspan|so|sor|sort|spearman|spikeplot|spikeplot_7|spikeplt|spline_x|split|sqreg|sqreg_p|sret|sretu|sretur|sreturn|ssc|st|st_ct|st_hc|st_hcd|st_hcd_sh|st_is|st_issys|st_note|st_promo|st_set|st_show|st_smpl|st_subid|stack|statsby_8|stbase|stci|stci_7|stcox|stcox_estat|stcox_fr|stcox_fr_ll|stcox_p|stcox_sw|stcoxkm|stcoxkm_7|stcstat|stcurv|stcurve|stcurve_7|stdes|stem|stepwise|stereg|stfill|stgen|stir|stjoin|stmc|stmh|stphplot|stphplot_7|stphtest|stphtest_7|stptime|strate|strate_7|streg|streg_sw|streset|sts|sts_7|stset|stsplit|stsum|sttocc|sttoct|stvary|stweib|su|suest|suest_8|sum|summ|summa|summar|summari|summariz|summarize|sunflower|sureg|survcurv|survsum|svar|svar_p|svmat|svy_disp|svy_dreg|svy_est|svy_est_7|svy_estat|svy_get|svy_gnbreg_p|svy_head|svy_header|svy_heckman_p|svy_heckprob_p|svy_intreg_p|svy_ivreg_p|svy_logistic_p|svy_logit_p|svy_mlogit_p|svy_nbreg_p|svy_ologit_p|svy_oprobit_p|svy_poisson_p|svy_probit_p|svy_regress_p|svy_sub|svy_sub_7|svy_x|svy_x_7|svy_x_p|svydes|svydes_8|svygen|svygnbreg|svyheckman|svyheckprob|svyintreg|svyintreg_7|svyintrg|svyivreg|svylc|svylog_p|svylogit|svymarkout|svymarkout_8|svymean|svymlog|svymlogit|svynbreg|svyolog|svyologit|svyoprob|svyoprobit|svyopts|svypois|svypois_7|svypoisson|svyprobit|svyprobt|svyprop|svyprop_7|svyratio|svyreg|svyreg_p|svyregress|svyset|svyset_7|svyset_8|svytab|svytab_7|svytest|svytotal|sw|sw_8|swcnreg|swcox|swereg|swilk|swlogis|swlogit|swologit|swoprbt|swpois|swprobit|swqreg|swtobit|swweib|symmetry|symmi|symplot|symplot_7|sysdescribe|sysdir|sysuse|szroeter|ta|tab|tab1|tab2|tab_or|tabd|tabdi|tabdis|tabdisp|tabi|table|tabodds|tabodds_7|tabstat|tabu|tabul|tabula|tabulat|tabulate|te|tes|test|testnl|testparm|teststd|tetrachoric|time_it|timer|tis|tob|tobi|tobit|tobit_p|tobit_sw|token|tokeni|tokeniz|tokenize|total|translate|translator|transmap|treat_ll|treatr_p|treatreg|trim|trnb_cons|trnb_mean|trpoiss_d2|trunc_ll|truncr_p|truncreg|tsappend|tset|tsfill|tsline|tsline_ex|tsreport|tsrevar|tsrline|tsset|tssmooth|tsunab|ttest|ttesti|tut_chk|tut_wait|tutorial|tw|tware_st|two|twoway|twoway__fpfit_serset|twoway__function_gen|twoway__histogram_gen|twoway__ipoint_serset|twoway__ipoints_serset|twoway__kdensity_gen|twoway__lfit_serset|twoway__normgen_gen|twoway__pci_serset|twoway__qfit_serset|twoway__scatteri_serset|twoway__sunflower_gen|twoway_ksm_serset|ty|typ|type|typeof|unab|unabbrev|unabcmd|update|uselabel|var|var_mkcompanion|var_p|varbasic|varfcast|vargranger|varirf|varirf_add|varirf_cgraph|varirf_create|varirf_ctable|varirf_describe|varirf_dir|varirf_drop|varirf_erase|varirf_graph|varirf_ograph|varirf_rename|varirf_set|varirf_table|varlmar|varnorm|varsoc|varstable|varstable_w|varstable_w2|varwle|vce|vec|vec_fevd|vec_mkphi|vec_p|vec_p_w|vecirf_create|veclmar|veclmar_w|vecnorm|vecnorm_w|vecrank|vecstable|verinst|vers|versi|versio|version|view|viewsource|vif|vwls|wdatetof|webdescribe|webseek|webuse|weib1_lf|weib2_lf|weib_lf|weib_lf0|weibhet_glf|weibhet_glf_sh|weibhet_glfa|weibhet_glfa_sh|weibhet_gp|weibhet_ilf|weibhet_ilf_sh|weibhet_ilfa|weibhet_ilfa_sh|weibhet_ip|weibu_sw|weibul_p|weibull|weibull_c|weibull_s|weibullhet|wh|whelp|whi|which|wilc_st|wilcoxon|win|wind|windo|window|winexec|wntestb|wntestb_7|wntestq|xchart|xchart_7|xcorr|xcorr_7|xi|xi_6|xmlsav|xmlsave|xmluse|xpose|xsh|xshe|xshel|xshell|xt_iis|xt_tis|xtab_p|xtabond|xtbin_p|xtclog|xtcloglog|xtcloglog_8|xtcloglog_d2|xtcloglog_pa_p|xtcloglog_re_p|xtcnt_p|xtcorr|xtdata|xtdes|xtfront_p|xtfrontier|xtgee|xtgee_elink|xtgee_estat|xtgee_makeivar|xtgee_p|xtgee_plink|xtgls|xtgls_p|xthaus|xthausman|xtht_p|xthtaylor|xtile|xtint_p|xtintreg|xtintreg_8|xtintreg_d2|xtintreg_p|xtivp_1|xtivp_2|xtivreg|xtline|xtline_ex|xtlogit|xtlogit_8|xtlogit_d2|xtlogit_fe_p|xtlogit_pa_p|xtlogit_re_p|xtmixed|xtmixed_estat|xtmixed_p|xtnb_fe|xtnb_lf|xtnbreg|xtnbreg_pa_p|xtnbreg_refe_p|xtpcse|xtpcse_p|xtpois|xtpoisson|xtpoisson_d2|xtpoisson_pa_p|xtpoisson_refe_p|xtpred|xtprobit|xtprobit_8|xtprobit_d2|xtprobit_re_p|xtps_fe|xtps_lf|xtps_ren|xtps_ren_8|xtrar_p|xtrc|xtrc_p|xtrchh|xtrefe_p|yx|yxview__barlike_draw|yxview_area_draw|yxview_bar_draw|yxview_dot_draw|yxview_dropline_draw|yxview_function_draw|yxview_iarrow_draw|yxview_ilabels_draw|yxview_normal_draw|yxview_pcarrow_draw|yxview_pcbarrow_draw|yxview_pccapsym_draw|yxview_pcscatter_draw|yxview_pcspike_draw|yxview_rarea_draw|yxview_rbar_draw|yxview_rbarm_draw|yxview_rcap_draw|yxview_rcapsym_draw|yxview_rconnected_draw|yxview_rline_draw|yxview_rscatter_draw|yxview_rspike_draw|yxview_spike_draw|yxview_sunflower_draw|zap_s|zinb|zinb_llf|zinb_plf|zip|zip_llf|zip_p|zip_plf|zt_ct_5|zt_hc_5|zt_hcd_5|zt_is_5|zt_iss_5|zt_sho_5|zt_smp_5|ztbase_5|ztcox_5|ztdes_5|ztereg_5|ztfill_5|ztgen_5|ztir_5|ztjoin_5|ztnb|ztnb_p|ztp|ztp_p|zts_5|ztset_5|ztspli_5|ztsum_5|zttoct_5|ztvary_5|ztweib_5|prtab|prchange|eststo|estout|esttab|estadd|estpost)\\b'
- 'name': 'keyword.control.flow.stata'
- }
- ]
- 'comments':
- 'patterns': [
- {
- 'include': '#comments-block'
- }
- {
- 'include': '#comments-star'
- }
- {
- 'include': '#comments-triple-slash'
- }
- {
- 'include': '#comments-double-slash'
- }
- ]
- 'comments-block':
- 'patterns': [
- {
- 'comment': 'There could be a * as a glob in a path'
- 'begin': '^/\\*|(?<=\\s)/\\*'
- 'beginCaptures':
- '0':
- 'name': 'punctuation.definition.comment.begin.stata'
- 'end': '\\*/'
- 'endCaptures':
- '0':
- 'name': 'punctuation.definition.comment.end.stata'
- 'name': 'comment.block.stata'
- 'patterns': [
- {
- 'include': '#docblockr-comment'
- }
- ]
- }
- ]
- 'comments-star':
- 'patterns': [
- {
- 'captures':
- '0':
- 'name': 'punctuation.definition.comment.stata'
- 'begin': '^\\s*(\\*)'
- 'name': 'comment.line.star.stata'
- 'end': '(?=\\n)'
- 'comment': 'TODO! need to except out the occasion that a * comes after a /// on the previous line. May be easiest to join with the comment.line.triple-slash.stata below'
- 'patterns': [
- {
- 'include': '#docblockr-comment'
- }
- ]
- }
- ]
- 'comments-triple-slash':
- 'patterns': [
- {
- 'captures':
- '0':
- 'name': 'punctuation.definition.comment.stata'
- 'begin': '(///)'
- 'end': '(?=\\n)'
- 'name': 'comment.line.triple-slash.stata'
- 'patterns': [
- {
- 'include': '#docblockr-comment'
- }
- ]
- }
- ]
- 'comments-double-slash':
- 'patterns': [
- {
- 'captures':
- '0':
- 'name': 'punctuation.definition.comment.stata'
- 'begin': '(//)'
- 'end': '(?=\\n)'
- 'name': 'comment.line.double-slash.stata'
- 'patterns': [
- {
- 'include': '#docblockr-comment'
- }
- ]
- }
- ]
- 'docblockr-comment':
- 'patterns': [
- {
- 'match': '(^\\s*\\*\\s*|\\s+)(@(error|ERROR))'
- 'captures':
- '2':
- 'name': 'invalid.illegal.name.stata'
- }
- {
- 'match': '(^\\s*\\*\\s*|\\s+)(@[A-za-z0-9]+)'
- 'captures':
- '2':
- 'name': 'keyword.docblockr.stata'
- }
- ]
- 'macro-local-escaped':
- 'patterns': [
- {
- 'comment': 'appropriately color macros that have embedded escaped `,\', and $ characters for lazy evaluation'
- 'begin': '\\\\`(?!")'
- 'beginCaptures':
- '0':
- 'name': 'punctuation.definition.string.begin.stata'
- 'end': '\\\\\''
- 'endCaptures':
- '0':
- 'name': 'punctuation.definition.string.end.stata'
- 'patterns': [
- {
- 'include': '#macro-local'
- }
- {
- 'include': '#macro-global'
- }
- {
- 'match': '[^\\\\`\'\\$\\{\\}]+'
- 'name': 'entity.name.type.class.stata'
- }
- ]
- }
- ]
- 'macro-local':
- 'patterns': [
- {
- 'begin': '`(?!")'
- 'beginCaptures':
- '0':
- 'name': 'punctuation.definition.string.begin.stata'
- 'end': '\''
- 'endCaptures':
- '0':
- 'name': 'punctuation.definition.string.end.stata'
- 'patterns': [
- {
- 'include': '#macro-local'
- }
- {
- 'include': '#macro-global'
- }
- {
- 'match': '[^`\'\\$\\{\\}]+'
- 'name': 'entity.name.type.class.stata'
- }
- ]
- }
- ]
- 'macro-global-escaped':
- 'patterns': [
- {
- 'begin': '(\\\\\\$)(\\\\\\{)?'
- 'beginCaptures':
- '0':
- 'name': 'punctuation.definition.string.begin.stata'
- 'end': '(\\\\\\})|(?=\\"|\\s|\\n|/|,)'
- 'endCaptures':
- '1':
- 'name': 'punctuation.definition.string.end.stata'
- 'patterns': [
- {
- 'include': '#macro-local'
- }
- {
- 'include': '#macro-global'
- }
- {
- 'match': '[^\\\\`\'\\$\\{\\}\\"\\s\\n/,]+'
- 'name': 'entity.name.type.class.stata'
- }
- ]
- }
- ]
- 'macro-global':
- 'patterns': [
- {
- 'begin': '(\\$)(\\{)?'
- 'beginCaptures':
- '0':
- 'name': 'punctuation.definition.string.begin.stata'
- 'end': '(\\})|(?=\\"|\\s|\\n|/|,)'
- 'endCaptures':
- '1':
- 'name': 'punctuation.definition.string.end.stata'
- 'patterns': [
- {
- 'include': '#macro-local'
- }
- {
- 'include': '#macro-global'
- }
- {
- 'match': '[^`\'\\$\\{\\}\\"\\s\\n/,]+'
- 'name': 'entity.name.type.class.stata'
- }
- ]
- }
- ]
- 'numbers':
- 'patterns': [
- {
- 'match': '\\b(?i:(\\d+\\.\\d*(e[\\-\\+]?\\d+)?))(?=[^a-zA-Z_])'
- 'name': 'constant.numeric.float.stata'
- }
- {
- 'match': '(?<=[^0-9a-zA-Z_])(?i:(\\.\\d+(e[\\-\\+]?\\d+)?))'
- 'name': 'constant.numeric.float.stata'
- }
- {
- 'match': '\\b(?i:(\\d+e[\\-\\+]?\\d+))'
- 'name': 'constant.numeric.float.stata'
- }
- {
- 'match': '\\b(?i:([1-9]+[0-9]*|0)L)'
- 'name': 'constant.numeric.integer.long.decimal.stata'
- }
- {
- 'match': '\\b([0-9]+|0)'
- 'name': 'constant.numeric.integer.decimal.stata'
- }
- {
- 'match': '(?=|:=|==|!=|~=|<|>|=|!!|!)' # !! is for xshell
- 'name': 'keyword.operator.comparison.stata'
- }
- {
- 'match': '\\(|\\)'
- 'name': 'keyword.operator.parentheses.stata'
- }
- {
- 'match': '(##|#)'
- 'name': 'keyword.operator.factor-variables.stata'
- }
- {
- 'match': '%'
- 'name': 'keyword.operator.format.stata'
- }
- {
- 'match': ':'
- 'name': 'punctuation.separator.key-value'
- }
- {
- 'match': '\\['
- 'name': 'punctuation.definition.parameters.begin.stata'
- }
- {
- 'match': '\\]'
- 'name': 'punctuation.definition.parameters.end.stata'
- }
- {
- 'match': ','
- 'name': 'punctuation.definition.variable.begin.stata'
- }
- {
- 'match': ';'
- 'name': 'keyword.operator.delimiter.stata'
- }
- ]
- 'string-compound':
- 'patterns': [
- {
- 'begin': '`"'
- 'beginCaptures':
- '0':
- 'name': 'punctuation.definition.string.begin.stata'
- 'end': '"\''
- 'endCaptures':
- '0':
- 'name': 'punctuation.definition.string.end.stata'
- 'name': 'string.quoted.double.compound.stata'
- 'patterns': [
- {
- 'match': '"'
- 'name': 'string.quoted.double.compound.stata'
- 'comment': 'This must come before #string-regular and #string-compound to accurately color `"""\' in strings'
- }
- {
- 'include': '#string-regular'
- }
- {
- 'include': '#string-compound'
- }
- {
- 'include': '#macro-local-escaped'
- }
- {
- 'include': '#macro-global-escaped'
- }
- {
- 'include': '#macro-local'
- }
- {
- 'include': '#macro-global'
- }
- ]
- }
- ]
- 'string-regular':
- 'patterns': [
- {
- 'begin': '"'
- 'beginCaptures':
- '0':
- 'name': 'punctuation.definition.string.begin.stata'
- 'end': '(")(\')?'
- 'endCaptures':
- '1':
- 'name': 'punctuation.definition.string.end.stata'
- '2':
- 'name': 'invalid.illegal.punctuation.stata'
- 'name': 'string.quoted.double.stata'
- 'patterns': [
- {
- 'include': '#macro-local-escaped'
- }
- {
- 'include': '#macro-global-escaped'
- }
- {
- 'include': '#macro-local'
- }
- {
- 'include': '#macro-global'
- }
- ]
- }
- ]
- 'subsetting':
- 'patterns': [
- {
- 'comment': 'highlight [_n], etc when subsetting variable'
- 'begin': '(?<=[0-9a-zA-Z_])(\\[)'
- 'beginCaptures':
- '1':
- 'name': 'punctuation.definition.parameters.begin.stata'
- 'end': '(\\])'
- 'endCaptures':
- '1':
- 'name': 'punctuation.definition.parameters.end.stata'
- 'name': 'meta.function.stata'
- 'patterns': [
- {
- 'include': '#builtin_variables'
- }
- {
- 'include': '#operators'
- }
- {
- 'include': '#numbers'
- }
- ]
- }
- ]
- 'generic_names':
- 'patterns': [
- {
- 'comment': 'this currently doesn\'t do anything'
- 'match': '[A-Za-z_][A-Za-z0-9_]{0,31}'
- }
- ]
- 'reserved_names':
- 'patterns': [
- {
- 'match': '(_all|_b|byte|_coef|_cons|double|float|if|in|int|long|_n|_N|_pi|_pred|_rc|_skip|str[0-9]+|strL|using|with|[0-9][A-Za-z0-9_]+|[A-Za-z_][A-Za-z0-9_]{32,})(?=/|\\s)'
- 'name': 'invalid.illegal.name.stata'
- }
- {
- 'match': '[^a-zA-Z0-9_\'`\\$\\(\\)]'
- 'name': 'invalid.illegal.name.stata'
- }
- ]
- 'illegal_names':
- 'patterns': [
- {
- 'match': '(_all|_b|byte|_coef|_cons|double|float|if|in|int|long|_n|_N|_pi|_pred|_rc|_skip|str[0-9]+|strL|using|with|[0-9][A-Za-z0-9_]+|[A-Za-z_][A-Za-z0-9_]{32,})'
- 'name': 'invalid.illegal.name.stata'
- 'comment': 'highlights as illegal reserved names and those with more than 32 characters'
- }
- ]
- 'regex':
- 'patterns': [
- # The following match the insides of a regular expression
- {
- 'match': '\\^|\\$'
- 'name': 'keyword.control.anchor.stata'
- }
- {
- 'match': '[\\?\\+\\*]'
- 'name': 'keyword.control.quantifier.stata'
- }
- {
- 'match': '\\|'
- 'name': 'keyword.control.or.stata'
- }
- {
- 'begin': '(\\()'
- 'beginCaptures':
- '1':
- 'name': 'punctuation.string.group.stata'
- 'end': '(\\))'
- 'endCaptures':
- '1':
- 'name': 'punctuation.string.group.stata'
- 'patterns': [
- {
- 'include': '#regex'
- }
- ]
- }
- {
- 'include': '#character-class'
- }
- {
- # 'comment' 'NOTE: Error if I have \.+ No idea why but it works fine it seems with just \.'
- # Also extremely weird but if I have the previous 'comment' line uncommented, everything inside the regexm(, "...") goes white.
- 'match': '.'
- 'name': 'string.quoted.stata'
- }
- ]
- 'character-class':
- 'patterns': [
- {
- 'match': '\\.'
- 'name': 'constant.character.character-class.stata'
- }
- {
- 'match': '\\\\.'
- 'name': 'constant.character.escape.backslash.stata'
- 'comment': 'this changes the color of an escaped character'
- }
- {
- 'begin': '(\\[)(\\^)?'
- 'beginCaptures':
- '1':
- 'name': 'punctuation.definition.character-class.stata'
- '2':
- 'name': 'keyword.operator.negation.stata'
- 'end': '(\\])'
- 'endCaptures':
- '1':
- 'name': 'punctuation.definition.character-class.stata'
- 'name': 'constant.other.character-class.set.stata'
- 'patterns': [
- {
- 'include': '#character-class'
- }
- {
- 'captures':
- '2':
- 'name': 'constant.character.escape.backslash.stata'
- '4':
- 'name': 'constant.character.escape.backslash.stata'
- 'match': '((\\\\.)|.)\\-((\\\\.)|[^\\]])'
- 'name': 'constant.other.character-class.range.stata'
- }
- ]
- }
- ]
diff --git a/grammars/stata.json b/grammars/stata.json
new file mode 100644
index 0000000..53d6a11
--- /dev/null
+++ b/grammars/stata.json
@@ -0,0 +1,3049 @@
+{
+ "scopeName": "source.stata",
+ "name": "Stata",
+ "fileTypes": [
+ "do",
+ "ado",
+ "mata"
+ ],
+ "foldingStartMarker": "\\{\\s*$",
+ "foldingStopMarker": "^\\s*\\}",
+ "patterns": [
+ {
+ "include": "#ascii-regex-functions"
+ },
+ {
+ "include": "#unicode-regex-functions"
+ },
+ {
+ "include": "#constants"
+ },
+ {
+ "include": "#functions"
+ },
+ {
+ "include": "#comments"
+ },
+ {
+ "include": "#subscripts"
+ },
+ {
+ "include": "#operators"
+ },
+ {
+ "include": "#macro-local"
+ },
+ {
+ "include": "#macro-global"
+ },
+ {
+ "include": "#string-compound"
+ },
+ {
+ "include": "#string-regular"
+ },
+ {
+ "include": "#builtin_variables"
+ },
+ {
+ "include": "#macro-commands"
+ },
+ {
+ "comment": "keywords that delimit flow conditionals",
+ "name": "keyword.control.conditional.stata",
+ "match": "\\b(if|else if|else)\\b"
+ },
+ {
+ "captures": {
+ "1": {
+ "name": "storage.type.scalar.stata"
+ }
+ },
+ "match": "^\\s*(sca(lar|la|l)?(\\s+de(fine|fin|fi|f)?)?)\\s+(?!(drop|dir?|l(ist|is|i)?)\\s+)"
+ },
+ {
+ "begin": "\\b(mer(ge|g)?)\\s+(1|m|n)(:)(1|m|n)",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.control.flow.stata"
+ },
+ "3": {
+ "patterns": [
+ {
+ "include": "#constants"
+ },
+ {
+ "match": "m|n",
+ "name": ""
+ }
+ ]
+ },
+ "4": {
+ "name": "punctuation.separator.key-value"
+ },
+ "5": {
+ "patterns": [
+ {
+ "include": "#constants"
+ },
+ {
+ "match": "m|n",
+ "name": ""
+ }
+ ]
+ }
+ },
+ "end": "using",
+ "patterns": [
+ {
+ "include": "#builtin_variables"
+ },
+ {
+ "include": "#macro-local"
+ },
+ {
+ "include": "#macro-global"
+ },
+ {
+ "include": "#comments"
+ }
+ ]
+ },
+ {
+ "match": "\\b(foreach)\\s+((?!in|of).+)\\s+(in|of var(list|lis|li|l)?|of new(list|lis|li|l)?|of num(list|lis|li|l)?)\\b",
+ "captures": {
+ "1": {
+ "name": "keyword.control.flow.stata"
+ },
+ "2": {
+ "patterns": [
+ {
+ "include": "#macro-local-identifiers"
+ },
+ {
+ "include": "#macro-local"
+ },
+ {
+ "include": "#macro-global"
+ }
+ ]
+ },
+ "3": {
+ "name": "keyword.control.flow.stata"
+ }
+ }
+ },
+ {
+ "begin": "\\b(foreach)\\s+((?!in|of).+)\\s+(of loc(al|a)?|of glo(bal|ba|b)?)\\b\\s*",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.control.flow.stata"
+ },
+ "2": {
+ "patterns": [
+ {
+ "include": "#macro-local-identifiers"
+ },
+ {
+ "include": "#macro-local"
+ },
+ {
+ "include": "#macro-global"
+ }
+ ]
+ },
+ "3": {
+ "name": "keyword.control.flow.stata"
+ }
+ },
+ "end": "(?=\\s*\\{)",
+ "patterns": [
+ {
+ "include": "#macro-local-identifiers"
+ },
+ {
+ "include": "#macro-local"
+ },
+ {
+ "include": "#macro-global"
+ }
+ ]
+ },
+ {
+ "begin": "\\b(forvalues|forvalue|forvalu|forval|forva|forv)\\s*",
+ "end": "\\s*(=)\\s*([^\\{]+)\\s*|(?=\\n)",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.control.flow.stata"
+ }
+ },
+ "endCaptures": {
+ "1": {
+ "name": "keyword.operator.assignment.stata"
+ },
+ "2": {
+ "patterns": [
+ {
+ "include": "#constants"
+ },
+ {
+ "include": "#operators"
+ },
+ {
+ "include": "#macro-local"
+ },
+ {
+ "include": "#macro-global"
+ }
+ ]
+ }
+ },
+ "patterns": [
+ {
+ "include": "#macro-local-identifiers"
+ },
+ {
+ "include": "#macro-local"
+ },
+ {
+ "include": "#macro-global"
+ }
+ ]
+ },
+ {
+ "comment": "keywords that delimit loops",
+ "name": "keyword.control.flow.stata",
+ "match": "\\b(while|continue)\\b"
+ },
+ {
+ "captures": {
+ "1": {
+ "name": "keyword.other.stata"
+ }
+ },
+ "comment": "keywords that haven't fit into other groups (yet).",
+ "match": "\\b(as|ass|asse|asser|assert)\\b"
+ },
+ {
+ "match": "\\b(by(sort|sor|so|s)?|statsby|rolling|bootstrap|jackknife|permute|simulate|svy|mi est(imate|imat|ima|im|i)?|nestreg|stepwise|xi|fp|mfp|vers(ion|io|i)?)\\b",
+ "name": "storage.type.function.stata",
+ "comment": "prefixes that require a colon"
+ },
+ {
+ "comment": "prefixes that don't need a colon",
+ "name": "keyword.control.flow.stata",
+ "match": "\\b(qui(etly|etl|et|e)?|n(oisily|oisil|oisi|ois|oi|o)?|cap(ture|tur|tu|t)?)\\b:?"
+ },
+ {
+ "match": "\\s*(pr(ogram|ogra|ogr|og|o)?)\\s+((di(r)?|drop|l(ist|is|i)?)\\s+)([\\w&&[^0-9]]\\w{0,31})",
+ "captures": {
+ "1": {
+ "name": "storage.type.function.stata"
+ },
+ "3": {
+ "name": "storage.type.function.stata"
+ },
+ "7": {
+ "name": "entity.name.function.stata"
+ }
+ }
+ },
+ {
+ "begin": "^\\s*(pr(ogram|ogra|ogr|og|o)?)\\s+(de(fine|fin|fi|f)?\\s+)?",
+ "beginCaptures": {
+ "1": {
+ "name": "storage.type.function.stata"
+ },
+ "3": {
+ "name": "storage.type.function.stata"
+ }
+ },
+ "end": "(?=,|\\n|/)",
+ "patterns": [
+ {
+ "include": "#macro-local"
+ },
+ {
+ "include": "#macro-global"
+ },
+ {
+ "match": "[\\w&&[^0-9]]\\w{0,31}",
+ "name": "entity.name.function.stata"
+ },
+ {
+ "match": "[^A-za-z_0-9,\\n/ ]+",
+ "name": "invalid.illegal.name.stata"
+ }
+ ]
+ },
+ {
+ "match": "\\b(form(at|a)?)\\s*([\\w&&[^0-9]]\\w{0,31})*\\s*(%)(-)?(0)?([0-9]+)(.)([0-9]+)(e|f|g)(c)?",
+ "captures": {
+ "1": "keyword.functions.data.stata.test"
+ }
+ },
+ {
+ "include": "#braces-with-error"
+ },
+ {
+ "begin": "(?=syntax)",
+ "end": "\\n",
+ "patterns": [
+ {
+ "comment": "color before the comma",
+ "begin": "syntax",
+ "beginCaptures": {
+ "0": {
+ "name": "keyword.functions.program.stata"
+ }
+ },
+ "end": "(?=,|\\n)",
+ "patterns": [
+ {
+ "begin": "///",
+ "end": "\\n",
+ "name": "comment.block.stata"
+ },
+ {
+ "match": "\\[",
+ "name": "punctuation.definition.parameters.begin.stata"
+ },
+ {
+ "match": "\\]",
+ "name": "punctuation.definition.parameters.end.stata"
+ },
+ {
+ "match": "\\b(varlist|varname|newvarlist|newvarname|namelist|name|anything)\\b",
+ "name": "entity.name.type.class.stata"
+ },
+ {
+ "match": "\\b((if|in|using|fweight|aweight|pweight|iweight))\\b(/)?",
+ "captures": {
+ "2": {
+ "name": "entity.name.type.class.stata"
+ },
+ "3": {
+ "name": "keyword.operator.arithmetic.stata"
+ }
+ }
+ },
+ {
+ "match": "(/)?(exp)",
+ "captures": {
+ "1": {
+ "name": "keyword.operator.arithmetic.stata"
+ },
+ "2": {
+ "name": "entity.name.type.class.stata"
+ }
+ }
+ },
+ {
+ "include": "#constants"
+ },
+ {
+ "include": "#operators"
+ },
+ {
+ "include": "#string-compound"
+ },
+ {
+ "include": "#string-regular"
+ },
+ {
+ "include": "#macro-local"
+ },
+ {
+ "include": "#macro-global"
+ },
+ {
+ "include": "#builtin_variables"
+ }
+ ]
+ },
+ {
+ "comment": "things to color after the comma",
+ "begin": ",",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.definition.variable.begin.stata"
+ }
+ },
+ "end": "(?=\\n)",
+ "patterns": [
+ {
+ "begin": "///",
+ "end": "\\n",
+ "name": "comment.block.stata"
+ },
+ {
+ "comment": "color options with parentheses",
+ "begin": "([^\\s\\[\\]]+)(\\()",
+ "beginCaptures": {
+ "1": {
+ "patterns": [
+ {
+ "include": "#macro-local-identifiers"
+ },
+ {
+ "include": "#macro-local"
+ },
+ {
+ "include": "#macro-global"
+ }
+ ],
+ "comment": "these are the names that become macros"
+ },
+ "2": {
+ "name": "keyword.operator.parentheses.stata"
+ }
+ },
+ "end": "\\)",
+ "endCaptures": {
+ "0": {
+ "name": "keyword.operator.parentheses.stata"
+ }
+ },
+ "patterns": [
+ {
+ "comment": "the first word is often a type",
+ "match": "\\b(integer|intege|integ|inte|int|real|string|strin|stri|str)\\b",
+ "captures": {
+ "0": {
+ "name": "support.type.stata"
+ }
+ }
+ },
+ {
+ "include": "#constants"
+ },
+ {
+ "include": "#operators"
+ },
+ {
+ "include": "#string-compound"
+ },
+ {
+ "include": "#string-regular"
+ },
+ {
+ "include": "#macro-local"
+ },
+ {
+ "include": "#macro-global"
+ },
+ {
+ "include": "#builtin_variables"
+ }
+ ]
+ },
+ {
+ "include": "#macro-local-identifiers"
+ },
+ {
+ "include": "#constants"
+ },
+ {
+ "include": "#operators"
+ },
+ {
+ "include": "#string-compound"
+ },
+ {
+ "include": "#string-regular"
+ },
+ {
+ "include": "#macro-local"
+ },
+ {
+ "include": "#macro-global"
+ },
+ {
+ "include": "#builtin_variables"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "captures": {
+ "1": {
+ "name": "keyword.functions.data.stata"
+ }
+ },
+ "comment": "one-word commands",
+ "match": "\\b(sa(v|ve)|saveold|destring|tostring|u(se|s)?|note(s)?|form(at|a)?)\\b"
+ },
+ {
+ "match": "\\b(exit|end)\\b",
+ "name": "keyword.functions.data.stata",
+ "comment": "programming commands"
+ },
+ {
+ "match": "\\b(replace)\\s+([^=]+)\\s*((==)|(=))",
+ "captures": {
+ "1": {
+ "name": "keyword.functions.data.stata"
+ },
+ "2": {
+ "patterns": [
+ {
+ "include": "#macro-local"
+ }
+ ]
+ },
+ "4": {
+ "name": "invalid.illegal.name.stata"
+ },
+ "5": {
+ "name": "keyword.operator.assignment.stata"
+ }
+ }
+ },
+ {
+ "match": "\\b(g(enerate|enerat|enera|ener|ene|en|e)?|egen)\\s+((byte|int|long|float|double|str[1-9]?[0-9]?[0-9]?[0-9]?|strL)\\s+)?([^=\\s]+)\\s*((==)|(=))",
+ "captures": {
+ "1": {
+ "name": "keyword.functions.data.stata"
+ },
+ "3": {
+ "name": "support.type.stata"
+ },
+ "5": {
+ "patterns": [
+ {
+ "include": "#reserved-names"
+ },
+ {
+ "include": "#macro-local"
+ }
+ ]
+ },
+ "7": {
+ "name": "invalid.illegal.name.stata"
+ },
+ "8": {
+ "name": "keyword.operator.assignment.stata"
+ }
+ }
+ },
+ {
+ "match": "\\b(set ty(pe|p)?)\\s+((byte|int|long|float|double|str[1-9]?[0-9]?[0-9]?[0-9]?|strL)?\\s+)\\b",
+ "captures": {
+ "1": {
+ "name": "keyword.functions.data.stata"
+ },
+ "3": {
+ "name": "support.type.stata"
+ }
+ }
+ },
+ {
+ "match": "\\b(la(bel|be|b)?)\\s+(var(iable|iabl|iab|ia|i)?)\\s+([\\w&&[^0-9]]\\w{0,31})\\s+(`\")(.+)(\"')",
+ "captures": {
+ "1": {
+ "name": "keyword.functions.data.stata"
+ },
+ "3": {
+ "name": "keyword.functions.data.stata"
+ },
+ "6": {
+ "name": "punctuation.definition.string.begin.stata"
+ },
+ "7": {
+ "patterns": [
+ {
+ "include": "#string-compound"
+ },
+ {
+ "include": "#macro-local-escaped"
+ },
+ {
+ "include": "#macro-global-escaped"
+ },
+ {
+ "include": "#macro-local"
+ },
+ {
+ "include": "#macro-global"
+ },
+ {
+ "match": "[^`\\$]{81,}",
+ "name": "invalid.illegal.name.stata"
+ },
+ {
+ "match": ".",
+ "name": "string.quoted.double.compound.stata"
+ }
+ ]
+ },
+ "8": {
+ "name": "punctuation.definition.string.begin.stata"
+ }
+ }
+ },
+ {
+ "match": "\\b(la(bel|be|b)?)\\s+(var(iable|iabl|iab|ia|i)?)\\s+([\\w&&[^0-9]]\\w{0,31})\\s+(\")(.+)(\")",
+ "captures": {
+ "1": {
+ "name": "keyword.functions.data.stata"
+ },
+ "3": {
+ "name": "keyword.functions.data.stata"
+ },
+ "6": {
+ "name": "punctuation.definition.string.begin.stata"
+ },
+ "7": {
+ "patterns": [
+ {
+ "include": "#macro-local-escaped"
+ },
+ {
+ "include": "#macro-global-escaped"
+ },
+ {
+ "include": "#macro-local"
+ },
+ {
+ "include": "#macro-global"
+ },
+ {
+ "match": "[^`\\$]{81,}",
+ "name": "invalid.illegal.name.stata"
+ },
+ {
+ "match": ".",
+ "name": "string.quoted.double.stata"
+ }
+ ]
+ },
+ "8": {
+ "name": "punctuation.definition.string.begin.stata"
+ }
+ }
+ },
+ {
+ "match": "\\b(la(bel|be|b)?)\\s+(da(ta|t)?|var(iable|iabl|iab|ia|i)?|de(f|fi|fin|fine)?|val(ues|ue|u)?|di(r)?|l(ist|is|i)?|copy|drop|save|lang(uage|uag|ua|u)?)\\b",
+ "captures": {
+ "1": {
+ "name": "keyword.functions.data.stata"
+ },
+ "3": {
+ "name": "keyword.functions.data.stata"
+ }
+ }
+ },
+ {
+ "begin": "\\b(drop|keep)\\b(?!\\s+(if|in)\\b)",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.functions.data.stata"
+ }
+ },
+ "end": "\\n",
+ "patterns": [
+ {
+ "match": "\\b(if|in)\\b",
+ "name": "invalid.illegal.name.stata"
+ },
+ {
+ "include": "#comments"
+ },
+ {
+ "include": "#macro-local"
+ },
+ {
+ "include": "#macro-global"
+ },
+ {
+ "include": "#operators"
+ }
+ ]
+ },
+ {
+ "match": "\\b(drop|keep)\\s+(if|in)\\b",
+ "captures": {
+ "1": {
+ "name": "keyword.functions.data.stata"
+ },
+ "2": {
+ "name": "keyword.functions.data.stata"
+ }
+ }
+ },
+ {
+ "begin": "^\\s*mata:?\\s*$",
+ "comment": "won't match single-line Mata statements",
+ "end": "^\\s*end\\s*$\\n?",
+ "name": "meta.embedded.block.mata",
+ "patterns": [
+ {
+ "match": "(?\\=|\\<\\=|\\<|\\>|\\!\\=|\\#|\\+|\\-|\\*|\\^|\\/",
+ "name": "keyword.operator.mata"
+ },
+ {
+ "include": "$self"
+ }
+ ]
+ },
+ {
+ "begin": "\\b(odbc)\\b",
+ "beginCaptures": {
+ "0": {
+ "name": "keyword.control.flow.stata"
+ }
+ },
+ "end": "\\n",
+ "patterns": [
+ {
+ "begin": "///",
+ "end": "\\n",
+ "name": "comment.block.stata"
+ },
+ {
+ "begin": "(exec?)(\\(\")",
+ "beginCaptures": {
+ "1": {
+ "name": "support.function.builtin.stata"
+ },
+ "2": {
+ "name": "punctuation.definition.parameters.begin.stata"
+ }
+ },
+ "end": "\"\\)",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.parameters.end.stata"
+ }
+ },
+ "patterns": [
+ {
+ "include": "source.sql"
+ }
+ ]
+ },
+ {
+ "include": "$self"
+ }
+ ]
+ },
+ {
+ "include": "#commands-other"
+ }
+ ],
+ "repository": {
+ "functions": {
+ "patterns": [
+ {
+ "begin": "\\b((abbrev|abs|acos|acosh|asin|asinh|atan|atan2|atanh|autocode|betaden|binomial|binomialp|binomialtail|binormalbofd|byteorder|c|cauchy|cauchyden|cauchytail|Cdhms|ceil|char|chi2|chi2den|chi2tail|Chms|cholesky|chop|clip|clock|Clock|cloglog|Cmdyhms|cofC|Cofc|cofd|Cofd|coleqnumb|collatorlocale|collatorversion|colnfreeparms|colnumb|colsof|comb|cond|corr|cos|cosh|daily|date|day|det|dgammapda|dgammapdada|dgammapdadx|dgammapdx|dgammapdxdx|dhms|diag|diag0cnt|digamma|dofb|dofc|dofC|dofh|dofm|dofq|dofw|dofy|dow|doy|dunnettprob|e|el|epsdouble|epsfloat|exp|exponential|exponentialden|exponentialtail|F|Fden|fileexists|fileread|filereaderror|filewrite|float|floor|fmtwidth|Ftail|gammaden|gammap|gammaptail|get|hadamard|halfyear|halfyearly|hh|hhC|hms|hofd|hours|hypergeometric|hypergeometricp|I|ibeta|ibetatail|igaussian|igaussianden|igaussiantail|indexnot|inlist|inrange|int|inv|invbinomial|invbinomialtail|invcauchy|invcauchytail|invchi2|invchi2tail|invcloglog|invdunnettprob|invexponential|invexponentialtail|invF|invFtail|invgammap|invgammaptail|invibeta|invibetatail|invigaussian|invigaussiantail|invlaplace|invlaplacetail|invlogistic|invlogistictail|invlogit|invnbinomial|invnbinomialtail|invnchi2|invnchi2tail|invnF|invnFtail|invnibeta|invnormal|invnt|invnttail|invpoisson|invpoissontail|invsym|invt|invttail|invtukeyprob|invweibull|invweibullph|invweibullphtail|invweibulltail|irecode|issymmetric|itrim|J|laplace|laplaceden|laplacetail|length|ln|lncauchyden|lnfactorial|lngamma|lnigammaden|lnigaussianden|lniwishartden|lnlaplaceden|lnmvnormalden|lnnormal|lnnormalden|lnwishartden|log|log10|logistic|logisticden|logistictail|logit|lower|ltrim|matmissing|matrix|matuniform|max|maxbyte|maxdouble|maxfloat|maxint|maxlong|mdy|mdyhms|mi|min|minbyte|mindouble|minfloat|minint|minlong|minutes|missing|mm|mmC|mod|mofd|month|monthly|mreldif|msofhours|msofminutes|msofseconds|nbetaden|nbinomial|nbinomialp|nbinomialtail|nchi2|nchi2den|nchi2tail|nF|nFden|nFtail|nibeta|normal|normalden|npnchi2|npnF|npnt|nt|ntden|nttail|nullmat|plural|poisson|poissonp|poissontail|proper|qofd|quarter|quarterly|r|rbeta|rbinomial|rcauchy|rchi2|real|recode|regexs|reldif|replay|return|reverse|rexponential|rgamma|rhypergeometric|rigaussian|rlaplace|rlogistic|rnbinomial|rnormal|round|roweqnumb|rownfreeparms|rownumb|rowsof|rpoisson|rt|rtrim|runiform|runiformint|rweibull|rweibullph|s|scalar|seconds|sign|sin|sinh|smallestdouble|soundex|sqrt|ss|ssC|string|stritrim|strlen|strlower|strltrim|strmatch|strofreal|strpos|strproper|strreverse|strrpos|strrtrim|strtoname|strtrim|strupper|subinstr|subinword|substr|sum|sweep|t|tan|tanh|tc|tC|td|tden|th|tin|tm|tobytes|tq|trace|trigamma|trim|trunc|ttail|tukeyprob|tw|twithin|uchar|udstrlen|udsubstr|uisdigit|uisletter|upper|ustrcompare|ustrcompareex|ustrfix|ustrfrom|ustrinvalidcnt|ustrleft|ustrlen|ustrlower|ustrltrim|ustrnormalize|ustrpos|ustrregexs|ustrreverse|ustrright|ustrrpos|ustrrtrim|ustrsortkey|ustrsortkeyex|ustrtitle|ustrto|ustrtohex|ustrtoname|ustrtrim|ustrunescape|ustrupper|ustrword|ustrwordcount|usubinstr|usubstr|vec|vecdiag|week|weekly|weibull|weibullden|weibullph|weibullphden|weibullphtail|weibulltail|wofd|word|wordbreaklocale|wordcount|year|yearly|yh|ym|yofd|yq|yw)|([\\w&&[^0-9]]\\w{0,31}))(\\()",
+ "beginCaptures": {
+ "2": {
+ "name": "support.function.builtin.stata"
+ },
+ "3": {
+ "name": "support.function.custom.stata"
+ },
+ "4": {
+ "name": "punctuation.definition.parameters.begin.stata"
+ }
+ },
+ "end": "(\\))",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.definition.parameters.end.stata"
+ }
+ },
+ "patterns": [
+ {
+ "match": "[\\w&&[^0-9]]\\w{0,31}",
+ "name": "variable.parameter.function.stata"
+ },
+ {
+ "begin": "\\(",
+ "end": "\\)",
+ "beginCaptures": {
+ "0": {
+ "name": "keyword.operator.parentheses.stata"
+ }
+ },
+ "endCaptures": {
+ "0": {
+ "name": "keyword.operator.parentheses.stata"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#ascii-regex-functions"
+ },
+ {
+ "include": "#unicode-regex-functions"
+ },
+ {
+ "include": "#functions"
+ },
+ {
+ "include": "#subscripts"
+ },
+ {
+ "include": "#constants"
+ },
+ {
+ "include": "#comments"
+ },
+ {
+ "include": "#operators"
+ },
+ {
+ "include": "#macro-local"
+ },
+ {
+ "include": "#macro-global"
+ },
+ {
+ "include": "#string-compound"
+ },
+ {
+ "include": "#string-regular"
+ },
+ {
+ "include": "#builtin_variables"
+ },
+ {
+ "include": "#macro-commands"
+ },
+ {
+ "include": "#braces-without-error"
+ },
+ {
+ "match": "[\\w&&[^0-9]]\\w{0,31}",
+ "name": "variable.parameter.function.stata"
+ }
+ ]
+ },
+ {
+ "include": "#ascii-regex-functions"
+ },
+ {
+ "include": "#unicode-regex-functions"
+ },
+ {
+ "include": "#functions"
+ },
+ {
+ "include": "#subscripts"
+ },
+ {
+ "include": "#constants"
+ },
+ {
+ "include": "#comments"
+ },
+ {
+ "include": "#operators"
+ },
+ {
+ "include": "#macro-local"
+ },
+ {
+ "include": "#macro-global"
+ },
+ {
+ "include": "#string-compound"
+ },
+ {
+ "include": "#string-regular"
+ },
+ {
+ "include": "#builtin_variables"
+ },
+ {
+ "include": "#macro-commands"
+ },
+ {
+ "include": "#braces-without-error"
+ }
+ ]
+ }
+ ]
+ },
+ "builtin_types": {
+ "patterns": [
+ {
+ "match": "\\b(byte|int|long|float|double|str[1-9]?[0-9]?[0-9]?[0-9]?|strL)\\b",
+ "name": "support.type.stata"
+ }
+ ]
+ },
+ "builtin_variables": {
+ "patterns": [
+ {
+ "match": "\\b(_b|_coef|_cons|_n|_N|_rc|_se)\\b",
+ "name": "variable.object.stata"
+ }
+ ]
+ },
+ "braces-without-error": {
+ "patterns": [
+ {
+ "begin": "\\{",
+ "beginCaptures": {
+ "0": {
+ "name": "keyword.control.block.begin.stata"
+ }
+ },
+ "end": "\\}",
+ "endCaptures": {
+ "0": {
+ "name": "keyword.control.block.end.stata"
+ }
+ }
+ }
+ ]
+ },
+ "braces-with-error": {
+ "patterns": [
+ {
+ "comment": "correct with nothing else on the line but whitespace; before and after; before; after; correct",
+ "begin": "(\\{)\\s*([^\\n]*)(?=\\n)",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.control.block.begin.stata"
+ },
+ "2": {
+ "patterns": [
+ {
+ "include": "#comments"
+ },
+ {
+ "match": "[^\\n]+",
+ "name": "illegal.invalid.name.stata"
+ }
+ ]
+ }
+ },
+ "end": "^\\s*(\\})\\s*$|^\\s*([^\\*\"\\}]+)\\s+(\\})\\s*([^\\*\"\\}/\\n]+)|^\\s*([^\"\\*\\}]+)\\s+(\\})|\\s*(\\})\\s*([^\"\\*\\}/\\n]+)|(\\})$",
+ "endCaptures": {
+ "1": {
+ "name": "keyword.control.block.end.stata"
+ },
+ "2": {
+ "name": "invalid.illegal.name.stata"
+ },
+ "3": {
+ "name": "keyword.control.block.end.stata"
+ },
+ "4": {
+ "name": "invalid.illegal.name.stata"
+ },
+ "5": {
+ "name": "invalid.illegal.name.stata"
+ },
+ "6": {
+ "name": "keyword.control.block.end.stata"
+ },
+ "7": {
+ "name": "keyword.control.block.end.stata"
+ },
+ "8": {
+ "name": "invalid.illegal.name.stata"
+ },
+ "9": {
+ "name": "keyword.control.block.end.stata"
+ }
+ },
+ "patterns": [
+ {
+ "include": "$self"
+ }
+ ]
+ }
+ ]
+ },
+ "commands-other": {
+ "patterns": [
+ {
+ "comment": "Add on commands",
+ "match": "\\b(reghdfe|ivreghdfe|ivreg2|outreg|gcollapse|gcontract|gegen|gisid|glevelsof|gquantiles)\\b",
+ "name": "keyword.control.flow.stata"
+ },
+ {
+ "comment": "Built in commands",
+ "match": "\\b(about|ac|acprplot|ado|adopath|adoupdate|alpha|ameans|an|ano|anov|anova|anova_terms|anovadef|aorder|ap|app|appe|appen|append|arch|arch_dr|arch_estat|arch_p|archlm|areg|areg_p|args|arima|arima_dr|arima_estat|arima_p|asmprobit|asmprobit_estat|asmprobit_lf|asmprobit_mfx__dlg|asmprobit_p|avplot|avplots|bcskew0|bgodfrey|binreg|bip0_lf|biplot|bipp_lf|bipr_lf|bipr_p|biprobit|bitest|bitesti|bitowt|blogit|bmemsize|boot|bootsamp|boxco_l|boxco_p|boxcox|boxcox_p|bprobit|br|break|brier|bro|brow|brows|browse|brr|brrstat|bs|bsampl_w|bsample|bsqreg|bstat|bstrap|ca|ca_estat|ca_p|cabiplot|camat|canon|canon_estat|canon_p|caprojection|cat|cc|cchart|cci|cd|censobs_table|centile|cf|char|chdir|checkdlgfiles|checkestimationsample|checkhlpfiles|checksum|chelp|ci|cii|cl|class|classutil|clear|cli|clis|clist|clog|clog_lf|clog_p|clogi|clogi_sw|clogit|clogit_lf|clogit_p|clogitp|clogl_sw|cloglog|clonevar|clslistarray|cluster|cluster_measures|cluster_stop|cluster_tree|cluster_tree_8|clustermat|cmdlog|cnr|cnre|cnreg|cnreg_p|cnreg_sw|cnsreg|codebook|collaps4|collapse|colormult_nb|colormult_nw|compare|compress|conf|confi|confir|confirm|conren|cons|const|constr|constra|constrai|constrain|constraint|contract|copy|copyright|copysource|cor|corc|corr|corr2data|corr_anti|corr_kmo|corr_smc|corre|correl|correla|correlat|correlate|corrgram|cou|coun|count|cprplot|crc|cret|cretu|cretur|creturn|cross|cs|cscript|cscript_log|csi|ct|ct_is|ctset|ctst_st|cttost|cumsp|cumul|cusum|cutil|d|datasig|datasign|datasigna|datasignat|datasignatu|datasignatur|datasignature|datetof|db|dbeta|de|dec|deco|decod|decode|deff|des|desc|descr|descri|describ|describe|dfbeta|dfgls|dfuller|di|di_g|dir|dirstats|dis|discard|disp|disp_res|disp_s|displ|displa|display|do|doe|doed|doedi|doedit|dotplot|dprobit|drawnorm|ds|ds_util|dstdize|duplicates|durbina|dwstat|dydx|ed|edi|edit|eivreg|emdef|en|enc|enco|encod|encode|eq|erase|ereg|ereg_lf|ereg_p|ereg_sw|ereghet|ereghet_glf|ereghet_glf_sh|ereghet_gp|ereghet_ilf|ereghet_ilf_sh|ereghet_ip|eret|eretu|eretur|ereturn|err|erro|error|est|est_cfexist|est_cfname|est_clickable|est_expand|est_hold|est_table|est_unhold|est_unholdok|estat|estat_default|estat_summ|estat_vce_only|esti|estimates|etodow|etof|etomdy|expand|expandcl|fac|fact|facto|factor|factor_estat|factor_p|factor_pca_rotated|factor_rotate|factormat|fcast|fcast_compute|fcast_graph|fdades|fdadesc|fdadescr|fdadescri|fdadescrib|fdadescribe|fdasav|fdasave|fdause|fh_st|file|filefilter|fillin|find_hlp_file|findfile|findit|fit|fl|fli|flis|flist|fpredict|frac_adj|frac_chk|frac_cox|frac_ddp|frac_dis|frac_dv|frac_in|frac_mun|frac_pp|frac_pq|frac_pv|frac_wgt|frac_xo|fracgen|fracplot|fracpoly|fracpred|fron_ex|fron_hn|fron_p|fron_tn|fron_tn2|frontier|ftodate|ftoe|ftomdy|ftowdate|gamhet_glf|gamhet_gp|gamhet_ilf|gamhet_ip|gamma|gamma_d2|gamma_p|gamma_sw|gammahet|gdi_hexagon|gdi_spokes|genrank|genstd|genvmean|gettoken|gladder|glim_l01|glim_l02|glim_l03|glim_l04|glim_l05|glim_l06|glim_l07|glim_l08|glim_l09|glim_l10|glim_l11|glim_l12|glim_lf|glim_mu|glim_nw1|glim_nw2|glim_nw3|glim_p|glim_v1|glim_v2|glim_v3|glim_v4|glim_v5|glim_v6|glim_v7|glm|glm_p|glm_sw|glmpred|glogit|glogit_p|gmeans|gnbre_lf|gnbreg|gnbreg_p|gomp_lf|gompe_sw|gomper_p|gompertz|gompertzhet|gomphet_glf|gomphet_glf_sh|gomphet_gp|gomphet_ilf|gomphet_ilf_sh|gomphet_ip|gphdot|gphpen|gphprint|gprefs|gprobi_p|gprobit|gr|gr7|gr_copy|gr_current|gr_db|gr_describe|gr_dir|gr_draw|gr_draw_replay|gr_drop|gr_edit|gr_editviewopts|gr_example|gr_example2|gr_export|gr_print|gr_qscheme|gr_query|gr_read|gr_rename|gr_replay|gr_save|gr_set|gr_setscheme|gr_table|gr_undo|gr_use|graph|grebar|greigen|grmeanby|gs_fileinfo|gs_filetype|gs_graphinfo|gs_stat|gsort|gwood|h|hareg|hausman|haver|he|heck_d2|heckma_p|heckman|heckp_lf|heckpr_p|heckprob|hel|help|hereg|hetpr_lf|hetpr_p|hetprob|hettest|hexdump|hilite|hist|histogram|hlogit|hlu|hmeans|hotel|hotelling|hprobit|hreg|hsearch|icd9|icd9_ff|icd9p|iis|impute|imtest|inbase|include|inf|infi|infil|infile|infix|inp|inpu|input|ins|insheet|insp|inspe|inspec|inspect|integ|inten|intreg|intreg_p|intrg2_ll|intrg_ll|intrg_ll2|ipolate|iqreg|ir|irf|irf_create|irfm|iri|is_svy|is_svysum|isid|istdize|ivprobit|ivprobit_p|ivreg|ivreg_footnote|ivtob_lf|ivtobit|ivtobit_p|jacknife|jknife|jkstat|joinby|kalarma1|kap|kapmeier|kappa|kapwgt|kdensity|ksm|ksmirnov|ktau|kwallis|labelbook|ladder|levelsof|leverage|lfit|lfit_p|li|lincom|line|linktest|lis|list|lloghet_glf|lloghet_glf_sh|lloghet_gp|lloghet_ilf|lloghet_ilf_sh|lloghet_ip|llogi_sw|llogis_p|llogist|llogistic|llogistichet|lnorm_lf|lnorm_sw|lnorma_p|lnormal|lnormalhet|lnormhet_glf|lnormhet_glf_sh|lnormhet_gp|lnormhet_ilf|lnormhet_ilf_sh|lnormhet_ip|lnskew0|loadingplot|(?=|:=|==|!=|~=|<|>|=|!!|!)",
+ "name": "keyword.operator.comparison.stata"
+ },
+ {
+ "match": "\\(|\\)",
+ "name": "keyword.operator.parentheses.stata"
+ },
+ {
+ "match": "(##|#)",
+ "name": "keyword.operator.factor-variables.stata"
+ },
+ {
+ "match": "%",
+ "name": "keyword.operator.format.stata"
+ },
+ {
+ "match": ":",
+ "name": "punctuation.separator.key-value"
+ },
+ {
+ "match": "\\[",
+ "name": "punctuation.definition.parameters.begin.stata"
+ },
+ {
+ "match": "\\]",
+ "name": "punctuation.definition.parameters.end.stata"
+ },
+ {
+ "match": ",",
+ "name": "punctuation.definition.variable.begin.stata"
+ },
+ {
+ "match": ";",
+ "name": "keyword.operator.delimiter.stata"
+ }
+ ]
+ },
+ "string-compound": {
+ "patterns": [
+ {
+ "begin": "`\"",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.definition.string.begin.stata"
+ }
+ },
+ "end": "\"'|(?=\n)",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.string.end.stata"
+ }
+ },
+ "name": "string.quoted.double.compound.stata",
+ "patterns": [
+ {
+ "match": "\"",
+ "name": "string.quoted.double.compound.stata",
+ "comment": "This must come before #string-regular and #string-compound to accurately color `\"\"\"' in strings"
+ },
+ {
+ "match": "```(?=[^']*\")",
+ "name": "meta.markdown.code.block.stata",
+ "comment": "see https://github.com/kylebarron/language-stata/issues/53"
+ },
+ {
+ "include": "#string-regular"
+ },
+ {
+ "include": "#string-compound"
+ },
+ {
+ "include": "#macro-local-escaped"
+ },
+ {
+ "include": "#macro-global-escaped"
+ },
+ {
+ "include": "#macro-local"
+ },
+ {
+ "include": "#macro-global"
+ }
+ ]
+ }
+ ]
+ },
+ "string-regular": {
+ "patterns": [
+ {
+ "begin": "(?=0.1.0"
- }
-}
+ "name": "stata-enhanced",
+ "displayName": "Stata Enhanced",
+ "description": "Enhanced Stata syntax highlighting in Visual Studio Code",
+ "author": {
+ "name": "Kyle Barron"
+ },
+ "version": "1.6.1",
+ "publisher": "kylebarron",
+ "engines": {
+ "vscode": "^1.0.0"
+ },
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/kylebarron/language-stata/issues"
+ },
+ "homepage": "https://github.com/kylebarron/language-stata/blob/vscode/README.md",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/kylebarron/language-stata.git"
+ },
+ "categories": [
+ "Programming Languages"
+ ],
+ "galleryBanner": {
+ "color": "#1d5f6d",
+ "theme": "dark"
+ },
+ "contributes": {
+ "languages": [
+ {
+ "id": "stata",
+ "aliases": [
+ "Stata Enhanced",
+ "Stata",
+ "stata"
+ ],
+ "extensions": [
+ ".do",
+ ".ado",
+ ".mata"
+ ],
+ "configuration": "./language_config.json"
+ },
+ {
+ "id": "stata-dyndoc-latex",
+ "aliases": [
+ "Stata Dyndoc (LaTeX)"
+ ],
+ "extensions": [
+ ".dotex"
+ ],
+ "configuration": "./language_config.json"
+ },
+ {
+ "id": "stata-dyndoc-md",
+ "aliases": [
+ "Stata Dyndoc (Markdown)"
+ ],
+ "extensions": [
+ ".domd"
+ ],
+ "configuration": "./language_config.json"
+ },
+ {
+ "id": "stata-dyndoc",
+ "aliases": [
+ "Stata Dyndoc (Base)"
+ ],
+ "extensions": [
+ ],
+ "configuration": "./language_config.json"
+ }
+ ],
+ "grammars": [
+ {
+ "language": "stata",
+ "scopeName": "source.stata",
+ "path": "./grammars/stata.json"
+ },
+ {
+ "language": "stata-dyndoc-latex",
+ "scopeName": "source.dyndoc.latex.stata",
+ "path": "./grammars/stata-dyndoc-latex.json"
+ },
+ {
+ "language": "stata-dyndoc-md",
+ "scopeName": "source.dyndoc.md.stata",
+ "path": "./grammars/stata-dyndoc-md.json"
+ },
+ {
+ "language": "stata-dyndoc",
+ "scopeName": "source.dyndoc.stata",
+ "path": "./grammars/stata-dyndoc.json"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/settings/language-stata.cson b/settings/language-stata.cson
deleted file mode 100644
index c44169c..0000000
--- a/settings/language-stata.cson
+++ /dev/null
@@ -1,1829 +0,0 @@
-'.source.stata':
- 'editor':
- 'decreaseIndentPattern': '^\\s*\\}|^\\s*\\)'
- "bracket-matcher":
- autocompleteCharacters: [
- "()"
- "[]"
- "{}"
- "''"
- "`'"
- "\"\""
- "“”"
- "‘’"
- "«»"
- "‹›"
- ]
- autocomplete:
- symbols:
- function:
- selector: '.function'
- suggestions: [
- 'bofd'
- 'Cdhms'
- 'Chms'
- 'Clock'
- 'clock'
- 'Cmdyhms'
- 'Cofc'
- 'cofC'
- 'Cofd'
- 'cofd'
- 'daily'
- 'date'
- 'day'
- 'dhms'
- 'dofb'
- 'dofC'
- 'dofc'
- 'dofh'
- 'dofm'
- 'dofq'
- 'dofw'
- 'dofy'
- 'dow'
- 'doy'
- 'halfyear'
- 'halfyearly'
- 'hh'
- 'hhC'
- 'hms'
- 'hofd'
- 'hours'
- 'mdy'
- 'mdyhms'
- 'minutes'
- 'mm'
- 'mmC'
- 'mofd'
- 'month'
- 'monthly'
- 'msofhours'
- 'msofminutes'
- 'msofseconds'
- 'qofd'
- 'quarter'
- 'quarterly'
- 'seconds'
- 'ss'
- 'ssC'
- 'tC'
- 'tc'
- 'td'
- 'th'
- 'tm'
- 'tq'
- 'tw'
- 'week'
- 'weekly'
- 'wofd'
- 'year'
- 'yearly'
- 'yh'
- 'ym'
- 'yofd'
- 'yq'
- 'yw'
- 'betaden'
- 'ibeta'
- 'ibetatail'
- 'invibeta'
- 'invibetatail'
- 'nbetaden'
- 'nibeta'
- 'invnibeta'
- 'binomialp'
- 'binomial'
- 'binomialtail'
- 'invbinomial'
- 'invbinomialtail'
- 'cauchyden'
- 'cauchy'
- 'cauchytail'
- 'invcauchy'
- 'invcauchytail'
- 'lncauchyden'
- 'chi2den'
- 'chi2'
- 'chi2tail'
- 'invchi2'
- 'invchi2tail'
- 'nchi2den'
- 'nchi2'
- 'nchi2tail'
- 'invnchi2'
- 'invnchi2tail'
- 'npnchi2'
- 'dunnettprob'
- 'invdunnettprob'
- 'exponentialden'
- 'exponential'
- 'exponentialtail'
- 'invexponential'
- 'invexponentialtail'
- 'Fden'
- 'F'
- 'Ftail'
- 'invF'
- 'invFtail'
- 'nFden'
- 'nF'
- 'nFtail'
- 'invnF'
- 'invnFtail'
- 'npnF'
- 'gammaden'
- 'gammap'
- 'gammaptail'
- 'invgammap'
- 'invgammaptail'
- 'dgammapda'
- 'dgammapdada'
- 'dgammapdadx'
- 'dgammapdx'
- 'dgammapdxdx'
- 'lnigammaden'
- 'hypergeometricp'
- 'hypergeometric'
- 'igaussianden'
- 'igaussian'
- 'igaussiantail'
- 'invigaussian'
- 'invigaussiantail'
- 'lnigaussianden'
- 'laplaceden'
- 'laplace'
- 'laplacetail'
- 'invlaplace'
- 'invlaplacetail'
- 'lnlaplaceden'
- 'logisticden'
- 'logisticden'
- 'logisticden'
- 'logistic'
- 'logistic'
- 'logistic'
- 'logistictail'
- 'logistictail'
- 'logistictail'
- 'invlogistic'
- 'invlogistic'
- 'invlogistic'
- 'invlogistictail'
- 'invlogistictail'
- 'invlogistictail'
- 'nbinomialp'
- 'nbinomial'
- 'nbinomialtail'
- 'invnbinomial'
- 'invnbinomialtail'
- 'normalden'
- 'normalden'
- 'normalden'
- 'normal'
- 'invnormal'
- 'lnnormalden'
- 'lnnormalden'
- 'lnnormalden'
- 'lnnormal'
- 'binormal'
- 'lnmvnormalden'
- 'poissonp'
- 'poisson'
- 'poissontail'
- 'invpoisson'
- 'invpoissontail'
- 'tden'
- 't'
- 'ttail'
- 'invt'
- 'invttail'
- 'invnt'
- 'invnttail'
- 'ntden'
- 'nt'
- 'nttail'
- 'npnt'
- 'tukeyprob'
- 'invtukeyprob'
- 'weibullden'
- 'weibullden'
- 'weibull'
- 'weibull'
- 'weibulltail'
- 'weibulltail'
- 'invweibull'
- 'invweibull'
- 'invweibulltail'
- 'invweibulltail'
- 'weibullphden'
- 'weibullphden'
- 'weibullph'
- 'weibullph'
- 'weibullphtail'
- 'weibullphtail'
- 'invweibullph'
- 'invweibullph'
- 'invweibullphtail'
- 'invweibullphtail'
- 'lnwishartden'
- 'lniwishartden'
- 'abs'
- 'ceil'
- 'cloglog'
- 'comb'
- 'digamma'
- 'exp'
- 'floor'
- 'int'
- 'invcloglog'
- 'invlogit'
- 'ln'
- 'lnfactorial'
- 'lngamma'
- 'log'
- 'log10'
- 'logit'
- 'max'
- 'min'
- 'mod'
- 'reldif'
- 'round'
- 'sign'
- 'sqrt'
- 'sum'
- 'trigamma'
- 'trunc'
- 'cholesky'
- 'corr'
- 'diag'
- 'get'
- 'hadamard'
- 'I'
- 'inv'
- 'invsym'
- 'J'
- 'matuniform'
- 'nullmat'
- 'sweep'
- 'vec'
- 'vecdiag'
- 'coleqnumb'
- 'colnfreeparms'
- 'colnumb'
- 'colsof'
- 'det'
- 'diag0cnt'
- 'el'
- 'issymmetric'
- 'matmissing'
- 'mreldif'
- 'roweqnumb'
- 'rownfreeparms'
- 'rownumb'
- 'rowsof'
- 'trace'
- 'autocode'
- 'byteorder'
- 'c'
- 'chop'
- 'clip'
- 'cond'
- 'e'
- 'e'
- 'epsdouble'
- 'epsfloat'
- 'fileexists'
- 'fileread'
- 'filereaderror'
- 'filewrite'
- 'float'
- 'fmtwidth'
- 'inlist'
- 'inrange'
- 'irecode'
- 'matrix'
- 'maxbyte'
- 'maxdouble'
- 'maxfloat'
- 'maxint'
- 'maxlong'
- 'mi'
- 'minbyte'
- 'mindouble'
- 'minfloat'
- 'minint'
- 'minlong'
- 'missing'
- 'r'
- 'recode'
- 'replay'
- 'return'
- 's'
- 'scalar'
- 'smallestdouble'
- 'runiform'
- 'runiform'
- 'runiformint'
- 'rbeta'
- 'rbinomial'
- 'rcauchy'
- 'rchi2'
- 'rexponential'
- 'rgamma'
- 'rhypergeometric'
- 'rigaussian'
- 'rlaplace'
- 'rlogistic'
- 'rlogistic'
- 'rlogistic'
- 'rnbinomial'
- 'rnormal'
- 'rnormal'
- 'rnormal'
- 'rpoisson'
- 'rt'
- 'rweibull'
- 'rweibull'
- 'rweibullph'
- 'rweibullph'
- 'abbrev'
- 'char'
- 'uchar'
- 'collatorlocale'
- 'collatorversion'
- 'indexnot'
- 'plural'
- 'plural'
- 'real'
- 'regexm'
- 'regexr'
- 'regexs'
- 'ustrregexm'
- 'ustrregexrf'
- 'ustrregexra'
- 'ustrregexs'
- 'soundex'
- 'strcat'
- 'strdup'
- 'string'
- 'string'
- 'stritrim'
- 'strlen'
- 'ustrlen'
- 'udstrlen'
- 'strlower'
- 'ustrlower'
- 'strltrim'
- 'ustrltrim'
- 'strmatch'
- 'strofreal'
- 'strofreal'
- 'strpos'
- 'ustrpos'
- 'strproper'
- 'ustrtitle'
- 'strreverse'
- 'ustrreverse'
- 'strrpos'
- 'ustrrpos'
- 'strrtrim'
- 'ustrrtrim'
- 'strtoname'
- 'ustrtoname'
- 'strtrim'
- 'ustrtrim'
- 'strupper'
- 'ustrupper'
- 'subinstr'
- 'usubinstr'
- 'subinword'
- 'substr'
- 'usubstr'
- 'udsubstr'
- 'tobytes'
- 'uisdigit'
- 'uisletter'
- 'ustrcompare'
- 'ustrcompareex'
- 'ustrfix'
- 'ustrfrom'
- 'ustrinvalidcnt'
- 'ustrleft'
- 'ustrnormalize'
- 'ustrright'
- 'ustrsortkey'
- 'ustrsortkeyex'
- 'ustrto'
- 'ustrtohex'
- 'ustrunescape'
- 'word'
- 'ustrword'
- 'wordbreaklocale'
- 'wordcount'
- 'ustrwordcount'
- 'tin'
- 'twithin'
- 'acos'
- 'acosh'
- 'asin'
- 'asinh'
- 'atan'
- 'atan2'
- 'atanh'
- 'cos'
- 'cosh'
- 'sin'
- 'sinh'
- 'tan'
- 'tanh'
- 'mi'
- 'trim'
- 'itrim'
- ]
- keyword:
- selector: '.keyword'
- suggestions: [
- 'about'
- 'ac'
- 'acprplot'
- 'adjust'
- 'ado'
- 'adopath'
- 'adoupdate'
- 'alpha'
- 'ameans'
- 'anova'
- 'anovadef'
- 'aorder'
- 'append'
- 'approx'
- 'arch'
- 'archlm'
- 'areg'
- 'arfima'
- 'args'
- 'arima'
- 'as'
- 'asclogit'
- 'asmprobit'
- 'asprobit'
- 'asroprobit'
- 'ass'
- 'asse'
- 'asser'
- 'assert'
- 'avplot'
- 'avplots'
- 'bcal'
- 'bcib'
- 'bcii'
- 'bcskew0'
- 'bgodfrey'
- 'binreg'
- 'bip0'
- 'biplot'
- 'bipp'
- 'bipr'
- 'biprobit'
- 'bitest'
- 'bitesti'
- 'bitowt'
- 'blogit'
- 'boot'
- 'bootsamp'
- 'bootstrap'
- 'boxco'
- 'boxcox'
- 'bprobit'
- 'br'
- 'break'
- 'brier'
- 'bro'
- 'brow'
- 'brows'
- 'browse'
- 'brr'
- 'brrstat'
- 'bs'
- 'bsampl'
- 'bsample'
- 'bsqreg'
- 'bstat'
- 'bstrap'
- 'by'
- 'bys'
- 'byso'
- 'bysor'
- 'bysort'
- 'ca'
- 'cabiplot'
- 'camat'
- 'candisc'
- 'canon'
- 'cap'
- 'caprojection'
- 'capt'
- 'captu'
- 'captur'
- 'capture'
- 'cat'
- 'cc'
- 'cchart'
- 'cci'
- 'cd'
- 'censobs'
- 'centile'
- 'cf'
- 'changeeol'
- 'char'
- 'chdir'
- 'check'
- 'checkdlgfiles'
- 'checkestimationsample'
- 'checkhlpfiles'
- 'checksum'
- 'chelp'
- 'ci'
- 'cii'
- 'cl'
- 'class'
- 'classutil'
- 'clear'
- 'cli'
- 'clis'
- 'clist'
- 'clo'
- 'clog'
- 'clogi'
- 'clogit'
- 'clogitp'
- 'clogl'
- 'cloglog'
- 'clonevar'
- 'cls'
- 'clslistarray'
- 'cluster'
- 'clustermat'
- 'cmdlog'
- 'cnr'
- 'cnre'
- 'cnreg'
- 'cnsreg'
- 'codebook'
- 'collaps4'
- 'collapse'
- 'colormult'
- 'compare'
- 'compress'
- 'conf'
- 'confi'
- 'confir'
- 'confirm'
- 'conren'
- 'cons'
- 'const'
- 'constr'
- 'constra'
- 'constrai'
- 'constrain'
- 'constraint'
- 'continue'
- 'contract'
- 'contrast'
- 'contrasts'
- 'copy'
- 'copyright'
- 'copysource'
- 'cor'
- 'corc'
- 'corr'
- 'corr2data'
- 'corre'
- 'correl'
- 'correla'
- 'correlat'
- 'correlate'
- 'corrgram'
- 'corrtab'
- 'corrtable'
- 'cou'
- 'coun'
- 'count'
- 'cox'
- 'coxbase'
- 'coxhaz'
- 'coxvar'
- 'cprplot'
- 'crc'
- 'cret'
- 'cretu'
- 'cretur'
- 'creturn'
- 'cross'
- 'cs'
- 'cscript'
- 'csi'
- 'ct'
- 'ctset'
- 'ctst'
- 'cttost'
- 'cumsp'
- 'cumul'
- 'cusum'
- 'cutil'
- 'd'
- 'datasig'
- 'datasignature'
- 'datetof'
- 'db'
- 'dbeta'
- 'de'
- 'dec'
- 'deco'
- 'decod'
- 'decode'
- 'deff'
- 'des'
- 'desc'
- 'descr'
- 'descri'
- 'describ'
- 'describe'
- 'destring'
- 'dfactor'
- 'dfbeta'
- 'dfgls'
- 'dfuller'
- 'di'
- 'dir'
- 'dirstats'
- 'dis'
- 'discard'
- 'discrim'
- 'disp'
- 'displ'
- 'displa'
- 'display'
- 'do'
- 'doe'
- 'doed'
- 'doedi'
- 'doedit'
- 'dotplot'
- 'dprobit'
- 'drawnorm'
- 'drop'
- 'ds'
- 'dstdize'
- 'dta'
- 'duplicates'
- 'durbina'
- 'dvech'
- 'dwstat'
- 'dydx'
- 'e'
- 'ed'
- 'edi'
- 'edit'
- 'egen'
- 'eivreg'
- 'else'
- 'emdef'
- 'en'
- 'enc'
- 'enco'
- 'encod'
- 'encode'
- 'eq'
- 'erase'
- 'ereg'
- 'ereghet'
- 'eret'
- 'eretu'
- 'eretur'
- 'ereturn'
- 'err'
- 'erro'
- 'error'
- 'esize'
- 'esizei'
- 'est'
- 'estadd'
- 'estat'
- 'esti'
- 'estim'
- 'estima'
- 'estimat'
- 'estimate'
- 'estimates'
- 'estout'
- 'estpost'
- 'eststo'
- 'esttab'
- 'etodow'
- 'etof'
- 'etomdy'
- 'etpoisson'
- 'etreg'
- 'etregr'
- 'etregre'
- 'etregres'
- 'etregress'
- 'ex'
- 'exi'
- 'exit'
- 'exlogistic'
- 'expand'
- 'expandcl'
- 'expoisson'
- 'export'
- 'expr'
- 'fac'
- 'fact'
- 'facto'
- 'factor'
- 'factormat'
- 'fc'
- 'fcast'
- 'fdades'
- 'fdadesc'
- 'fdadescr'
- 'fdadescri'
- 'fdadescrib'
- 'fdadescribe'
- 'fdasav'
- 'fdasave'
- 'fdause'
- 'fdi'
- 'fh'
- 'figout'
- 'file'
- 'filefilter'
- 'fillin'
- 'find'
- 'findfile'
- 'findit'
- 'fit'
- 'fl'
- 'fli'
- 'flis'
- 'flist'
- 'for'
- 'fore'
- 'foreach'
- 'forec'
- 'foreca'
- 'forecas'
- 'forecast'
- 'form'
- 'forma'
- 'format'
- 'forv'
- 'forva'
- 'forval'
- 'forvalu'
- 'forvalue'
- 'forvalues'
- 'fp'
- 'fpredict'
- 'frac'
- 'fracgen'
- 'fracplot'
- 'fracpoly'
- 'fracpred'
- 'fron'
- 'frontier'
- 'ftodate'
- 'ftoe'
- 'ftomdy'
- 'ftowdate'
- 'fvexpand'
- 'fvrevar'
- 'fvset'
- 'fvunab'
- 'g'
- 'gamhet'
- 'gamma'
- 'gammahet'
- 'gdi'
- 'ge'
- 'gen'
- 'gene'
- 'gener'
- 'genera'
- 'generat'
- 'generate'
- 'genrank'
- 'genstd'
- 'genvmean'
- 'getcmds'
- 'getmata'
- 'gettoken'
- 'gl'
- 'gladder'
- 'glim'
- 'glm'
- 'glmixed'
- 'glmpred'
- 'glo'
- 'glob'
- 'globa'
- 'global'
- 'glogit'
- 'gmeans'
- 'gmm'
- 'gnbre'
- 'gnbreg'
- 'gomp'
- 'gompe'
- 'gomper'
- 'gompertz'
- 'gompertzhet'
- 'gomphet'
- 'gphdot'
- 'gphpen'
- 'gphprint'
- 'gprefs'
- 'gprobi'
- 'gprobit'
- 'gr'
- 'gr7'
- 'graph'
- 'graph7'
- 'grebar'
- 'greigen'
- 'grmeanby'
- 'gs'
- 'gsem'
- 'gsort'
- 'gwood'
- 'h'
- 'hadimvo'
- 'hareg'
- 'hausman'
- 'haver'
- 'he'
- 'heck'
- 'heckma'
- 'heckman'
- 'heckopr'
- 'heckoprobit'
- 'heckp'
- 'heckpr'
- 'heckprob'
- 'heckprobit'
- 'hel'
- 'help'
- 'hereg'
- 'hetpr'
- 'hetprob'
- 'hetprobit'
- 'hettest'
- 'hexdump'
- 'hilite'
- 'hist'
- 'histbox'
- 'histogram'
- 'hlogit'
- 'hlu'
- 'hmeans'
- 'hotel'
- 'hotelling'
- 'hprobit'
- 'hreg'
- 'hsearch'
- 'icc'
- 'icd9'
- 'icd9p'
- 'if'
- 'iis'
- 'import'
- 'impute'
- 'imtest'
- 'inbase'
- 'include'
- 'inf'
- 'infi'
- 'infil'
- 'infile'
- 'infix'
- 'inp'
- 'inpu'
- 'input'
- 'ins'
- 'insheet'
- 'insp'
- 'inspe'
- 'inspec'
- 'inspect'
- 'integ'
- 'inten'
- 'intreg'
- 'intrg'
- 'intrg2'
- 'ipolate'
- 'iqreg'
- 'ir'
- 'irf'
- 'irfm'
- 'iri'
- 'is'
- 'isid'
- 'istdize'
- 'ivpoisson'
- 'ivprob'
- 'ivprobit'
- 'ivreg'
- 'ivregress'
- 'ivtobit'
- 'jackknife'
- 'jacknife'
- 'javacall'
- 'jknife'
- 'jkstat'
- 'joinby'
- 'kalarma1'
- 'kap'
- 'kapmeier'
- 'kappa'
- 'kapwgt'
- 'kdensity'
- 'keep'
- 'ksm'
- 'ksmirnov'
- 'ktau'
- 'kwallis'
- 'l'
- 'la'
- 'lab'
- 'labe'
- 'label'
- 'labelbook'
- 'ladder'
- 'latab'
- 'latabstat'
- 'levels'
- 'levelsof'
- 'leverage'
- 'lfit'
- 'li'
- 'lincom'
- 'line'
- 'linktest'
- 'lis'
- 'list'
- 'listcoef'
- 'lloghet'
- 'llogi'
- 'llogis'
- 'llogist'
- 'llogistic'
- 'llogistichet'
- 'lnorm'
- 'lnorma'
- 'lnormal'
- 'lnormalhet'
- 'lnormhet'
- 'lnskew0'
- 'loadingplot'
- 'loc'
- 'loca'
- 'local'
- 'log'
- 'logi'
- 'logis'
- 'logistic'
- 'logit'
- 'loglogs'
- 'logrank'
- 'loneway'
- 'lookfor'
- 'lookup'
- 'lowess'
- 'lpoly'
- 'lpredict'
- 'lrecomp'
- 'lroc'
- 'lrtest'
- 'ls'
- 'lsens'
- 'lstat'
- 'ltable'
- 'ltriang'
- 'lv'
- 'lvr2plot'
- 'm'
- 'ma'
- 'mac'
- 'macr'
- 'macro'
- 'makecns'
- 'man'
- 'mano'
- 'manov'
- 'manova'
- 'manovatest'
- 'mantel'
- 'margin'
- 'margins'
- 'marginsplot'
- 'mark'
- 'markin'
- 'markout'
- 'marksample'
- 'mat'
- 'mata'
- 'matalabel'
- 'matcproc'
- 'matlist'
- 'matname'
- 'matr'
- 'matri'
- 'matrix'
- 'matstrik'
- 'mca'
- 'mcaplot'
- 'mcaprojection'
- 'mcc'
- 'mcci'
- 'md0_'
- 'md1_'
- 'md1debug_'
- 'md2_'
- 'md2debug_'
- 'mds'
- 'mdsconfig'
- 'mdslong'
- 'mdsmat'
- 'mdsshepard'
- 'mdytoe'
- 'mdytof'
- 'me'
- 'mean'
- 'means'
- 'mecloglog'
- 'median'
- 'meglm'
- 'melogit'
- 'memory'
- 'menbreg'
- 'meologit'
- 'meoprobit'
- 'mepoisson'
- 'meprobit'
- 'meqparse'
- 'meqrlogit'
- 'meqrpoisson'
- 'mer'
- 'merg'
- 'merge'
- 'mfp'
- 'mfx'
- 'mgarch'
- 'mhelp'
- 'mhodds'
- 'mi'
- 'minbound'
- 'misstable'
- 'mixed'
- 'mkassert'
- 'mkcorr'
- 'mkdir'
- 'mkmat'
- 'mkspline'
- 'ml'
- 'mleval'
- 'mlexp'
- 'mlf_'
- 'mlmatbysum'
- 'mlmatsum'
- 'mlog'
- 'mlogi'
- 'mlogit'
- 'mlopts'
- 'mlsum'
- 'mlvecsum'
- 'mnl0_'
- 'mopt'
- 'mor'
- 'more'
- 'mov'
- 'move'
- 'mprobit'
- 'mrdu0_'
- 'mrdu1_'
- 'mvdecode'
- 'mvencode'
- 'mvreg'
- 'mvtest'
- 'n'
- 'nbreg'
- 'nestreg'
- 'net'
- 'newey'
- 'news'
- 'nl'
- 'nlcom'
- 'nlexp2'
- 'nlexp2a'
- 'nlexp3'
- 'nlgom3'
- 'nlgom4'
- 'nlinit'
- 'nllog3'
- 'nllog4'
- 'nlog'
- 'nlogit'
- 'nlogitgen'
- 'nlogittree'
- 'nlpred'
- 'nlsur'
- 'no'
- 'nobreak'
- 'noi'
- 'nois'
- 'noisi'
- 'noisil'
- 'noisily'
- 'note'
- 'notes'
- 'novarabbrev'
- 'nptrend'
- 'numlabel'
- 'numlist'
- 'odbc'
- 'oddsrisk'
- 'old'
- 'olo'
- 'olog'
- 'ologi'
- 'ologit'
- 'ologitp'
- 'on'
- 'one'
- 'onew'
- 'onewa'
- 'oneway'
- 'op'
- 'opr'
- 'opro'
- 'oprob'
- 'oprobi'
- 'oprobit'
- 'oprobitp'
- 'opts'
- 'order'
- 'orthog'
- 'orthpoly'
- 'ou'
- 'out'
- 'outf'
- 'outfi'
- 'outfil'
- 'outfile'
- 'outs'
- 'outsh'
- 'outshe'
- 'outshee'
- 'outsheet'
- 'ovtest'
- 'pac'
- 'palette'
- 'parse'
- 'pause'
- 'pca'
- 'pcamat'
- 'pchart'
- 'pchi'
- 'pcorr'
- 'pctile'
- 'pentium'
- 'pergram'
- 'permute'
- 'personal'
- 'peto'
- 'pkcollapse'
- 'pkcross'
- 'pkequiv'
- 'pkexamine'
- 'pkshape'
- 'pksumm'
- 'pl'
- 'playsnd'
- 'plo'
- 'plot'
- 'plugin'
- 'pnorm'
- 'poisgof'
- 'poiss'
- 'poisso'
- 'poisson'
- 'post'
- 'postclose'
- 'postfile'
- 'postrtoe'
- 'postutil'
- 'power'
- 'pperron'
- 'pr'
- 'prais'
- 'predict'
- 'predictnl'
- 'preserve'
- 'print'
- 'pro'
- 'prob'
- 'probi'
- 'probit'
- 'proc'
- 'procoverlay'
- 'procrustes'
- 'profiler'
- 'prog'
- 'progr'
- 'progra'
- 'program'
- 'projmanager'
- 'prop'
- 'proportion'
- 'prtest'
- 'prtesti'
- 'psdensity'
- 'putexcel'
- 'putmata'
- 'pwcompare'
- 'pwcorr'
- 'pwd'
- 'pwmean'
- 'qby'
- 'qbys'
- 'qchi'
- 'qladder'
- 'qnorm'
- 'qqplot'
- 'qreg'
- 'qu'
- 'quadchk'
- 'quantile'
- 'que'
- 'quer'
- 'query'
- 'qui'
- 'quie'
- 'quiet'
- 'quietl'
- 'quietly'
- 'range'
- 'ranksum'
- 'ratio'
- 'rchart'
- 'rcof'
- 'recast'
- 'recode'
- 'reg'
- 'reg3'
- 'regdw'
- 'regr'
- 'regre'
- 'regres'
- 'regress'
- 'regriv'
- 'remap'
- 'ren'
- 'rena'
- 'renam'
- 'rename'
- 'renpfix'
- 'renvars'
- 'repeat'
- 'replace'
- 'reshape'
- 'restore'
- 'ret'
- 'retu'
- 'retur'
- 'return'
- 'rm'
- 'rmdir'
- 'robvar'
- 'roccomp'
- 'rocf'
- 'rocfit'
- 'rocgold'
- 'rocplot'
- 'rocreg'
- 'rocregplot'
- 'rocregstat'
- 'roctab'
- 'rolling'
- 'rologit'
- 'rot'
- 'rota'
- 'rotat'
- 'rotate'
- 'rotatemat'
- 'rreg'
- 'ru'
- 'run'
- 'runtest'
- 'rvfplot'
- 'rvpplot'
- 'sa'
- 'safesum'
- 'sample'
- 'sampsi'
- 'sav'
- 'save'
- 'savedresults'
- 'saveold'
- 'sc'
- 'sca'
- 'scal'
- 'scala'
- 'scalar'
- 'scatter'
- 'scm'
- 'sco'
- 'scob'
- 'scobi'
- 'scobit'
- 'scor'
- 'score'
- 'scoreplot'
- 'scree'
- 'screeplot'
- 'sdr'
- 'sdtest'
- 'sdtesti'
- 'se'
- 'search'
- 'sem'
- 'sembootmediation'
- 'sembuilder'
- 'sencode'
- 'separate'
- 'seperate'
- 'serrbar'
- 'serset'
- 'set'
- 'sfrancia'
- 'sg'
- 'sgmediation'
- 'sh'
- 'she'
- 'shel'
- 'shell'
- 'shewhart'
- 'signestimationsample'
- 'signrank'
- 'signtest'
- 'simul'
- 'simulate'
- 'sktest'
- 'sleep'
- 'slogit'
- 'smooth'
- 'snapshot'
- 'snapspan'
- 'so'
- 'sor'
- 'sort'
- 'spearman'
- 'spikeplot'
- 'spikeplt'
- 'spline'
- 'split'
- 'sqreg'
- 'sret'
- 'sretu'
- 'sretur'
- 'sreturn'
- 'ssc'
- 'ssd'
- 'sspace'
- 'st'
- 'stack'
- 'statsby'
- 'stbase'
- 'stci'
- 'stcox'
- 'stcoxkm'
- 'stcrr'
- 'stcrre'
- 'stcrreg'
- 'stcstat'
- 'stcurv'
- 'stcurve'
- 'stdes'
- 'stdescribe'
- 'stem'
- 'stepwise'
- 'stereg'
- 'stfill'
- 'stgen'
- 'stir'
- 'stjoin'
- 'stmc'
- 'stmh'
- 'storedresults'
- 'stphplot'
- 'stphtest'
- 'stpow'
- 'stpowe'
- 'stpower'
- 'stptime'
- 'strate'
- 'streg'
- 'streghet'
- 'streset'
- 'strl'
- 'strlread'
- 'strlwrite'
- 'sts'
- 'stset'
- 'stsplit'
- 'stsum'
- 'sttocc'
- 'sttoct'
- 'stvary'
- 'stweib'
- 'su'
- 'suest'
- 'sum'
- 'summ'
- 'summa'
- 'summar'
- 'summari'
- 'summariz'
- 'summarize'
- 'sunflower'
- 'sureg'
- 'survcurv'
- 'survsum'
- 'svar'
- 'svmat'
- 'svy'
- 'svydes'
- 'svydescribe'
- 'svygen'
- 'svygnbreg'
- 'svyheckman'
- 'svyheckprob'
- 'svyintreg'
- 'svyintrg'
- 'svyivreg'
- 'svylc'
- 'svylog'
- 'svylogit'
- 'svymarkout'
- 'svymean'
- 'svymlog'
- 'svymlogit'
- 'svynbreg'
- 'svyolog'
- 'svyologit'
- 'svyoprob'
- 'svyoprobit'
- 'svyopts'
- 'svypois'
- 'svypoisson'
- 'svyprobit'
- 'svyprobt'
- 'svyprop'
- 'svyratio'
- 'svyreg'
- 'svyregress'
- 'svyset'
- 'svytab'
- 'svytest'
- 'svytotal'
- 'sw'
- 'swcnreg'
- 'swcox'
- 'swereg'
- 'swilk'
- 'swlogis'
- 'swlogit'
- 'swologit'
- 'swoprbt'
- 'swpois'
- 'swprobit'
- 'swqreg'
- 'swtobit'
- 'swweib'
- 'symmetry'
- 'symmi'
- 'symplot'
- 'syntax'
- 'sysdescribe'
- 'sysdir'
- 'sysuse'
- 'szroeter'
- 'ta'
- 'tab'
- 'tab1'
- 'tab2'
- 'tabd'
- 'tabdi'
- 'tabdis'
- 'tabdisp'
- 'tabi'
- 'table'
- 'tabodds'
- 'tabout'
- 'tabstat'
- 'tabstatout'
- 'tabu'
- 'tabul'
- 'tabula'
- 'tabulat'
- 'tabulate'
- 'te'
- 'teffects'
- 'tempfile'
- 'tempname'
- 'tempvar'
- 'tes'
- 'test'
- 'testnl'
- 'testparm'
- 'teststd'
- 'tetrachoric'
- 'time'
- 'timer'
- 'tis'
- 'tnbreg'
- 'tob'
- 'tobi'
- 'tobit'
- 'token'
- 'tokeni'
- 'tokeniz'
- 'tokenize'
- 'tostring'
- 'total'
- 'tpoiss'
- 'tpoisson'
- 'tpredict'
- 'translate'
- 'translator'
- 'transmap'
- 'treat'
- 'treatr'
- 'treatreg'
- 'trim'
- 'trnb'
- 'trpoiss'
- 'trunc'
- 'truncr'
- 'truncreg'
- 'tsappend'
- 'tset'
- 'tsfill'
- 'tsfilter'
- 'tsline'
- 'tsreport'
- 'tsrevar'
- 'tsrline'
- 'tsset'
- 'tssmooth'
- 'tsunab'
- 'ttab'
- 'ttest'
- 'ttesti'
- 'tut'
- 'tutorial'
- 'tw'
- 'tware'
- 'two'
- 'twoway'
- 'ty'
- 'typ'
- 'type'
- 'typeof'
- 'u'
- 'ucm'
- 'unab'
- 'unabbrev'
- 'unabcmd'
- 'unzipfile'
- 'update'
- 'us'
- 'use'
- 'uselabel'
- 'var'
- 'varabbrev'
- 'varbasic'
- 'varfcast'
- 'vargranger'
- 'varirf'
- 'varlmar'
- 'varm'
- 'varma'
- 'varman'
- 'varmana'
- 'varmanag'
- 'varmanage'
- 'varnorm'
- 'varsoc'
- 'varstable'
- 'varwle'
- 'vce'
- 'vec'
- 'vecirf'
- 'veclmar'
- 'vecnorm'
- 'vecrank'
- 'vecstable'
- 'verinst'
- 'vers'
- 'versi'
- 'versio'
- 'version'
- 'view'
- 'viewsource'
- 'vif'
- 'vwls'
- 'wdatetof'
- 'webdescribe'
- 'webgetsem'
- 'webseek'
- 'webuse'
- 'weib'
- 'weib1'
- 'weib2'
- 'weibhet'
- 'weibu'
- 'weibul'
- 'weibull'
- 'weibullhet'
- 'wh'
- 'whelp'
- 'whi'
- 'which'
- 'whil'
- 'while'
- 'wilc'
- 'wilcoxon'
- 'win'
- 'wind'
- 'windo'
- 'window'
- 'winexec'
- 'wntestb'
- 'wntestq'
- 'xchart'
- 'xcorr'
- 'xi'
- 'xmlsav'
- 'xmlsave'
- 'xmluse'
- 'xpose'
- 'xsh'
- 'xshe'
- 'xshel'
- 'xshell'
- 'xt'
- 'xtab'
- 'xtabond'
- 'xtbin'
- 'xtclog'
- 'xtcloglog'
- 'xtcnt'
- 'xtcorr'
- 'xtdata'
- 'xtdes'
- 'xtdescribe'
- 'xtdpd'
- 'xtdpdsys'
- 'xtfront'
- 'xtfrontier'
- 'xtgee'
- 'xtgls'
- 'xthaus'
- 'xthausman'
- 'xtht'
- 'xthtaylor'
- 'xtile'
- 'xtint'
- 'xtintreg'
- 'xtivreg'
- 'xtline'
- 'xtlogit'
- 'xtmelogit'
- 'xtmepoisson'
- 'xtmixed'
- 'xtnb'
- 'xtnbreg'
- 'xtologit'
- 'xtoprobit'
- 'xtordinal'
- 'xtpcse'
- 'xtpois'
- 'xtpoisson'
- 'xtpred'
- 'xtprobit'
- 'xtps'
- 'xtrar'
- 'xtrc'
- 'xtrchh'
- 'xtrefe'
- 'xtreg'
- 'xtregar'
- 'xtrere'
- 'xtset'
- 'xtsf'
- 'xtsum'
- 'xttab'
- 'xttest0'
- 'xttobit'
- 'xttrans'
- 'xtunitroot'
- 'yx'
- 'yxview'
- 'zap'
- 'zinb'
- 'zip'
- 'zipfile'
- 'zscore'
- 'ztnb'
- ]
- class:
- selector: '.class.name, .entity.name.type.class'
- typePriority: 4
- method:
- suggestions: [
- 'graph'
- 'graph bar'
- 'graph box'
- 'graph close'
- 'graph combine'
- 'graph copy'
- 'graph describe'
- 'graph dir'
- 'graph display'
- 'graph dot'
- 'graph drop'
- 'graph export'
- 'graph manipulation'
- 'graph matrix'
- 'graph other'
- 'graph pie'
- 'graph play'
- 'graph print'
- 'graph query'
- 'graph rename'
- 'graph replay'
- 'graph save'
- 'graph set'
- 'graph twoway'
- 'graph twoway area'
- 'graph twoway bar'
- 'graph twoway connected'
- 'graph twoway contour'
- 'graph twoway contourline'
- 'graph twoway dot'
- 'graph twoway dropline'
- 'graph twoway fpfit'
- 'graph twoway fpfitci'
- 'graph twoway function'
- 'graph twoway histogram'
- 'graph twoway kdensity'
- 'graph twoway lfit'
- 'graph twoway lfitci'
- 'graph twoway line'
- 'graph twoway lowess'
- 'graph twoway lpoly'
- 'graph twoway lpolyci'
- 'graph twoway mband'
- 'graph twoway mspline'
- 'graph twoway pcarrow'
- 'graph twoway pcarrowi'
- 'graph twoway pccapsym'
- 'graph twoway pci'
- 'graph twoway pcscatter'
- 'graph twoway pcspike'
- 'graph twoway qfit'
- 'graph twoway qfitci'
- 'graph twoway rarea'
- 'graph twoway rbar'
- 'graph twoway rcap'
- 'graph twoway rcapsym'
- 'graph twoway rconnected'
- 'graph twoway rline'
- 'graph twoway rscatter'
- 'graph twoway rspike'
- 'graph twoway scatter'
- 'graph twoway scatteri'
- 'graph twoway spike'
- 'graph twoway tsline'
- 'graph use'
- 'palette'
- 'set graphics'
- 'set printcolor'
- 'set scheme'
- ]
- '':
- selector: '.source'
- typePriority: 1
\ No newline at end of file
diff --git a/snippets/language-stata.cson b/snippets/language-stata.cson
deleted file mode 100644
index 71c1262..0000000
--- a/snippets/language-stata.cson
+++ /dev/null
@@ -1,22 +0,0 @@
-'.source.stata':
- 'ado-file Header':
- 'prefix': 'adohead'
- 'body': '*! version 1.0.0 `date +%d%b%Y | tr \'[A-Z]\' \'[a-z]\'`\n// ${1:description}\n\nprogram ${2:pgmname}\n\tversion 12.1\n\t$0\n\nend\n'
- 'do-file Header':
- 'prefix': 'dohead'
- 'body': '// ${1:description}\n\nversion 14.1\n$0'
- 'export excel':
- 'prefix': 'export exc'
- 'body': 'export excel${1: varlist} using ${2:filename}${3: if $4}${5: in $6}${7:,${8: sheet("${9:sheetname}")}${10: cell(${11:start})}${12| sheetmodify, sheetreplace, replace|}${13: firstrow(${14|variables,varlabels|})}${15: nolabel}${16: datestring("${17:datetime_format}")}${18: missing("${19:repval}")}${20: locale("${21:locale}")}}'
- 'foreach':
- 'prefix': 'fore'
- 'body': 'foreach ${1:lname} ${2:|in,of local,of global,of varlist,of newlist,of numlist|} ${3:list} {\n\t$0\n}'
- 'forvalues':
- 'prefix': 'forv'
- 'body': 'forvalues ${1:lname} = ${2:range} {\n\t$0\n}'
- 'import excel':
- 'prefix': 'import exc'
- 'body': 'import excel${1: extvarlist} using ${2:filename}${3:,${4: describe}${5:${6: sheet("${7:sheetname}")}${8: cellrange(${9:start}${10::end})}${11: firstrow}${12: case(${13|preserve,lower,upper|})}${14: allstring}${15: clear}${16: locale("${17:locale}")}}}'
- 'mixed':
- 'prefix': 'mix'
- 'body': 'mixed ${1:dv} ${2:fixed} || ${3:nesting}: ${4:reffects}, '
\ No newline at end of file