summaryrefslogtreecommitdiff
path: root/prism/diagnostic.c
AgeCommit message (Collapse)Author
2024-03-06[ruby/prism] Expose types on diagnosticsKevin Newton
https://github.com/ruby/prism/commit/a735c2262f
2024-03-04[ruby/prism] Warnings for tokens at EOLKevin Newton
https://github.com/ruby/prism/commit/d0dbf01bef
2024-03-04[ruby/prism] Make alloc interface replaceableHASUMI Hitoshi
- Add `x` prefix to malloc, calloc, realloc, and free (eg: malloc -> xmalloc) - By default, they are replaced with stdlib's functions at build - You can use custom functions by defining `PRISM_CUSTOM_ALLOCATOR` macro https://github.com/ruby/prism/commit/7a878af619
2024-02-29[ruby/prism] Warn on integers in flip-flopsKevin Newton
https://github.com/ruby/prism/commit/500099e896
2024-02-23[ruby/prism] Duplicated when clausesKevin Newton
https://github.com/ruby/prism/commit/865b0d5fbe
2024-02-23[ruby/prism] Duplicated hash keysKevin Newton
https://github.com/ruby/prism/commit/3e10c46c14
2024-02-22[ruby/prism] Parse float valuesKevin Newton
https://github.com/ruby/prism/commit/9137226a52
2024-02-21[ruby/prism] Update for Ruby 3.4 errorsKevin Newton
https://github.com/ruby/prism/commit/20fea2cf2b
2024-02-21[ruby/prism] Support ItParametersNodeKevin Newton
So that compilers know they need to add to add an anonymous variable to the local table. https://github.com/ruby/prism/commit/7f1aadd057
2024-02-17[ruby/prism] Fix up GCC analyzerKevin Newton
https://github.com/ruby/prism/commit/2e8bc17528
2024-02-16[ruby/prism] Add warning for assignments to literals in conditionalsHaldun Bayhantopcu
https://github.com/ruby/prism/commit/ee87ed08fb
2024-02-15Temporarily update the error message format in prismYusuke Endoh
2024-02-13[ruby/prism] Convert more error messages to match specsKevin Newton
https://github.com/ruby/prism/commit/7987b7aa20
2024-02-12[ruby/prism] Fix typo in class variable name errorKevin Newton
https://github.com/ruby/prism/commit/5f6c45f6fb
2024-02-12[ruby/prism] Error messages closer to CRubyKevin Newton
https://github.com/ruby/prism/commit/19ffa0b980
2024-02-06[ruby/prism] Better invalid token messagesKevin Newton
https://github.com/ruby/prism/commit/8c9bed2a4d
2024-02-05[ruby/prism] Add another error type for raising argument errorsKevin Newton
https://github.com/ruby/prism/commit/f3030cb2b2
2024-02-01[ruby/prism] Check literals for receiverHaldun Bayhantopcu
https://github.com/ruby/prism/commit/56441b08e7
2024-01-30[ruby/prism] Better error messages for unexpected tokens in prefixKevin Newton
https://github.com/ruby/prism/commit/a35b8e45ee
2024-01-27[ruby/prism] Error follow-upKevin Newton
Split up the diagnostic levels so that error and warning levels aren't mixed. Also fix up deconstruct_keys implementation. https://github.com/ruby/prism/commit/bd3eeb308d Co-authored-by: Benoit Daloze <[email protected]>
2024-01-26[ruby/prism] Add level to warnings and errors to categorize themBenoit Daloze
* Fixes https://github.com/ruby/prism/issues/2082 https://github.com/ruby/prism/commit/7a74576357
2024-01-17[ruby/prism] Parse `it` default parameterTakashi Kokubun
https://github.com/ruby/prism/commit/a0c5361b9f
2024-01-02[ruby/prism] Fix to check multiple block arguments for forwarding argTSUYUSATO Kitsune
Fix https://github.com/ruby/prism/pull/2111 https://github.com/ruby/prism/commit/21ca243d0a
2023-12-25Revert "Revert all of commits after Prism 0.19.0 release"Hiroshi SHIBATA
This reverts commit d242e8416e99eaee4465e2681210ae8b7ecd6d34.
2023-12-16Revert all of commits after Prism 0.19.0 releaseHiroshi SHIBATA
We should bundle released version of Prism for Ruby 3.3.0
2023-12-15[ruby/prism] Invalid pinned locals in pattern matchingKevin Newton
https://github.com/ruby/prism/commit/3a67b37a56
2023-12-15[ruby/prism] Add an error for `in` keyword in argumentsTSUYUSATO Kitsune
Fix https://github.com/ruby/prism/pull/2026 https://github.com/ruby/prism/commit/c4b41cd477
2023-12-14[ruby/prism] Fix hash pattern restKevin Newton
https://github.com/ruby/prism/commit/43c4232cfc
2023-12-10[ruby/prism] fix: escape newlineAlex Koval
https://github.com/ruby/prism/commit/a28b427dcc
2023-12-08[ruby/prism] More closely match CRuby error messagesKevin Newton
https://github.com/ruby/prism/commit/1ed07a0c6d
2023-12-06[ruby/prism] Emit error for constant assignments in defsHaldun Bayhantopcu
https://github.com/ruby/prism/commit/864b06f90e
2023-12-06[ruby/prism] Provide flags for changing encodingsKevin Newton
https://github.com/ruby/prism/commit/e838eaff6f
2023-12-04[ruby/prism] Refactor pm_diagnostic_t and pm_comment_t to use pm_location_tLily Lyons
https://github.com/ruby/prism/commit/115b6a2fc6
2023-11-29[ruby/prism] Reject class/module defs in method params/rescue/ensure/elseTSUYUSATO Kitsune
Fix https://github.com/ruby/prism/pull/1936 https://github.com/ruby/prism/commit/232e77a003
2023-11-28Add in missing errorKevin Newton
2023-11-28[ruby/prism] Use un-capitalized error messagesKevin Newton
I don't prefer this style, but it appears that a plurality of syntax error messages between with un-capitalized messages in CRuby, so we'll go with that for consistency, for now. https://github.com/ruby/prism/commit/b02df68954
2023-11-22[ruby/prism] Reject statements at non-statement posisionsTSUYUSATO Kitsune
Fix https://github.com/ruby/prism/pull/1547 https://github.com/ruby/prism/commit/cdb643aeab
2023-11-21[ruby/prism] Warning for ENDs in methodsHaldun Bayhantopcu
(https://github.com/ruby/prism/pull/1899) https://github.com/ruby/prism/commit/1b41c2d56c
2023-11-21[ruby/prism] Build the ability to format errorsKevin Newton
(https://github.com/ruby/prism/pull/1796) Previously, we only supported error messages that were constant strings. This works for the most part, but there are some times where we want to include some part of the source in the error message to make it better. For example, instead of "Token is reserved" it's better to write "_1 is reserved". To do this, we now support allocating error messages at runtime that are built around format strings. https://github.com/ruby/prism/commit/7e6aa17deb
2023-11-21[ruby/prism] Split up CaseNode and CaseMatchNodeKevin Newton
(https://github.com/ruby/prism/pull/1801) https://github.com/ruby/prism/commit/4c1391ea56
2023-11-20[ruby/prism] Fix parsing `...` in argumentsHiroya Fujinami
(https://github.com/ruby/prism/pull/1882) * Fix parsing `...` in arguments Fix https://github.com/ruby/prism/pull/1830 Fix https://github.com/ruby/prism/pull/1831 * Rename the constant name to PM_ERR_ARGUMENT_FORWARDING_UNBOUND https://github.com/ruby/prism/pull/1882#discussion_r1398461156 https://github.com/ruby/prism/commit/519653aec2
2023-11-14[ruby/prism] Add "Unexpected void value expression" errorTSUYUSATO Kitsune
https://github.com/ruby/prism/commit/88b7b8e1fc
2023-11-01[ruby/prism] Documentation for diagnostics and regexpKevin Newton
https://github.com/ruby/prism/commit/16e0579044
2023-10-18[ruby/prism] Index{Operator,And,Or}WriteNodeKevin Newton
Right now, our Call{Operator,And,Or}WriteNode nodes represent two different concepts: ```ruby foo.bar += 1 foo[bar] += 1 ``` These two statements are different in what they can support. The former can never have arguments (or an opening_loc or closing_loc). The former can also never have a block. Also, the former is a variable method name. The latter is always going to be []/[]=, it can have any number of arguments including blocks (`foo[&bar] ||= 1`), and will always have an opening_loc and closing_loc. Furthermore, these statements end of having to take different paths through the various compilers because with the latter you have to consider the arguments and the block, whereas the former can perform some additional peephole optimizations since there are fewer values on the stack. For these reasons, I'm introducing Index{Operator,And,Or}WriteNode. These nodes never have a read_name or write_name on them because they are always []/[]=. They also support blocks, which the previous write nodes didn't. As a benefit of introducing these nodes, I've removed the opening_loc, closing_loc, and arguments from the older write nodes because they will always be null. For the serialized format, both of these nodes end up being smaller, and for in-memory we're storing fewer things in general, so we have savings all around. I don't love that we are introducing another node that is a call node since we generally want consumers to only have to handle a single call, but these nodes are so specific that they would have to be handled separately anyway since in fact call 2 methods. https://github.com/ruby/prism/commit/70155db9cd
2023-10-16[ruby/prism] Load magic comments in javaKevin Newton
https://github.com/ruby/prism/commit/5d189ce33e
2023-09-28[ruby/prism] Check for a semicolon or a newline after the inheritance operatorHaldun Bayhantopcu
https://github.com/ruby/prism/commit/0326ba6775
2023-09-28[ruby/prism] Fix assertion failure for fwd params after restHaldun Bayhantopcu
https://github.com/ruby/prism/commit/f86bff6dd7
2023-09-27Sync to prism rename commitsKevin Newton
2023-09-27Rename YARP filepaths to prism filepathsKevin Newton