-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial stage of JuliaSyntax #848
base: master
Are you sure you want to change the base?
Conversation
s.on && write(io, repeat(" ", max(nodes[i+1].indent, 0))) | ||
s.line_offset = nodes[i+1].indent | ||
elseif !skip_indent(nodes[i+1]) | ||
write(io, ws) | ||
s.on && write(io, ws) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was a bug but I'm not sure it ever was an issue.
src/print.jl
Outdated
if l1 <= nlines && output[end] == '\n' | ||
output = output[1:prevind(output, end)] | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NotCode nodes will add newlines so we need to remove these for now
# using PrecompileTools | ||
# @setup_workload begin | ||
# dir = joinpath(@__DIR__,"..", "..") | ||
# str = raw""" | ||
# @noinline require_complete(m::Matching) = | ||
# m.inv_match === nothing && throw(ArgumentError("Backwards matching not defined. `complete` the matching first.")) | ||
# """ | ||
# @compile_workload begin | ||
# format(dir) | ||
# for style = [DefaultStyle(), BlueStyle(), SciMLStyle(), YASStyle(), MinimalStyle()] | ||
# format_text(str, style) | ||
# end | ||
# end | ||
# end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
disabled until this works
# -1 signifies everything afterwards "#! format: off" | ||
# will not formatted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this comment is no longer applicable
Initial stage for integrating JuliaSyntax. In this part I want to generate the Document using JuliaSyntax instead of the Tokenize package.
Current improvements:
I might actually just remove CSTParser completely since that might be easier but we'll see