aboutsummaryrefslogtreecommitdiffstats
path: root/test/prism/errors_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* [ruby/prism] Use un-capitalized error messagesKevin Newton2023-11-281-197/+197
| | | | | | | | 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
* [ruby/prism] Check void expressions for constant pathsTSUYUSATO Kitsune2023-11-271-0/+14
| | | | | | Fix https://github.com/ruby/prism/pull/1920 https://github.com/ruby/prism/commit/ee8e03bac7
* [ruby/prism] Fix and reuse pm_call_node_index_pTSUYUSATO Kitsune2023-11-271-0/+27
| | | | | | | | | | | | 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
* [ruby/prism] Check void values in singleton class (`class <<`)TSUYUSATO Kitsune2023-11-221-0/+3
| | | | | | Follow up the ruby/ruby#8917 change. https://github.com/ruby/prism/commit/f6bac4d3bf
* [ruby/prism] Fix associativity of binary range with begin-less rangeTSUYUSATO Kitsune2023-11-221-0/+15
| | | | | | Fix https://github.com/ruby/prism/pull/1828 https://github.com/ruby/prism/commit/22c0640e48
* [ruby/prism] Reject statements at non-statement posisionsTSUYUSATO Kitsune2023-11-221-0/+48
| | | | | | Fix https://github.com/ruby/prism/pull/1547 https://github.com/ruby/prism/commit/cdb643aeab
* [ruby/prism] Move CallNode#name field between receiver and argumentsBenoit Daloze2023-11-221-12/+12
| | | | | | | | * 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] Fix `..` and `...` to be non-associativeHiroya Fujinami2023-11-211-0/+8
| | | | | | | | | | (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-211-0/+11
| | | | | | (https://github.com/ruby/prism/pull/1899) https://github.com/ruby/prism/commit/1b41c2d56c
* [ruby/prism] Check a token after targets more strictlyHiroya Fujinami2023-11-211-0/+5
| | | | | | | | (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-211-14/+14
| | | | | | | | | | | | | | | | | (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-211-1/+1
| | | | | | (https://github.com/ruby/prism/pull/1801) https://github.com/ruby/prism/commit/4c1391ea56
* [ruby/prism] Disallow defining a numbered parameter methodKevin Newton2023-11-201-0/+7
| | | | | | (https://github.com/ruby/prism/pull/1797) https://github.com/ruby/prism/commit/c13165e6aa
* [ruby/prism] Fix parsing `...` in argumentsHiroya Fujinami2023-11-201-0/+14
| | | | | | | | | | | | | | | (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] Do not allow trailing commas in calls without parenthesisHaldun Bayhantopcu2023-11-171-0/+6
| | | | https://github.com/ruby/prism/commit/f1d56da58f
* Resync prism delete bin/dotKevin Newton2023-11-141-94/+0
|
* [ruby/prism] Check value expressions on creating a nodeTSUYUSATO Kitsune2023-11-141-8/+22
| | | | https://github.com/ruby/prism/commit/d60948bac3
* [ruby/prism] Check value expressions on parsing arguments and assignmentsTSUYUSATO Kitsune2023-11-141-0/+40
| | | | | | They are corresponding to `arg_value` in `parse.y`. https://github.com/ruby/prism/commit/a4a4834e0d
* [ruby/prism] Check value expressions on parsing arguments and assignmentsTSUYUSATO Kitsune2023-11-141-0/+40
| | | | | | They are corresponding to `arg_value` in `parse.y`. https://github.com/ruby/prism/commit/a4a4834e0d
* [ruby/prism] Check value expressions on creating a nodeTSUYUSATO Kitsune2023-11-141-8/+84
| | | | https://github.com/ruby/prism/commit/d60948bac3
* [ruby/prism] Check value expressions on parsing arguments and assignmentsTSUYUSATO Kitsune2023-11-141-0/+73
| | | | | | They are corresponding to `arg_value` in `parse.y`. https://github.com/ruby/prism/commit/a4a4834e0d
* [ruby/prism] Add parse_value_expressionTSUYUSATO Kitsune2023-11-141-0/+72
| | | | https://github.com/ruby/prism/commit/37fad74134
* [ruby/prism] Add tests for error cases on #1791, #1807, and #1810TSUYUSATO Kitsune2023-11-131-0/+33
| | | | https://github.com/ruby/prism/commit/231e965124
* [ruby/prism] Remove extra locals added by ...Kevin Newton2023-11-101-2/+2
| | | | https://github.com/ruby/prism/commit/b7850f2d30
* [ruby/prism] Disallow assigning to numbered parameters in regexpKevin Newton2023-11-011-6/+10
| | | | https://github.com/ruby/prism/commit/ec419422f8
* [ruby/prism] Flip incorrect names of OptionalKeywordParameterNode and ↵Jemma Issroff2023-11-011-5/+5
| | | | | | RequiredKeywordParameterNode https://github.com/ruby/prism/commit/c31f61e898
* [ruby/prism] Split KeywordParameterNode into Optional and RequiredJemma Issroff2023-11-011-5/+5
| | | | | | | | Prior to this commit, KeywordParameterNode included both optional and required keywords. With this commit, it is split in two, with `OptionalKeywordParameterNode`s no longer having a value field. https://github.com/ruby/prism/commit/89084d9af4
* [ruby/prism] Ensure no extra multi-target nodes are created for splatsKevin Newton2023-10-261-1/+1
| | | | https://github.com/ruby/prism/commit/e60240d54b
* [ruby/prism] Add KeywordSplat flag to ArgumentsNodeJemma Issroff2023-10-261-4/+4
| | | | | | | | | Method calls with keyword splat args compile differently than without since they merge the keyword arg hash with the keyword splat hash. We know this information at parse time, so can set a flag which the compiler can use. https://github.com/ruby/prism/commit/e5f8a9a3cd
* [ruby/prism] Add * and & to methods with ...Kevin Newton2023-10-181-4/+4
| | | | https://github.com/ruby/prism/commit/e8114a786a
* [ruby/prism] Fix up PR failingsKevin Newton2023-10-131-1/+1
| | | | https://github.com/ruby/prism/commit/11255f636e
* [ruby/prism] Fix parsing symbols in strings after labelsHaldun Bayhantopcu2023-10-121-0/+14
| | | | https://github.com/ruby/prism/commit/e16531650d
* [ruby/prism] Emit error when assigning to a numbered parameterHaldun Bayhantopcu2023-10-061-0/+15
| | | | https://github.com/ruby/prism/commit/66248ac2f6
* [ruby/prism] Check for duplicate parameter names in destructured paramsHaldun Bayhantopcu2023-10-051-0/+9
| | | | https://github.com/ruby/prism/commit/c3438aabea
* [ruby/prism] Check for duplicate names in shadow argsHaldun Bayhantopcu2023-10-051-0/+7
| | | | https://github.com/ruby/prism/commit/e100c6b8ae
* [ruby/prism] Fix parsing shadow args in lambda blocksHaldun Bayhantopcu2023-10-051-0/+10
| | | | https://github.com/ruby/prism/commit/53efaf252d
* Sync with prism CallNode#name changesBenoit Daloze2023-10-021-7/+7
| | | | * https://github.com/ruby/prism/pull/1533
* [ruby/prism] Check whether the predicate is closed for conditionalsHaldun Bayhantopcu2023-09-281-2/+3
| | | | https://github.com/ruby/prism/commit/bf43006d0a
* [ruby/prism] Check for a semicolon or a newline after the inheritance operatorHaldun Bayhantopcu2023-09-281-0/+7
| | | | https://github.com/ruby/prism/commit/0326ba6775
* [ruby/prism] Fix assertion failure for fwd params after restHaldun Bayhantopcu2023-09-281-0/+7
| | | | https://github.com/ruby/prism/commit/f86bff6dd7
* Sync to prism rename commitsKevin Newton2023-09-271-5/+5
|
* Rename YARP filepaths to prism filepathsKevin Newton2023-09-271-0/+1374