Commit 9404ef7
committed
Extend
Previously, it was only escaping names with a `#` in them, but now it
will escape all names that are illegal identifiers.
Before:
```julia
julia> struct var"a%b+c" x::Int end
julia> println(static_shown(var"a%b+c"))
Main.a%b+c
julia> println(static_shown(var"a%b+c"(1)))
Main.a%b+c(x=1)
```
After:
```julia
julia> struct var"a%b+c" x::Int end
julia> println(static_shown(var"a%b+c"))
Main.var"a%b+c"
julia> println(static_shown(var"a%b+c"(1)))
Main.var"a%b+c"(x=1)
```static_show() escaping to any illegal identifier via var"".1 parent 04bfa32 commit 9404ef7
2 files changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
625 | 625 | | |
626 | 626 | | |
627 | 627 | | |
628 | | - | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
629 | 632 | | |
630 | 633 | | |
631 | 634 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1339 | 1339 | | |
1340 | 1340 | | |
1341 | 1341 | | |
| 1342 | + | |
1342 | 1343 | | |
1343 | 1344 | | |
1344 | 1345 | | |
| |||
1350 | 1351 | | |
1351 | 1352 | | |
1352 | 1353 | | |
| 1354 | + | |
| 1355 | + | |
1353 | 1356 | | |
1354 | 1357 | | |
1355 | 1358 | | |
| |||
0 commit comments