Skip to content

Commit

Permalink
Add support for Stata (#1112)
Browse files Browse the repository at this point in the history
* add support for stata

* readme

* add test
  • Loading branch information
etiennebacher authored Aug 16, 2024
1 parent b59cbbf commit 79788cc
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,7 @@ SpecmanE
Spice
Sql
SRecode
Stata
Stratego
Svelte
Svg
Expand Down
5 changes: 5 additions & 0 deletions languages.json
Original file line number Diff line number Diff line change
Expand Up @@ -1538,6 +1538,11 @@
"quotes": [["\\\"", "\\\""]],
"extensions": ["stan"]
},
"Stata": {
"line_comment": ["//", "*"],
"multi_line_comments": [["/*", "*/"]],
"extensions": ["do"]
},
"Stratego": {
"name": "Stratego/XT",
"line_comment": ["//"],
Expand Down
16 changes: 16 additions & 0 deletions tests/data/stata.do
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
* 16 lines 6 code 7 comments 3 blanks
* This is a comment
**** Any number of * symbol

use "foo.dta", replace
gen x = 1*2
gen x2 = 1/2
/*
Here's a comment block
*/

if c(username) == "foobar" {
global FOO 1
}

// Finally another symbol for comment

0 comments on commit 79788cc

Please sign in to comment.