-
Notifications
You must be signed in to change notification settings - Fork 0
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
@truthtable
macro docstring broken in REPL
#15
Comments
This is strange, on my PC this error does not occur. |
Are you using OhMyREPL.jl @ErikQQY? |
Yeah, I am using OhMyREPL.jl, Windows11 terminal Julia 1.6.1🤔 |
What version of OhMyREPL.jl are you using? |
Sorry for the late response, I am using OhMyREPL v0.5.12 |
This is weird, I tried running this code on Windows 10 and Ubuntu and it didn't throw an error. |
I have a hunch. Could you run this code for me to check it: julia> using OhMyREPL
julia> using OhMyREPL.Tokenize
julia> Tokenize.Tokens.DOUBLE_ARROW
DOUBLE_ARROW::Kind = 109 |
OK, another test, run this code: julia> using OhMyREPL
julia> using OhMyREPL.Tokenize
julia> Tokenize.Tokens.isoperator(Tokenize.Tokens.DOUBLE_ARROW)
true
julia> Tokenize.Tokens.UNICODE_OPS_REVERSE[Tokenize.Tokens.DOUBLE_ARROW]
:<--> |
That errors: julia> using OhMyREPL
julia> using OhMyREPL.Tokenize
julia> Tokenize.Tokens.isoperator(Tokenize.Tokens.DOUBLE_ARROW)
true
julia> Tokenize.Tokens.UNICODE_OPS_REVERSE[Tokenize.Tokens.DOUBLE_ARROW]
ERROR: KeyError: key Tokenize.Tokens.DOUBLE_ARROW not found
Stacktrace:
[1] getindex(h::Dict{Tokenize.Tokens.Kind, Symbol}, key::Tokenize.Tokens.Kind)
@ Base .\dict.jl:482
[2] top-level scope
@ REPL[4]:1 |
This is the error! julia>] up To update all packages and dependencies. |
Wow!! After I update, the error has gone! Thanks a lot!!!! |
You are welcome! |
This package is pretty useful, I am learning logic, so when I need to see the result, I just use the As for some improvement, I think adding more elaborating error messages would be nice, for example, when I accidentally input the wrong expression, I wish the program can tell me I made a mistake instead of ERROR: MethodError: no method matching TruthTables.TruthTable(::Vector{Vector{Int64}}, ::Vector{Symbol})
Closest candidates are:
...... I think that would also be easier for those new Julia learners. |
Thanks for the suggestion. @truthtable p + q |
Yeah, I think the wrong input like that should have a more elaborated error message:) |
The last release comes with better error messages: julia> using TruthTables
julia> @truthtable p + q
ERROR: LoadError: ArgumentError: Expression with invalid operator.
Stacktrace:
... |
Great works!!😄 |
Hello, this package is really interesting :)
When I was using the
@truthtable
macro and check the docstrings for it:There are some errors:
The text was updated successfully, but these errors were encountered: