mirror of
https://github.com/alecthomas/chroma.git
synced 2025-03-17 20:58:08 +02:00
parent
6b98624dc1
commit
2b84f4bd4d
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
7
lexers/testdata/r.actual
vendored
Normal file
7
lexers/testdata/r.actual
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
items %>%
|
||||
group_by(id) %>%
|
||||
filter(n() > 2) %>%
|
||||
mutate(count = n()) %>%
|
||||
ungroup() %>%
|
||||
distinct(id, .keep_all = TRUE)
|
||||
write_csv("items.csv")
|
58
lexers/testdata/r.expected
vendored
Normal file
58
lexers/testdata/r.expected
vendored
Normal file
@ -0,0 +1,58 @@
|
||||
[
|
||||
{"type":"Name","value":"items"},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"Operator","value":"%\u003e%"},
|
||||
{"type":"Text","value":"\n\t"},
|
||||
{"type":"NameFunction","value":"group_by"},
|
||||
{"type":"Punctuation","value":"("},
|
||||
{"type":"Name","value":"id"},
|
||||
{"type":"Punctuation","value":")"},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"Operator","value":"%\u003e%"},
|
||||
{"type":"Text","value":"\n\t"},
|
||||
{"type":"NameFunction","value":"filter"},
|
||||
{"type":"Punctuation","value":"("},
|
||||
{"type":"NameFunction","value":"n"},
|
||||
{"type":"Punctuation","value":"()"},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"Operator","value":"\u003e"},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"LiteralNumber","value":"2"},
|
||||
{"type":"Punctuation","value":")"},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"Operator","value":"%\u003e%"},
|
||||
{"type":"Text","value":"\n\t"},
|
||||
{"type":"NameFunction","value":"mutate"},
|
||||
{"type":"Punctuation","value":"("},
|
||||
{"type":"Name","value":"count"},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"Operator","value":"="},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"NameFunction","value":"n"},
|
||||
{"type":"Punctuation","value":"())"},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"Operator","value":"%\u003e%"},
|
||||
{"type":"Text","value":"\n\t"},
|
||||
{"type":"NameFunction","value":"ungroup"},
|
||||
{"type":"Punctuation","value":"()"},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"Operator","value":"%\u003e%"},
|
||||
{"type":"Text","value":"\n\t"},
|
||||
{"type":"NameFunction","value":"distinct"},
|
||||
{"type":"Punctuation","value":"("},
|
||||
{"type":"Name","value":"id"},
|
||||
{"type":"Punctuation","value":","},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"Name","value":".keep_all"},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"Operator","value":"="},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"KeywordConstant","value":"TRUE"},
|
||||
{"type":"Punctuation","value":")"},
|
||||
{"type":"Text","value":"\n\t"},
|
||||
{"type":"NameFunction","value":"write_csv"},
|
||||
{"type":"Punctuation","value":"("},
|
||||
{"type":"LiteralString","value":"\"items.csv\""},
|
||||
{"type":"Punctuation","value":")"},
|
||||
{"type":"Text","value":"\n"}
|
||||
]
|
Loading…
x
Reference in New Issue
Block a user