summaryrefslogtreecommitdiff
path: root/prism
AgeCommit message (Collapse)Author
2023-11-28[ruby/prism] Introduce char_is_identifier_utf8Haldun Bayhantopcu
https://github.com/ruby/prism/commit/5f43e57b0f
2023-11-27[ruby/prism] Check void expressions for constant pathsTSUYUSATO Kitsune
Fix https://github.com/ruby/prism/pull/1920 https://github.com/ruby/prism/commit/ee8e03bac7
2023-11-27[ruby/prism] Fix and reuse pm_call_node_index_pTSUYUSATO Kitsune
Fix https://github.com/ruby/prism/pull/1925 Fix https://github.com/ruby/prism/pull/1927 Previously pm_call_node_index_p does not check about a block argument correctly and is not used in parse_write to check an index call node. This commit fixes these problems. https://github.com/ruby/prism/commit/92bab044ff
2023-11-27[ruby/prism] Correct template.rb commentKevin Newton
https://github.com/ruby/prism/commit/4d689fe1df
2023-11-23[ruby/prism] Remove blank lineKevin Newton
https://github.com/ruby/prism/commit/6e5258938a
2023-11-23[ruby/prism] Fix LocalVariableTargetNode depth in patternsTSUYUSATO Kitsune
Fix https://github.com/ruby/prism/pull/1821 https://github.com/ruby/prism/commit/7d023a26b4
2023-11-22[ruby/prism] Check void values in singleton class (`class <<`)TSUYUSATO Kitsune
Follow up the ruby/ruby#8917 change. https://github.com/ruby/prism/commit/f6bac4d3bf
2023-11-22[ruby/prism] Join range checks into the main parse_expression switchKevin Newton
https://github.com/ruby/prism/commit/ed4523464b
2023-11-22[ruby/prism] Fix associativity of binary range with begin-less rangeTSUYUSATO Kitsune
Fix https://github.com/ruby/prism/pull/1828 https://github.com/ruby/prism/commit/22c0640e48
2023-11-22[ruby/prism] Combine expression checks into a single switchKevin Newton
https://github.com/ruby/prism/commit/825d5d7bd4
2023-11-22[ruby/prism] Remove TODOTSUYUSATO Kitsune
https://github.com/ruby/prism/commit/d6d718487d
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-22[ruby/prism] Add and use pm_parser_local_depth_constant_idTSUYUSATO Kitsune
https://github.com/ruby/prism/pull/1877#discussion_r1398974248 https://github.com/ruby/prism/commit/0f545fe636
2023-11-22[ruby/prism] Add `CP949` encodingheyogrady
https://github.com/ruby/prism/commit/9e78dfdf69
2023-11-22[ruby/prism] Add KOI8-U encodingPatrick O'Grady
(https://github.com/ruby/prism/pull/1906) * Add test for KOI8-U * Rename koi8 char_width function - Rename function for use with any KOI8-based encoding * Add KOI8-U encoding * Add encoding to encoding.md https://github.com/ruby/prism/commit/6cad4552f7
2023-11-22[ruby/prism] Move CallNode#name field between receiver and argumentsBenoit Daloze
* The same order as in source code. * CallOrWriteNode, CallOperatorWriteNode, CallAndWriteNode already have the correct order so it was also inconsistent with them. https://github.com/ruby/prism/commit/4434e4bc22
2023-11-21[ruby/prism] Add SPLAT flag on ArrayNode indicating if it contains splat ↵Jemma Issroff
element(s) This commit puts a SPLAT flag on any ArrayNodes which contain SplatNode elements https://github.com/ruby/prism/commit/2fc1e7f181
2023-11-21[PRISM] Rename flag to CONTAINS_KEYWORD_SPLATJemma Issroff
We need to do this change first on ruby/ruby before merging to ruby/prism to avoid breaking ruby/ruby CI
2023-11-21[ruby/prism] Remove handling OptionalNodeField in set_newline_flagHiroya Fujinami
template (https://github.com/ruby/prism/pull/1905) https://github.com/ruby/prism/commit/6f7cbc1ca9
2023-11-21[ruby/prism] Update to v0.18.0Kevin Newton
https://github.com/ruby/prism/commit/1398879d79
2023-11-21[ruby/prism] Fix lex_state_beg_pHaldun Bayhantopcu
(https://github.com/ruby/prism/pull/1591) https://github.com/ruby/prism/commit/46b8576dd0
2023-11-21[ruby/prism] feat: adds encoding for TIS-620Thiago Araujo
(https://github.com/ruby/prism/pull/1901) https://github.com/ruby/prism/commit/2c308e6697
2023-11-21[ruby/prism] Fix `..` and `...` to be non-associativeHiroya Fujinami
(https://github.com/ruby/prism/pull/1837) Fix https://github.com/ruby/prism/pull/1829 https://github.com/ruby/prism/commit/90b0b1974c Co-authored-by: Kevin Newton <kddnewton@gmail.com>
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] Remove string concat in favor of a flat listKevin Newton
Right now when you have a lot of string concats it ends up being difficult to work with because of the depth of the tree. You end up descending very far for every string literal that is part of the concat. There are already times when we use an interpolated string node to group together two string segments that are part of the same string (like when they are interupted by the contents of a heredoc). This commit takes the same approach and replaces string concats with interpolated string nodes. Now that they're a flat list, they should be much easier to work with. There's still some missing information here that would be useful to consumers: whether or not there is _actually_ any interpolation contained in the list. We could remedy this with another node type that is named something like string list, or we could add a flag to interpolated string node indicating that there is interpolation. Either way I want to solve that in a follow-up commit, since this commit is valuable on its own. https://github.com/ruby/prism/commit/1e7ae3ad1b
2023-11-21[ruby/prism] Check a token after targets more strictlyHiroya Fujinami
(https://github.com/ruby/prism/pull/1878) Fix https://github.com/ruby/prism/pull/1832 https://github.com/ruby/prism/commit/060bcc81a8
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-20Rename the big5-hkscs stuff to something more generic and add UAO sharing ↵Ryan Garver
common code. Merge the Big5 extensions into pm_big5.c
2023-11-20[ruby/prism] Fix locations derived from arguments.Haldun Bayhantopcu
(https://github.com/ruby/prism/pull/1897) https://github.com/ruby/prism/commit/00b76ef254
2023-11-20[ruby/prism] Replace match write locals with match write targetsKevin Newton
https://github.com/ruby/prism/commit/eec1862967
2023-11-20[ruby/prism] adds encodings for ibm869Lynne Ashminov
(https://github.com/ruby/prism/pull/1886) https://github.com/ruby/prism/commit/41462400b7
2023-11-20[ruby/prism] Add and test ibm863 encodingMaple Ong
(https://github.com/ruby/prism/pull/1853) * Add and test ibm863 * Remove dup encoding and add alias * Update test/prism/encoding_test.rb Co-authored-by: Kevin Newton <kddnewton@gmail.com> * Readd bitfield table lol --------- https://github.com/ruby/prism/commit/4cd756d7ff Co-authored-by: Kevin Newton <kddnewton@gmail.com>
2023-11-20[ruby/prism] Disallow defining a numbered parameter methodKevin Newton
(https://github.com/ruby/prism/pull/1797) https://github.com/ruby/prism/commit/c13165e6aa
2023-11-20[ruby/prism] feat: Adds macCroatian encodingDavid Wessman
(https://github.com/ruby/prism/pull/1880) * feat: Adds macCroatian encoding - Based on: https://en.wikipedia.org/wiki/Mac_OS_Croatian_encoding https://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/CROATIAN.TXT Co-authored-by: Josefine Rost <nijrost@gmail.com> * Use output from bin/encodings and adds to docs/encoding.md --------- https://github.com/ruby/prism/commit/019a82d8f3 Co-authored-by: Josefine Rost <nijrost@gmail.com>
2023-11-20[ruby/prism] Add character APIs for locationsKevin Newton
(https://github.com/ruby/prism/pull/1809) https://github.com/ruby/prism/commit/d493ccd093
2023-11-20[ruby/prism] Correctly parse the `resuce` modifier in the rhs of theHiroya Fujinami
assignments (https://github.com/ruby/prism/pull/1879) Fix https://github.com/ruby/prism/pull/1541 https://github.com/ruby/prism/commit/9fb276e1f4
2023-11-20[ruby/prism] Remove non-ASCII source charactersKevin Newton
(https://github.com/ruby/prism/pull/1787) https://github.com/ruby/prism/commit/5acc38a2f3
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-20[ruby/prism] feat: add encoding for IBM865Derek Moore
(https://github.com/ruby/prism/pull/1884) * feat: add encoding for IBM865 * style: fix incorrect autoformat https://github.com/ruby/prism/commit/14c6ae0182
2023-11-19[ruby/prism] Don't add an invalid identifier capture to localsHiroya Fujinami
(https://github.com/ruby/prism/pull/1836) * Don't add an invalid identifier capture to locals Fix https://github.com/ruby/prism/pull/1815 * Delay creating a MatchWriteNode https://github.com/ruby/prism/pull/1836#discussion_r1393716600 https://github.com/ruby/prism/commit/635f595a36
2023-11-19[ruby/prism] feat: add encoding for ibm866Syed Faraaz Ahmad
(https://github.com/ruby/prism/pull/1864) Add encoding for ibm866 --------- https://github.com/ruby/prism/commit/1a96cc71f7 Co-authored-by: Kevin Newton <kddnewton@gmail.com>
2023-11-19[ruby/prism] Add GB1988 encodingOrhan Toy
https://github.com/ruby/prism/commit/78d3fa7172
2023-11-19[ruby/prism] Add macCyrillic encodingOrhan Toy
https://github.com/ruby/prism/commit/220b40921a
2023-11-19[ruby/prism] Fix typos in comments and docsMartin Emde
https://github.com/ruby/prism/commit/16b3d19758
2023-11-18[ruby/prism] Big5 HKSCS encodingRyan Garver
https://github.com/ruby/prism/commit/3ca9823eb4
2023-11-18[ruby/prism] Add IBM864 encodingMike Dalton
Fixes https://github.com/ruby/prism/pull/1868 Related #1843 https://github.com/ruby/prism/commit/abc136dfc9
2023-11-18[ruby/prism] Faster lex_keywordHaldun Bayhantopcu
https://github.com/ruby/prism/commit/23a68dcda2
2023-11-18[ruby/prism] Add macCentEuro encodingThomas Marshall
https://github.com/ruby/prism/commit/ff95edbd99
2023-11-18[ruby/prism] Revert "Ensure serialized file is little endian"Kevin Newton
https://github.com/ruby/prism/commit/4cec275fff