Skip to content
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

VSCode, OhMyREPL and JuliaSyntax. strange error in REPL #236

Closed
anandijain opened this issue Mar 30, 2023 · 3 comments
Closed

VSCode, OhMyREPL and JuliaSyntax. strange error in REPL #236

anandijain opened this issue Mar 30, 2023 · 3 comments
Labels
bug Something isn't working parser

Comments

@anandijain
Copy link

apologies that I don't have much in the way of help here. i don't really have a reproducer

julia> versioninfo()
Julia Version 1.10.0-DEV.835
Commit 114e675fc26 (2023-03-20 12:49 UTC)
Platform Info:
  OS: macOS (arm64-apple-darwin21.5.0)
  CPU: 8 × Apple M1
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, apple-m1)
  Threads: 8 on 4 virtual cores
Environment:
  JULIA_EDITOR = code
  JULIA_NUM_THREADS = 8
julia> propertynames(@┌ Error: Error in the keymap
│   exception =
│    InexactError: trunc(UInt32, -1)
│    Stacktrace:
│       [1] throw_inexacterror(f::Symbol, #unused#::Type{UInt32}, val::Int64)
│         @ Core ./boot.jl:635
│       [2] checked_trunc_uint
│         @ ./boot.jl:665 [inlined]
│       [3] toUInt32
│         @ ./boot.jl:749 [inlined]
│       [4] UInt32
│         @ ./boot.jl:789 [inlined]
│       [5] convert
│         @ ./number.jl:7 [inlined]
│       [6] ParseStreamPosition
│         @ ~/.julia/packages/JuliaSyntax/EGQXe/src/parse_stream.jl:168 [inlined]
│       [7] fix_macro_name_kind!(ps::JuliaSyntax.ParseState, macro_name_position::JuliaSyntax.ParseStreamPosition, name_kind::Nothing)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:2344
│       [8] fix_macro_name_kind!
│         @ ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:2336 [inlined]
│       [9] parse_call_chain(ps::JuliaSyntax.ParseState, mark::JuliaSyntax.ParseStreamPosition, is_macrocall::Bool)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:1513
│      [10] parse_atom(ps::JuliaSyntax.ParseState, check_identifiers::Bool)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:3539
│      [11] parse_atom
│         @ ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:3391 [inlined]
│      [12] parse_unary_prefix(ps::JuliaSyntax.ParseState)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:1449
│      [13] parse_call(ps::JuliaSyntax.ParseState)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:1410
│      [14] parse_factor(ps::JuliaSyntax.ParseState)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:1358
│      [15] parse_unary(ps::JuliaSyntax.ParseState)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:1175
│      [16] parse_juxtapose(ps::JuliaSyntax.ParseState)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:1122
│      [17] parse_where(ps::JuliaSyntax.ParseState, down::typeof(JuliaSyntax.parse_juxtapose))
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:1080
│      [18] parse_unary_subtype(ps::JuliaSyntax.ParseState)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:1041
│      [19] parse_LtoR(ps::JuliaSyntax.ParseState, down::typeof(JuliaSyntax.parse_unary_subtype), is_op::typeof(JuliaSyntax.is_prec_bitshift))
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:367
│      [20] parse_shift(ps::JuliaSyntax.ParseState)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:1008
│      [21] parse_LtoR(ps::JuliaSyntax.ParseState, down::typeof(JuliaSyntax.parse_shift), is_op::typeof(JuliaSyntax.is_prec_rational))
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:367
│      [22] parse_rational(ps::JuliaSyntax.ParseState)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:1002
│      [23] parse_with_chains(ps::JuliaSyntax.ParseState, down::typeof(JuliaSyntax.parse_rational), is_op::typeof(JuliaSyntax.is_prec_times), chain_ops::Tuple{JuliaSyntax.Kind})
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:956
│      [24] parse_term(ps::JuliaSyntax.ParseState)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:948
│      [25] parse_with_chains(ps::JuliaSyntax.ParseState, down::typeof(JuliaSyntax.parse_term), is_op::typeof(JuliaSyntax.is_prec_plus), chain_ops::Tuple{JuliaSyntax.Kind, JuliaSyntax.Kind})
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:956
│      [26] parse_expr(ps::JuliaSyntax.ParseState)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:941
│      [27] parse_invalid_ops(ps::JuliaSyntax.ParseState)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:926
│      [28] parse_range(ps::JuliaSyntax.ParseState)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:836
│      [29] parse_LtoR(ps::JuliaSyntax.ParseState, down::typeof(JuliaSyntax.parse_range), is_op::typeof(JuliaSyntax.is_prec_pipe_gt))
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:367
│      [30] parse_pipe_gt(ps::JuliaSyntax.ParseState)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:823
│      [31] parse_RtoL(ps::JuliaSyntax.ParseState, down::typeof(JuliaSyntax.parse_pipe_gt), is_op::typeof(JuliaSyntax.is_prec_pipe_lt), self::typeof(JuliaSyntax.parse_pipe_lt))
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:382
│      [32] parse_pipe_lt(ps::JuliaSyntax.ParseState)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:816
│      [33] parse_comparison(ps::JuliaSyntax.ParseState, subtype_comparison::Bool)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:774
│      [34] parse_comparison(ps::JuliaSyntax.ParseState)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:766
│      [35] parse_lazy_cond(ps::JuliaSyntax.ParseState, down::typeof(JuliaSyntax.parse_comparison), is_op::typeof(JuliaSyntax.is_prec_lazy_and), self::typeof(JuliaSyntax.parse_and))
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:731
│      [36] parse_and(ps::JuliaSyntax.ParseState)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:759
│      [37] parse_lazy_cond(ps::JuliaSyntax.ParseState, down::typeof(JuliaSyntax.parse_and), is_op::typeof(JuliaSyntax.is_prec_lazy_or), self::typeof(JuliaSyntax.parse_or))
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:731
│      [38] parse_or(ps::JuliaSyntax.ParseState)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:750
│      [39] parse_arrow(ps::JuliaSyntax.ParseState)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:707
│      [40] parse_cond(ps::JuliaSyntax.ParseState)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:645
│      [41] parse_RtoL(ps::JuliaSyntax.ParseState, down::typeof(JuliaSyntax.parse_cond), is_op::typeof(JuliaSyntax.is_prec_pair), self::typeof(JuliaSyntax.parse_pair))
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:382
│      [42] parse_pair(ps::JuliaSyntax.ParseState)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:636
│      [43] parse_assignment
│         @ ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:574 [inlined]
│      [44] parse_eq_star(ps::JuliaSyntax.ParseState)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:565
│      [45] parse_brackets(after_parse::JuliaSyntax.var"#73#74", ps::JuliaSyntax.ParseState, closing_kind::JuliaSyntax.Kind)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:3132
│      [46] parse_call_arglist
│         @ ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:2663 [inlined]
│      [47] parse_call_chain(ps::JuliaSyntax.ParseState, mark::JuliaSyntax.ParseStreamPosition, is_macrocall::Bool)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:1548
│      [48] parse_call_chain
│         @ ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:1480 [inlined]
│      [49] parse_call(ps::JuliaSyntax.ParseState)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:1411
│      [50] parse_factor(ps::JuliaSyntax.ParseState)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:1358
│      [51] parse_unary(ps::JuliaSyntax.ParseState)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:1175
│      [52] parse_juxtapose(ps::JuliaSyntax.ParseState)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:1122
│      [53] parse_where(ps::JuliaSyntax.ParseState, down::typeof(JuliaSyntax.parse_juxtapose))
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:1080
│      [54] parse_unary_subtype(ps::JuliaSyntax.ParseState)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:1041
│      [55] parse_LtoR(ps::JuliaSyntax.ParseState, down::typeof(JuliaSyntax.parse_unary_subtype), is_op::typeof(JuliaSyntax.is_prec_bitshift))
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:367
│      [56] parse_shift(ps::JuliaSyntax.ParseState)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:1008
│      [57] parse_LtoR(ps::JuliaSyntax.ParseState, down::typeof(JuliaSyntax.parse_shift), is_op::typeof(JuliaSyntax.is_prec_rational))
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:367
│      [58] parse_rational(ps::JuliaSyntax.ParseState)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:1002
│      [59] parse_with_chains(ps::JuliaSyntax.ParseState, down::typeof(JuliaSyntax.parse_rational), is_op::typeof(JuliaSyntax.is_prec_times), chain_ops::Tuple{JuliaSyntax.Kind})
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:956
│      [60] parse_term(ps::JuliaSyntax.ParseState)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:948
│      [61] parse_with_chains(ps::JuliaSyntax.ParseState, down::typeof(JuliaSyntax.parse_term), is_op::typeof(JuliaSyntax.is_prec_plus), chain_ops::Tuple{JuliaSyntax.Kind, JuliaSyntax.Kind})
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:956
│      [62] parse_expr(ps::JuliaSyntax.ParseState)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:941
│      [63] parse_invalid_ops(ps::JuliaSyntax.ParseState)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:926
│      [64] parse_range(ps::JuliaSyntax.ParseState)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:836
│      [65] parse_LtoR(ps::JuliaSyntax.ParseState, down::typeof(JuliaSyntax.parse_range), is_op::typeof(JuliaSyntax.is_prec_pipe_gt))
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:367
│      [66] parse_pipe_gt(ps::JuliaSyntax.ParseState)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:823
│      [67] parse_RtoL(ps::JuliaSyntax.ParseState, down::typeof(JuliaSyntax.parse_pipe_gt), is_op::typeof(JuliaSyntax.is_prec_pipe_lt), self::typeof(JuliaSyntax.parse_pipe_lt))
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:382
│      [68] parse_pipe_lt(ps::JuliaSyntax.ParseState)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:816
│      [69] parse_comparison(ps::JuliaSyntax.ParseState, subtype_comparison::Bool)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:774
│      [70] parse_comparison(ps::JuliaSyntax.ParseState)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:766
│      [71] parse_lazy_cond(ps::JuliaSyntax.ParseState, down::typeof(JuliaSyntax.parse_comparison), is_op::typeof(JuliaSyntax.is_prec_lazy_and), self::typeof(JuliaSyntax.parse_and))
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:731
│      [72] parse_and(ps::JuliaSyntax.ParseState)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:759
│      [73] parse_lazy_cond(ps::JuliaSyntax.ParseState, down::typeof(JuliaSyntax.parse_and), is_op::typeof(JuliaSyntax.is_prec_lazy_or), self::typeof(JuliaSyntax.parse_or))
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:731
│      [74] parse_or(ps::JuliaSyntax.ParseState)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:750
│      [75] parse_arrow(ps::JuliaSyntax.ParseState)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:707
│      [76] parse_cond(ps::JuliaSyntax.ParseState)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:645
│      [77] parse_RtoL(ps::JuliaSyntax.ParseState, down::typeof(JuliaSyntax.parse_cond), is_op::typeof(JuliaSyntax.is_prec_pair), self::typeof(JuliaSyntax.parse_pair))
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:382
│      [78] parse_pair(ps::JuliaSyntax.ParseState)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:636
│      [79] parse_comma(ps::JuliaSyntax.ParseState, do_emit::Bool)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:613
│      [80] parse_comma
│         @ ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:611 [inlined]
│      [81] parse_assignment
│         @ ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:574 [inlined]
│      [82] parse_eq
│         @ ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:551 [inlined]
│      [83] parse_docstring(ps::JuliaSyntax.ParseState, down::typeof(JuliaSyntax.parse_eq))
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:509
│      [84] parse_docstring
│         @ ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:507 [inlined]
│      [85] parse_Nary(ps::JuliaSyntax.ParseState, down::typeof(JuliaSyntax.parse_docstring), delimiters::Tuple{JuliaSyntax.Kind}, closing_tokens::Tuple{JuliaSyntax.Kind})
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:412
│      [86] parse_stmts(ps::JuliaSyntax.ParseState)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:485
│      [87] parse_toplevel(ps::JuliaSyntax.ParseState)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:450
│      [88] #parse!#81
│         @ ~/.julia/packages/JuliaSyntax/EGQXe/src/parser_api.jl:46
│      [89] parse!
│         @ ~/.julia/packages/JuliaSyntax/EGQXe/src/parser_api.jl:43 [inlined]
│      [90] tokenize(text::String)
│         @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser_api.jl:181
│      [91] rewrite_with_ANSI(s::Any, cursormove::Bool)
│         @ OhMyREPL.Prompt ~/.julia/packages/OhMyREPL/zRJyJ/src/repl.jl:67
│      [92] rewrite_with_ANSI
│         @ ~/.julia/packages/OhMyREPL/zRJyJ/src/repl.jl:25 [inlined]
│      [93] refresh_line
│         @ ~/.julia/packages/OhMyREPL/zRJyJ/src/refresh_lines.jl:5 [inlined]
│      [94] edit_backspace(s::REPL.LineEdit.PromptState, align::Bool, adjust::Bool)
│         @ REPL.LineEdit /Applications/Julia-1.10.app/Contents/Resources/julia/share/julia/stdlib/v1.10/REPL/src/LineEdit.jl:889
│      [95] edit_backspace
│         @ /Applications/Julia-1.10.app/Contents/Resources/julia/share/julia/stdlib/v1.10/REPL/src/LineEdit.jl:887 [inlined]
│      [96] edit_backspace(s::REPL.LineEdit.MIState, args::Any)
│         @ REPL.LineEdit /Applications/Julia-1.10.app/Contents/Resources/julia/share/julia/stdlib/v1.10/REPL/src/LineEdit.jl:249
│      [97] (::OhMyREPL.BracketInserter.var"#6#13"{Vector{Char}, Vector{Char}})(s::REPL.LineEdit.MIState, data::LineEditREPL, c::String)
│         @ OhMyREPL.BracketInserter ~/.julia/packages/OhMyREPL/zRJyJ/src/BracketInserter.jl:158
│      [98] #invokelatest#2
│         @ ./essentials.jl:828 [inlined]
│      [99] invokelatest
│         @ ./essentials.jl:825 [inlined]
│     [100] (::REPL.LineEdit.var"#27#28"{OhMyREPL.BracketInserter.var"#6#13"{Vector{Char}, Vector{Char}}, String})(s::Any, p::Any)
│         @ REPL.LineEdit /Applications/Julia-1.10.app/Contents/Resources/julia/share/julia/stdlib/v1.10/REPL/src/LineEdit.jl:1604
│     [101] prompt!(term::REPL.Terminals.TextTerminal, prompt::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
│         @ REPL.LineEdit /Applications/Julia-1.10.app/Contents/Resources/julia/share/julia/stdlib/v1.10/REPL/src/LineEdit.jl:2741
│     [102] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
│         @ REPL.LineEdit /Applications/Julia-1.10.app/Contents/Resources/julia/share/julia/stdlib/v1.10/REPL/src/LineEdit.jl:2643
│     [103] run_frontend(repl::LineEditREPL, backend::REPL.REPLBackendRef)
│         @ REPL /Applications/Julia-1.10.app/Contents/Resources/julia/share/julia/stdlib/v1.10/REPL/src/REPL.jl:1294
└ @ REPL.LineEdit /Applications/Julia-1.10.app/Contents/Resources/julia/share/julia/stdlib/v1.10/REPL/src/LineEdit.jl:2743
@KristofferC
Copy link
Member

tokenize(text::String) should not throw so seems like an issue here. Would be good to know that string though...

@c42f c42f added bug Something isn't working parser labels Mar 31, 2023
@c42f
Copy link
Member

c42f commented Mar 31, 2023

Yep this is/was definitely a bug in the parser, thanks for the report!

It's something to do with validating macro names (surprisingly awkward to do), but it's quite hard to tell without the source string you were typing.

In 0.3.3 there's still a couple of ways to crash things with really weird macro names, but I've just fixed those up in development now with #222 and related changes. For example, the following reproduces something very similar to your stacktrace in 0.3.3, but not in 0.4-dev:

julia> JuliaSyntax.parse(JuliaSyntax.SyntaxNode, "@([x])")
ERROR: InexactError: trunc(UInt32, -1)
Stacktrace:
  [1] throw_inexacterror(f::Symbol, #unused#::Type{UInt32}, val::Int64)
    @ Core ./boot.jl:634
  [2] checked_trunc_uint
    @ ./boot.jl:664 [inlined]
  [3] toUInt32
    @ ./boot.jl:748 [inlined]
  [4] UInt32
    @ ./boot.jl:788 [inlined]
  [5] convert
    @ ./number.jl:7 [inlined]
  [6] ParseStreamPosition
    @ ~/.julia/packages/JuliaSyntax/EGQXe/src/parse_stream.jl:168 [inlined]
  [7] fix_macro_name_kind!(ps::JuliaSyntax.ParseState, macro_name_position::JuliaSyntax.ParseStreamPosition, name_kind::Nothing)
    @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:2344
  [8] fix_macro_name_kind!
    @ ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:2336 [inlined]
  [9] parse_call_chain(ps::JuliaSyntax.ParseState, mark::JuliaSyntax.ParseStreamPosition, is_macrocall::Bool)
    @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:1513
 [10] parse_atom(ps::JuliaSyntax.ParseState, check_identifiers::Bool)
    @ JuliaSyntax ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:3539
 [11] parse_atom
    @ ~/.julia/packages/JuliaSyntax/EGQXe/src/parser.jl:3391 [inlined]
 [12] parse_unary_prefix(ps::JuliaSyntax.ParseState)

So I ... think this is probably fixed already and can be closed. But please do reopen if you find a case which doesn't work on main ❤️

@c42f c42f closed this as completed Mar 31, 2023
@c42f c42f mentioned this issue Mar 31, 2023
9 tasks
@c42f
Copy link
Member

c42f commented Mar 31, 2023

Ok, I just realized this was probably the same or similar to some of the cases covered in #186. Those are generated by fuzz testing tools but turn out to be quite relevant to code fragments OhMyREPL users might have trouble with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working parser
Projects
None yet
Development

No branches or pull requests

3 participants