You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
julia> s =String(read("test/files/PProf.jl"))
"module PProf\n\nexport pprof, @pprof\n\nusing Profile\nusing ProtoBuf\nusing OrderedCollections\n\nusing Profile: clear\n\n\"\"\"\n PProf.clear()\n\nAlias for `Profile.clear()`\n\"\"\"\nclear\n\n# Load in `deps.jl`, complaining if it does not exist\nconst depsjl_path = joinpath(@__DIR__, \"..\", \"deps\", \"deps.jl\")\nif !isfile(depsjl_path)\n error(\n\"PProf not installed properly, run Pkg.build(\\\"PProf\\\"), restart Julia and try again\",\n"⋯8539 bytes ⋯"rof -http=\$webhost:\$webport \$file`))\nend\n\n\"\"\"\n pprof_kill()\n\nKills the pprof server if running.\n\"\"\"\nfunction kill()\n if proc[] !== nothing\n Base.kill(proc[])\n proc[] = nothing\n end\nend\n\n\n\"\"\"\n @pprof ex\n\nProfiles the expression using `@profile` and starts or restarts `pprof`.\n\"\"\"\nmacro pprof(ex)\n esc(quote\n\$Profile.@profile \$ex\n\$(@__MODULE__).pprof()\n end)\nend\n\nend # module\n"
julia>using JuliaSyntax
julia> JuliaSyntax.parseall(JuliaSyntax.GreenNode, s)
ERROR: ParseError:# Error @ line 81:64-`data::Vector{UInt}`: The data provided by `Profile.fetch`\[optional\].# └┘ ── invalid escape sequence
Stacktrace:
[1] _parse(rule::Symbol, need_eof::Bool, ::Type{…}, text::String, index::Int64; version::VersionNumber, ignore_trivia::Bool, filename::Nothing, first_line::Int64, ignore_errors::Bool, ignore_warnings::Bool, kws::@Kwargs{})
@ JuliaSyntax ~/.julia/packages/JuliaSyntax/BHOG8/src/parser_api.jl:93
[2] _parse (repeats 2 times)
@ ~/.julia/packages/JuliaSyntax/BHOG8/src/parser_api.jl:77 [inlined]
[3] parseall(::Type{JuliaSyntax.GreenNode}, text::String)
@ JuliaSyntax ~/.julia/packages/JuliaSyntax/BHOG8/src/parser_api.jl:143
[4] top-level scope
@ REPL[19]:1
Some type information was truncated. Use `show(err)` to see complete types.
❯ julia +1.0 -q
julia> """
- `data::Vector{UInt}`: The data provided by `Profile.fetch` \[optional\].
"""
function pprof() end
ERROR: syntax: invalid escape sequence
https://github.com/domluna/JuliaFormatter.jl/blob/master/test/files/PProf.jl
It looks like the issue is markdown formatting. This is an old file so maybe it's formatted incorrectly? This parsed fine with CSTParser.
The text was updated successfully, but these errors were encountered: