aboutsummaryrefslogtreecommitdiffstats
path: root/prism
Commit message (Collapse)AuthorAgeFilesLines
* [ruby/prism] Remove blank lineKevin Newton2023-11-231-1/+0
| | | | https://github.com/ruby/prism/commit/6e5258938a
* [ruby/prism] Fix LocalVariableTargetNode depth in patternsTSUYUSATO Kitsune2023-11-231-4/+29
| | | | | | Fix https://github.com/ruby/prism/pull/1821 https://github.com/ruby/prism/commit/7d023a26b4
* [ruby/prism] Check void values in singleton class (`class <<`)TSUYUSATO Kitsune2023-11-221-1/+1
| | | | | | Follow up the ruby/ruby#8917 change. https://github.com/ruby/prism/commit/f6bac4d3bf
* [ruby/prism] Join range checks into the main parse_expression switchKevin Newton2023-11-221-9/+10
| | | | https://github.com/ruby/prism/commit/ed4523464b
* [ruby/prism] Fix associativity of binary range with begin-less rangeTSUYUSATO Kitsune2023-11-221-1/+12
| | | | | | Fix https://github.com/ruby/prism/pull/1828 https://github.com/ruby/prism/commit/22c0640e48
* [ruby/prism] Combine expression checks into a single switchKevin Newton2023-11-221-16/+19
| | | | https://github.com/ruby/prism/commit/825d5d7bd4
* [ruby/prism] Remove TODOTSUYUSATO Kitsune2023-11-221-4/+1
| | | | https://github.com/ruby/prism/commit/d6d718487d
* [ruby/prism] Reject statements at non-statement posisionsTSUYUSATO Kitsune2023-11-223-0/+37
| | | | | | Fix https://github.com/ruby/prism/pull/1547 https://github.com/ruby/prism/commit/cdb643aeab
* [ruby/prism] Add and use pm_parser_local_depth_constant_idTSUYUSATO Kitsune2023-11-221-2/+8
| | | | | | https://github.com/ruby/prism/pull/1877#discussion_r1398974248 https://github.com/ruby/prism/commit/0f545fe636
* [ruby/prism] Add `CP949` encodingheyogrady2023-11-223-0/+59
| | | | https://github.com/ruby/prism/commit/9e78dfdf69
* [ruby/prism] Add KOI8-U encodingPatrick O'Grady2023-11-223-2/+39
| | | | | | | | | | | | | | | | (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
* [ruby/prism] Move CallNode#name field between receiver and argumentsBenoit Daloze2023-11-221-2/+2
| | | | | | | | * 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
* [ruby/prism] Add SPLAT flag on ArrayNode indicating if it contains splat ↵Jemma Issroff2023-11-212-0/+12
| | | | | | | | | element(s) This commit puts a SPLAT flag on any ArrayNodes which contain SplatNode elements https://github.com/ruby/prism/commit/2fc1e7f181
* [PRISM] Rename flag to CONTAINS_KEYWORD_SPLATJemma Issroff2023-11-212-3/+3
| | | | | We need to do this change first on ruby/ruby before merging to ruby/prism to avoid breaking ruby/ruby CI
* [ruby/prism] Remove handling OptionalNodeField in set_newline_flagHiroya Fujinami2023-11-211-1/+1
| | | | | | | template (https://github.com/ruby/prism/pull/1905) https://github.com/ruby/prism/commit/6f7cbc1ca9
* [ruby/prism] Update to v0.18.0Kevin Newton2023-11-213-6/+6
| | | | https://github.com/ruby/prism/commit/1398879d79
* [ruby/prism] Fix lex_state_beg_pHaldun Bayhantopcu2023-11-211-1/+1
| | | | | | (https://github.com/ruby/prism/pull/1591) https://github.com/ruby/prism/commit/46b8576dd0
* [ruby/prism] feat: adds encoding for TIS-620Thiago Araujo2023-11-213-0/+39
| | | | | | (https://github.com/ruby/prism/pull/1901) https://github.com/ruby/prism/commit/2c308e6697
* [ruby/prism] Fix `..` and `...` to be non-associativeHiroya Fujinami2023-11-211-6/+4
| | | | | | | | | | (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>
* [ruby/prism] Warning for ENDs in methodsHaldun Bayhantopcu2023-11-213-0/+6
| | | | | | (https://github.com/ruby/prism/pull/1899) https://github.com/ruby/prism/commit/1b41c2d56c
* [ruby/prism] Remove string concat in favor of a flat listKevin Newton2023-11-212-46/+21
| | | | | | | | | | | | | | | | | | | | | | | | 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
* [ruby/prism] Check a token after targets more strictlyHiroya Fujinami2023-11-211-2/+8
| | | | | | | | (https://github.com/ruby/prism/pull/1878) Fix https://github.com/ruby/prism/pull/1832 https://github.com/ruby/prism/commit/060bcc81a8
* [ruby/prism] Build the ability to format errorsKevin Newton2023-11-213-12/+101
| | | | | | | | | | | | | | | | | (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
* [ruby/prism] Split up CaseNode and CaseMatchNodeKevin Newton2023-11-214-14/+119
| | | | | | (https://github.com/ruby/prism/pull/1801) https://github.com/ruby/prism/commit/4c1391ea56
* Rename the big5-hkscs stuff to something more generic and add UAO sharing ↵Ryan Garver2023-11-204-54/+65
| | | | | | common code. Merge the Big5 extensions into pm_big5.c
* [ruby/prism] Fix locations derived from arguments.Haldun Bayhantopcu2023-11-201-36/+30
| | | | | | (https://github.com/ruby/prism/pull/1897) https://github.com/ruby/prism/commit/00b76ef254
* [ruby/prism] Replace match write locals with match write targetsKevin Newton2023-11-202-36/+77
| | | | https://github.com/ruby/prism/commit/eec1862967
* [ruby/prism] adds encodings for ibm869Lynne Ashminov2023-11-203-0/+38
| | | | | | (https://github.com/ruby/prism/pull/1886) https://github.com/ruby/prism/commit/41462400b7
* [ruby/prism] Add and test ibm863 encodingMaple Ong2023-11-203-0/+38
| | | | | | | | | | | | | | | | | | | | (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>
* [ruby/prism] Disallow defining a numbered parameter methodKevin Newton2023-11-201-47/+45
| | | | | | (https://github.com/ruby/prism/pull/1797) https://github.com/ruby/prism/commit/c13165e6aa
* [ruby/prism] feat: Adds macCroatian encodingDavid Wessman2023-11-203-0/+37
| | | | | | | | | | | | | | | | | | | | (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>
* [ruby/prism] Add character APIs for locationsKevin Newton2023-11-201-10/+4
| | | | | | (https://github.com/ruby/prism/pull/1809) https://github.com/ruby/prism/commit/d493ccd093
* [ruby/prism] Correctly parse the `resuce` modifier in the rhs of theHiroya Fujinami2023-11-201-37/+60
| | | | | | | | | assignments (https://github.com/ruby/prism/pull/1879) Fix https://github.com/ruby/prism/pull/1541 https://github.com/ruby/prism/commit/9fb276e1f4
* [ruby/prism] Remove non-ASCII source charactersKevin Newton2023-11-202-12/+21
| | | | | | (https://github.com/ruby/prism/pull/1787) https://github.com/ruby/prism/commit/5acc38a2f3
* [ruby/prism] Fix parsing `...` in argumentsHiroya Fujinami2023-11-203-0/+15
| | | | | | | | | | | | | | | (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
* [ruby/prism] feat: add encoding for IBM865Derek Moore2023-11-203-0/+38
| | | | | | | | | | (https://github.com/ruby/prism/pull/1884) * feat: add encoding for IBM865 * style: fix incorrect autoformat https://github.com/ruby/prism/commit/14c6ae0182
* [ruby/prism] Don't add an invalid identifier capture to localsHiroya Fujinami2023-11-191-2/+39
| | | | | | | | | | | | | | (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
* [ruby/prism] feat: add encoding for ibm866Syed Faraaz Ahmad2023-11-193-0/+38
| | | | | | | | | | | | (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>
* [ruby/prism] Add GB1988 encodingOrhan Toy2023-11-193-0/+37
| | | | https://github.com/ruby/prism/commit/78d3fa7172
* [ruby/prism] Add macCyrillic encodingOrhan Toy2023-11-193-0/+37
| | | | https://github.com/ruby/prism/commit/220b40921a
* [ruby/prism] Fix typos in comments and docsMartin Emde2023-11-191-1/+1
| | | | https://github.com/ruby/prism/commit/16b3d19758
* [ruby/prism] Big5 HKSCS encodingRyan Garver2023-11-183-0/+56
| | | | https://github.com/ruby/prism/commit/3ca9823eb4
* [ruby/prism] Add IBM864 encodingMike Dalton2023-11-183-0/+38
| | | | | | | Fixes https://github.com/ruby/prism/pull/1868 Related #1843 https://github.com/ruby/prism/commit/abc136dfc9
* [ruby/prism] Faster lex_keywordHaldun Bayhantopcu2023-11-181-47/+50
| | | | https://github.com/ruby/prism/commit/23a68dcda2
* [ruby/prism] Add macCentEuro encodingThomas Marshall2023-11-183-0/+37
| | | | https://github.com/ruby/prism/commit/ff95edbd99
* [ruby/prism] Revert "Ensure serialized file is little endian"Kevin Newton2023-11-183-34/+9
| | | | https://github.com/ruby/prism/commit/4cec275fff
* [ruby/prism] Ensure serialized file is little endianKevin Newton2023-11-173-9/+34
| | | | https://github.com/ruby/prism/commit/0c762ee68a
* [ruby/prism] Silence clang analyzer warnings for the memory leaksHaldun Bayhantopcu2023-11-171-0/+5
| | | | https://github.com/ruby/prism/commit/68112c556e
* [ruby/prism] add Windows-874 encodingPeter Cai2023-11-173-0/+38
| | | | https://github.com/ruby/prism/commit/0670dd3b9a
* [ruby/prism] Add macThaiHaldun Bayhantopcu2023-11-173-0/+37
| | | | https://github.com/ruby/prism/commit/f654058f50