summaryrefslogtreecommitdiff
path: root/prism/util
AgeCommit message (Collapse)Author
2024-02-23[ruby/prism] Factor in sign to integer comparisonKevin Newton
https://github.com/ruby/prism/commit/377666a5df
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-22[ruby/prism] Regenerate snapshots using integer valuesKevin Newton
2024-02-22[ruby/prism] Add an IntegerField for parsing integer valuesKevin Newton
https://github.com/ruby/prism/commit/120d8c0479
2024-02-22[ruby/prism] Parse numeric valuesKevin Newton
https://github.com/ruby/prism/commit/a6a552411c
2024-02-20[ruby/prism] Include unistd.h before cheching _POSIX_MAPPED_FILESHASUMI Hitoshi
https://github.com/ruby/prism/commit/84b3c294f0
2024-02-20[ruby/prism] Use `_POSIX_MAPPED_FILES` and `_WIN32` to know if memory map ↵HASUMI Hitoshi
interface is available in the target platform https://github.com/ruby/prism/commit/88e2ff52d4
2024-02-17[ruby/prism] Fix up GCC analyzerKevin Newton
https://github.com/ruby/prism/commit/2e8bc17528
2024-02-17[ruby/prism] Provide the ability to dump AST to JSON from CKevin Newton
https://github.com/ruby/prism/commit/d3a149efc5
2024-02-16[ruby/prism] BuiltinsKevin Newton
https://github.com/ruby/prism/commit/851f2571ff
2024-02-14[PRISM] Correctly hook up line numbers for evalKevin Newton
2024-02-14[ruby/prism] Validate multibyte characters in stringsKevin Newton
Check that multibyte characters are valid using pm_strpbrk. We need to add a couple of codepaths to ensure all encodings are covered. Importantly this doesn't check regular expressions, because apparently you're allowed to have invalid multibyte characters inside regular expression comment groups/extended mode. https://github.com/ruby/prism/commit/2857d3e1b5
2024-02-08[PRISM] Compile constant reads using opt_getconstant_pathKevin Newton
2024-02-06[ruby/prism] Implement file parsing error handlingeileencodes
This PR implements proper file parsing error handling. Previously `file_options` would call `pm_string_mapped_init` which would print an error from `perror`. However this wouldn't raise a proper Ruby error so it was just a string output. I've done the following: - Raise an error from `rb_syserr_fail` with the filepath in `file_options`. - No longer return `Qnil` if `file_options` returns false (because now it will raise) - Update `file_options` to return `static void` instead of `static bool`. - Update `file_options` and `profile_file` to check the type so when passing `nil` we see a `TypeError`. - Delete `perror` from `pm_string_mapped_init` - Update `FFI` backend to raise appropriate errors when calling `pm_string_mapped_init`. - Add tests for `dump_file`, `lex_file`, `parse_file`, `parse_file_comments`, `parse_lex_file`, and `parse_file_success?` when a file doesn't exist and for `nil`. - Updates the `bin/parse` script to no longer raise it's own `ArgumentError` now that we raise a proper error. Fixes: ruby/prism#2207 https://github.com/ruby/prism/commit/b2f7494ff5
2024-02-02[ruby/prism] Provide APIs for finding value in constant poolKevin Newton
https://github.com/ruby/prism/commit/be9e2abfa3
2024-01-22[ruby/prism] Return 1-indexed line numbersKevin Newton
https://github.com/ruby/prism/commit/ad17f58729
2024-01-11[ruby/prism] Fix nested default value errorKevin Newton
https://github.com/ruby/prism/commit/ef26b283de
2024-01-11[ruby/prism] Provide ability to format errorsKevin Newton
https://github.com/ruby/prism/commit/27985b0e7e
2024-01-09[ruby/prism] Fix assertion on spanning heredocsKevin Newton
https://github.com/ruby/prism/commit/e190308845
2023-12-06[ruby/prism] Provide flags for changing encodingsKevin Newton
https://github.com/ruby/prism/commit/e838eaff6f
2023-11-30[ruby/prism] Correctly pass around const pm_encoding_t *Kevin Newton
https://github.com/ruby/prism/commit/ce4c67fb3a
2023-11-30[PRISM] Consolidate prism encoding filesKevin Newton
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-03[ruby/prism] Properly support the start line optionKevin Newton
https://github.com/ruby/prism/commit/33cc75a4b7
2023-11-03[ruby/prism] Create an options struct for passing all of the possible optionsKevin Newton
https://github.com/ruby/prism/commit/99e81619de
2023-11-01[ruby/prism] Fix up lintKevin Newton
https://github.com/ruby/prism/commit/77d4056766
2023-11-01[ruby/prism] Last remaining missing C commentsKevin Newton
https://github.com/ruby/prism/commit/e327449db6
2023-11-01[ruby/prism] Documentation for constant poolKevin Newton
https://github.com/ruby/prism/commit/76af64eb21
2023-11-01[ruby/prism] Documentation for pm_strncasecmpKevin Newton
https://github.com/ruby/prism/commit/26934263b7
2023-11-01[ruby/prism] Documentation for more C functionsKevin Newton
https://github.com/ruby/prism/commit/88336e7d9f
2023-11-01[ruby/prism] Documentation for pm_newline_list_tKevin Newton
https://github.com/ruby/prism/commit/97b3cc0af8
2023-11-01[ruby/prism] Documentation for pm_string_tKevin Newton
https://github.com/ruby/prism/commit/ff1d2ec579
2023-11-01[ruby/prism] Even more C documentationKevin Newton
https://github.com/ruby/prism/commit/bec5ca37a0
2023-11-01[ruby/prism] Start better documenting C APIKevin Newton
https://github.com/ruby/prism/commit/2b6e661bbc
2023-10-27[ruby/prism] Use printf attribute and then fix warningsKevin Newton
https://github.com/ruby/prism/commit/3193902c43
2023-10-26[ruby/prism] Match existing Ruby prettyprintKevin Newton
https://github.com/ruby/prism/commit/6d8358c083
2023-10-26[ruby/prism] Get general prettyprint structure workingKevin Newton
https://github.com/ruby/prism/commit/7c9cf63d4c
2023-10-18[ruby/prism] Bump to version 0.15.1Kevin Newton
https://github.com/ruby/prism/commit/d906a8ceba
2023-10-18[ruby/prism] Modify less of the CRuby localsKevin Newton
https://github.com/ruby/prism/commit/aca24b3a17
2023-10-18[ruby/prism] Extract out constant pool bucket bits to constantsKevin Newton
https://github.com/ruby/prism/commit/1985a9ba51
2023-10-18[ruby/prism] Provide "constant" constants, embedded in the codeKevin Newton
https://github.com/ruby/prism/commit/d469a56e7e
2023-10-13[ruby/prism] Handle remaining escape sequences for character literalsKevin Newton
https://github.com/ruby/prism/commit/ba33607034
2023-10-02Sync with prism CallNode#name changesBenoit Daloze
* https://github.com/ruby/prism/pull/1533
2023-09-27[ruby/prism] rearrange the constant pool so IDs can be used for indexingNathan Froyd
https://github.com/ruby/prism/commit/6f243de0c7
2023-09-27[ruby/prism] shrink `yp_constant_t` by 8 bytesNathan Froyd
https://github.com/ruby/prism/commit/5c01eb5e6f
2023-09-27Sync to prism rename commitsKevin Newton
2023-09-27Rename YARP filepaths to prism filepathsKevin Newton