File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -242,10 +242,31 @@ line breaks and spaces. Let's first create the nested parse table.
242
242
code <- c("add_one <- function(x) { x + 1 }")
243
243
```
244
244
245
- ``` {r}
245
+ ``` r
246
246
styler ::: create_tree(code )
247
247
```
248
248
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
+
249
270
``` {r}
250
271
pd <- styler:::compute_parse_data_nested(code)
251
272
```
You can’t perform that action at this time.
0 commit comments