Skip to content

Commit e1cdd59

Browse files
Merge pull request #687 from espinielli/master
- Evaluate create_tree() in vignette.
2 parents 4905fc5 + 19984c7 commit e1cdd59

File tree

1 file changed

+1
-22
lines changed

1 file changed

+1
-22
lines changed

vignettes/customizing_styler.Rmd

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -242,31 +242,10 @@ line breaks and spaces. Let's first create the nested parse table.
242242
code <- c("add_one <- function(x) { x + 1 }")
243243
```
244244

245-
``` r
245+
```{r}
246246
styler:::create_tree(code)
247247
```
248248

249-
## levelName
250-
## 1 ROOT (token: short_text [lag_newlines/spaces] {id})
251-
## 2 °--expr: [0/0] {23}
252-
## 3 ¦--expr: [0/1] {3}
253-
## 4 ¦ °--SYMBOL: add_o [0/0] {1}
254-
## 5 ¦--LEFT_ASSIGN: <- [0/1] {2}
255-
## 6 °--expr: [0/0] {22}
256-
## 7 ¦--FUNCTION: funct [0/0] {4}
257-
## 8 ¦--'(': ( [0/0] {5}
258-
## 9 ¦--SYMBOL_FORMALS: x [0/0] {6}
259-
## 10 ¦--')': ) [0/1] {7}
260-
## 11 °--expr: [0/0] {19}
261-
## 12 ¦--'{': { [0/1] {9}
262-
## 13 ¦--expr: [0/1] {16}
263-
## 14 ¦ ¦--expr: [0/1] {12}
264-
## 15 ¦ ¦ °--SYMBOL: x [0/0] {10}
265-
## 16 ¦ ¦--'+': + [0/1] {11}
266-
## 17 ¦ °--expr: [0/0] {14}
267-
## 18 ¦ °--NUM_CONST: 1 [0/0] {13}
268-
## 19 °--'}': } [0/0] {15}
269-
270249
```{r}
271250
pd <- styler:::compute_parse_data_nested(code)
272251
```

0 commit comments

Comments
 (0)