summaryrefslogtreecommitdiff
path: root/prism/templates/lib
AgeCommit message (Collapse)Author
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] Fix majority of RBS type mismatchesGopal Patel
https://github.com/ruby/prism/commit/62cc50e41b
2023-12-14Bump prism to version 0.19.0Kevin Newton
2023-12-08[ruby/prism] A couple of small dot enhancementsKevin Newton
https://github.com/ruby/prism/commit/5642a57f39
2023-12-01[ruby/prism] Change numbered parametersKevin Newton
Previously numbered parameters were a field on blocks and lambdas that indicated the maximum number of numbered parameters in either the block or lambda, respectively. However they also had a parameters field that would always be nil in these cases. This changes it so that we introduce a NumberedParametersNode that goes in place of parameters, which has a single uint8_t maximum field on it. That field contains the maximum numbered parameter in either the block or lambda. As a part of the PR, I'm introducing a new UInt8Field type that can be used on nodes, which is just to make it a little more explicit what the maximum values can be (the maximum is actually 9, since it only goes up to _9). Plus we can do a couple of nice things in serialization like just read a single byte. https://github.com/ruby/prism/commit/2d87303903
2023-11-29[ruby/prism] Convert start line to signed integersJean Boussier
Ruby allows for 0 or negative line start, this is often used with `eval` calls to get a correct offset when prefixing a snippet. e.g. ```ruby caller = caller_locations(1, 1).first class_eval <<~RUBY, caller.path, caller.line - 2 # frozen_string_literal: true def some_method #{caller_provided_code_snippet} end RUBY ``` https://github.com/ruby/prism/commit/0d14ed1452
2023-11-29[ruby/prism] Rename varint as varuintJean Boussier
Line numbers may be negative, so we need to introduce signed varint, so renaming unsigned ones first avoid confusion. https://github.com/ruby/prism/commit/90d862361e
2023-11-28[ruby/prism] Move DATA parsing into its own parse result fieldKevin Newton
https://github.com/ruby/prism/commit/42b60b6e95
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-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-18[ruby/prism] Revert "Ensure serialized file is little endian"Kevin Newton
https://github.com/ruby/prism/commit/4cec275fff
2023-11-17[ruby/prism] Ensure serialized file is little endianKevin Newton
https://github.com/ruby/prism/commit/0c762ee68a
2023-11-12[ruby/prism] Add the ability to convert nodes to dotKevin Newton
https://github.com/ruby/prism/commit/3e4b4fb947
2023-11-03Update prism to v0.17.1Kevin Newton
2023-11-03[ruby/prism] Bump to version 0.17.0Kevin Newton
https://github.com/ruby/prism/commit/61a306cd5c
2023-11-03[ruby/prism] Split commentKevin Newton
We were previously holding a type field on Comment to tell what kind of comment it was. Instead, let's just use actual classes for this. https://github.com/ruby/prism/commit/e76830ca6e
2023-11-03[ruby/prism] Wire up options through the Java parserKevin Newton
https://github.com/ruby/prism/commit/13fa262669
2023-11-01[ruby/prism] More Ruby docsKevin Newton
https://github.com/ruby/prism/commit/ca9a660f52
2023-11-01[ruby/prism] Docs for node.rb and parse_result.rbKevin Newton
https://github.com/ruby/prism/commit/085da4feb9
2023-11-01[ruby/prism] Add comments on flagsKevin Newton
https://github.com/ruby/prism/commit/3abd09c803
2023-11-01[ruby/prism] Fix up Ruby docsKevin Newton
https://github.com/ruby/prism/commit/8062849d0d
2023-10-31[ruby/prism] Share comment generation logicKevin Newton
https://github.com/ruby/prism/commit/6e5556dbdf
2023-10-30[prism] Update prism to latestKevin Newton
2023-10-30[ruby/prism] Improve comment generation in templatesUfuk Kayserilioglu
The existing comment generation was hard to read and was making a lot of string manipulation. However, ERB files are already designed to do string manipulation, so we can use that instead. So, instead of doing a split and a map, I opted to use the `#each_line` method to iterate over the lines of the file. Also, in order to add an optional space padding at the beginning of the line, I opted to pad it with a space and to then right trim it. This makes sure that no space is left behind if the line is empty, but a space is added if the line is not empty. https://github.com/ruby/prism/commit/5736711e70
2023-10-27[ruby/prism] Prism.parse_inline_commentsKevin Newton
https://github.com/ruby/prism/commit/5b72f84480
2023-10-26[ruby/prism] Match existing Ruby prettyprintKevin Newton
https://github.com/ruby/prism/commit/6d8358c083
2023-10-26[ruby/prism] Split Prism::Loader#load_node in one lambda per node typeBenoit Daloze
* Otherwise load_node is too big to compile and is forced to run in interpreter: https://github.com/oracle/truffleruby/issues/3293#issuecomment-1759730996 * For the benchmark at https://github.com/oracle/truffleruby/issues/3293#issuecomment-1759790280 TruffleRuby Native 23.1.0: Before: 10.574041 After: 5.592436 JRuby 9.4.3.0: Before: 7.037780 After: 3.995317 JRuby 9.4.3.0 -Xcompile.invokedynamic=true: Before: 7.047832 After: 2.269294 https://github.com/ruby/prism/commit/a592ec346a
2023-10-18[ruby/prism] Bump to version 0.15.1Kevin Newton
https://github.com/ruby/prism/commit/d906a8ceba
2023-10-18[ruby/prism] Bump to version 0.15.0Kevin Newton
https://github.com/ruby/prism/commit/ee429f8d50
2023-10-16[ruby/prism] Attach magic comments to the parse resultKevin Newton
https://github.com/ruby/prism/commit/c7ef25a79a
2023-10-13[ruby/prism] Bump version to 0.14.0Kevin Newton
https://github.com/ruby/prism/commit/1731bf4520
2023-10-13[ruby/prism] Remove now-defunct semantic_field from nodesKevin Newton
https://github.com/ruby/prism/commit/c82a9dad64
2023-10-11[ruby/prism] Add Node::typeKevin Newton
https://github.com/ruby/prism/commit/ca4943e3f9
2023-10-02Sync with prism CallNode#name changesBenoit Daloze
* https://github.com/ruby/prism/pull/1533
2023-09-29[ruby/prism] Bump versionKevin Newton
https://github.com/ruby/prism/commit/3e44415ca2
2023-09-29[ruby/prism] Add a type method for quick comparisonKevin Newton
https://github.com/ruby/prism/commit/0c7d9c3c01
2023-09-27Sync to prism rename commitsKevin Newton
2023-09-27Rename YARP filepaths to prism filepathsKevin Newton