Add support for Stata (#1112)

* add support for stata

* readme

* add test
This commit is contained in:
Etienne Bacher 2024-08-16 14:04:47 +02:00 committed by GitHub
parent b59cbbf52f
commit 79788ccf38
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 22 additions and 0 deletions

View file

@ -519,6 +519,7 @@ SpecmanE
Spice
Sql
SRecode
Stata
Stratego
Svelte
Svg

View file

@ -1538,6 +1538,11 @@
"quotes": [["\\\"", "\\\""]],
"extensions": ["stan"]
},
"Stata": {
"line_comment": ["//", "*"],
"multi_line_comments": [["/*", "*/"]],
"extensions": ["do"]
},
"Stratego": {
"name": "Stratego/XT",
"line_comment": ["//"],

16
tests/data/stata.do Normal file
View file

@ -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