From e1f7e6f023f780fefb9e3f42ea8dbbf7f7bcadd6 Mon Sep 17 00:00:00 2001 From: Kevin Newton Date: Thu, 1 Feb 2024 12:03:02 -0500 Subject: [PATCH 1/3] Update CHANGELOG --- CHANGELOG.md | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c2ba525a2e1..50f9a786d2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,32 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a ## [Unreleased] +## [0.20.0] - 2024-01-01 + +### Added + +- String literal hash keys are now marked as frozen as static literal. +- `IndexTargetNode` now always has the `ATTRIBUTE_WRITE` flag. +- `Call*Node` nodes now have an `IGNORE_VISIBILITY` flag. +- We now support the `it` default parameter. +- Errors and warnings now have levels associated with them. +- Symbols now have correct encoding flags. +- We have now merged `parser-prism` in, which provides translation to the `whitequark/parser` AST. +- We now emit errors for invalid method definition receivers. + +### Changed + +- We now emit errors on invalid pinned local variables. +- When passed scopes, it is now assumed that the innermost scope is the current binding. +- We now provide better error recovery for non terminated heredocs. +- Fix for `RationalNode#value` for non-decimal integers. +- Unary symbols `!@` and `~@` now unescape to `!` and `~`, respectively. +- `frozen_string_literal: false` now works properly. + +### Removed + +- We've removed the `locals_body_index` field. + ## [0.19.0] - 2023-12-14 ### Added @@ -296,7 +322,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a - 🎉 Initial release! 🎉 -[unreleased]: https://github.com/ruby/prism/compare/v0.19.0...HEAD +[unreleased]: https://github.com/ruby/prism/compare/v0.20.0...HEAD +[0.20.0]: https://github.com/ruby/prism/compare/v0.19.0...v0.20.0 [0.19.0]: https://github.com/ruby/prism/compare/v0.18.0...v0.19.0 [0.18.0]: https://github.com/ruby/prism/compare/v0.17.1...v0.18.0 [0.17.1]: https://github.com/ruby/prism/compare/v0.17.0...v0.17.1 From a0de16989e798c82e4f90ba051cf4b7c9826c868 Mon Sep 17 00:00:00 2001 From: Kevin Newton Date: Thu, 1 Feb 2024 12:06:06 -0500 Subject: [PATCH 2/3] Remove the verbose/suppress_warnings option --- CHANGELOG.md | 1 + ext/prism/extension.c | 6 ------ include/prism/options.h | 15 -------------- include/prism/parser.h | 7 ------- java/org/prism/ParsingOptions.java | 12 +---------- javascript/src/parsePrism.js | 5 +---- lib/prism/ffi.rb | 3 --- sig/prism_static.rbs | 32 +++++++++++++++--------------- src/options.c | 9 --------- src/prism.c | 12 ++--------- 10 files changed, 21 insertions(+), 81 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 50f9a786d2b..5afa242152b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a ### Removed - We've removed the `locals_body_index` field. +- We've removed the `verbose` option on the various parse APIs. Warnings are now always emitted with their associated level so that consumers can decide how to handle them. ## [0.19.0] - 2023-12-14 diff --git a/ext/prism/extension.c b/ext/prism/extension.c index 7467aa5709b..e1fcfef20a5 100644 --- a/ext/prism/extension.c +++ b/ext/prism/extension.c @@ -21,7 +21,6 @@ ID rb_option_id_filepath; ID rb_option_id_encoding; ID rb_option_id_line; ID rb_option_id_frozen_string_literal; -ID rb_option_id_verbose; ID rb_option_id_version; ID rb_option_id_scopes; @@ -130,8 +129,6 @@ build_options_i(VALUE key, VALUE value, VALUE argument) { if (!NIL_P(value)) pm_options_line_set(options, NUM2INT(value)); } else if (key_id == rb_option_id_frozen_string_literal) { if (!NIL_P(value)) pm_options_frozen_string_literal_set(options, value == Qtrue); - } else if (key_id == rb_option_id_verbose) { - pm_options_suppress_warnings_set(options, value != Qtrue); } else if (key_id == rb_option_id_version) { if (!NIL_P(value)) { const char *version = check_string(value); @@ -667,8 +664,6 @@ parse_input(pm_string_t *input, const pm_options_t *options) { * integer or nil. Note that this is 1-indexed. * * `frozen_string_literal` - whether or not the frozen string literal pragma * has been set. This should be a boolean or nil. - * * `verbose` - the current level of verbosity. This controls whether or not - * the parser emits warnings. This should be a boolean or nil. * * `version` - the version of prism that should be used to parse Ruby code. By * default prism assumes you want to parse with the latest vesion of * prism (which you can trigger with `nil` or `"latest"`). If you want to @@ -1079,7 +1074,6 @@ Init_prism(void) { rb_option_id_encoding = rb_intern_const("encoding"); rb_option_id_line = rb_intern_const("line"); rb_option_id_frozen_string_literal = rb_intern_const("frozen_string_literal"); - rb_option_id_verbose = rb_intern_const("verbose"); rb_option_id_version = rb_intern_const("version"); rb_option_id_scopes = rb_intern_const("scopes"); diff --git a/include/prism/options.h b/include/prism/options.h index 3e371d66662..e8e96462603 100644 --- a/include/prism/options.h +++ b/include/prism/options.h @@ -78,13 +78,6 @@ typedef struct { /** Whether or not the frozen string literal option has been set. */ bool frozen_string_literal; - - /** - * Whether or not we should suppress warnings. This is purposefully negated - * so that the default is to not suppress warnings, which allows us to still - * create an options struct with zeroed memory. - */ - bool suppress_warnings; } pm_options_t; /** @@ -119,14 +112,6 @@ PRISM_EXPORTED_FUNCTION void pm_options_encoding_set(pm_options_t *options, cons */ PRISM_EXPORTED_FUNCTION void pm_options_frozen_string_literal_set(pm_options_t *options, bool frozen_string_literal); -/** - * Set the suppress warnings option on the given options struct. - * - * @param options The options struct to set the suppress warnings value on. - * @param suppress_warnings The suppress warnings value to set. - */ -PRISM_EXPORTED_FUNCTION void pm_options_suppress_warnings_set(pm_options_t *options, bool suppress_warnings); - /** * Set the version option on the given options struct by parsing the given * string. If the string contains an invalid option, this returns false. diff --git a/include/prism/parser.h b/include/prism/parser.h index 5079c59c5f4..9a7ff53cd1f 100644 --- a/include/prism/parser.h +++ b/include/prism/parser.h @@ -727,13 +727,6 @@ struct pm_parser { * a true value. */ bool frozen_string_literal; - - /** - * Whether or not we should emit warnings. This will be set to false if the - * consumer of the library specified it, usually because they are parsing - * when $VERBOSE is nil. - */ - bool suppress_warnings; }; #endif diff --git a/java/org/prism/ParsingOptions.java b/java/org/prism/ParsingOptions.java index dc411c78052..b0a4ce9c16c 100644 --- a/java/org/prism/ParsingOptions.java +++ b/java/org/prism/ParsingOptions.java @@ -29,12 +29,10 @@ public byte getValue() { * @param line the line within the file that the parser starts on. This value is 1-indexed * @param encoding the name of the encoding that the source file is in * @param frozenStringLiteral whether the frozen string literal option has been set - * @param verbose whether the parser emits warnings * @param version code of Ruby version which syntax will be used to parse * @param scopes scopes surrounding the code that is being parsed with local variable names defined in every scope * ordered from the outermost scope to the innermost one */ - public static byte[] serialize(byte[] filepath, int line, byte[] encoding, boolean frozenStringLiteral, - boolean verbose, SyntaxVersion version, byte[][][] scopes) { + public static byte[] serialize(byte[] filepath, int line, byte[] encoding, boolean frozenStringLiteral, SyntaxVersion version, byte[][][] scopes) { final ByteArrayOutputStream output = new ByteArrayOutputStream(); // filepath @@ -55,14 +53,6 @@ public static byte[] serialize(byte[] filepath, int line, byte[] encoding, boole output.write(0); } - // verbose - boolean suppressWarnings = !verbose; - if (suppressWarnings) { - output.write(1); - } else { - output.write(0); - } - // version output.write(version.getValue()); diff --git a/javascript/src/parsePrism.js b/javascript/src/parsePrism.js index 0200d14522c..7c59aca0d19 100644 --- a/javascript/src/parsePrism.js +++ b/javascript/src/parsePrism.js @@ -67,9 +67,6 @@ function dumpOptions(options) { template.push("C"); values.push(options.frozen_string_literal === undefined ? 0 : 1); - template.push("C"); - values.push(options.verbose === undefined ? 0 : 1); - template.push("C"); if (!options.version || options.version === "latest") { values.push(0); @@ -170,4 +167,4 @@ function pack(values, template) { } return new Uint8Array(buffer); -} \ No newline at end of file +} diff --git a/lib/prism/ffi.rb b/lib/prism/ffi.rb index 43f414504c9..12177450f4f 100644 --- a/lib/prism/ffi.rb +++ b/lib/prism/ffi.rb @@ -311,9 +311,6 @@ def dump_options(options) template << "C" values << (options.fetch(:frozen_string_literal, false) ? 1 : 0) - template << "C" - values << (options.fetch(:verbose, true) ? 0 : 1) - template << "C" values << { nil => 0, "3.3.0" => 1, "latest" => 0 }.fetch(options[:version]) diff --git a/sig/prism_static.rbs b/sig/prism_static.rbs index d94e5dc48d1..308b1eca3d6 100644 --- a/sig/prism_static.rbs +++ b/sig/prism_static.rbs @@ -2,26 +2,26 @@ module Prism BACKEND: :CEXT | :FFI VERSION: String - def self.parse: (String source, ?filepath: String, ?line: Integer, ?encoding: Encoding, ?frozen_string_literal: bool, ?verbose: bool, ?scopes: Array[Array[Symbol]]) -> ParseResult[ProgramNode] - def self.lex: (String source, ?filepath: String, ?line: Integer, ?encoding: Encoding, ?frozen_string_literal: bool, ?verbose: bool, ?scopes: Array[Array[Symbol]]) -> ParseResult[Array[[Token, Integer]]] - def self.parse_lex: (String source, ?filepath: String, ?line: Integer, ?encoding: Encoding, ?frozen_string_literal: bool, ?verbose: bool, ?scopes: Array[Array[Symbol]]) -> ParseResult[[ProgramNode, Array[[Token, Integer]]]] - def self.dump: (String source, ?filepath: String, ?line: Integer, ?encoding: Encoding, ?frozen_string_literal: bool, ?verbose: bool, ?scopes: Array[Array[Symbol]]) -> String - def self.parse_comments: (String source, ?filepath: String, ?line: Integer, ?encoding: Encoding, ?frozen_string_literal: bool, ?verbose: bool, ?scopes: Array[Array[Symbol]]) -> Array[Comment] - def self.parse_success?: (String source, ?filepath: String, ?line: Integer, ?encoding: Encoding, ?frozen_string_literal: bool, ?verbose: bool, ?scopes: Array[Array[Symbol]]) -> bool - def self.parse_failure?: (String source, ?filepath: String, ?line: Integer, ?encoding: Encoding, ?frozen_string_literal: bool, ?verbose: bool, ?scopes: Array[Array[Symbol]]) -> bool - - def self.parse_file: (String filepath, ?line: Integer, ?encoding: Encoding, ?frozen_string_literal: bool, ?verbose: bool, ?scopes: Array[Array[Symbol]]) -> ParseResult[ProgramNode] - def self.lex_file: (String filepath, ?line: Integer, ?encoding: Encoding, ?frozen_string_literal: bool, ?verbose: bool, ?scopes: Array[Array[Symbol]]) -> ParseResult[Array[[Token, Integer]]] - def self.parse_lex_file: (String filepath, ?line: Integer, ?encoding: Encoding, ?frozen_string_literal: bool, ?verbose: bool, ?scopes: Array[Array[Symbol]]) -> ParseResult[[ProgramNode, Array[[Token, Integer]]]] - def self.dump_file: (String filepath, ?line: Integer, ?encoding: Encoding, ?frozen_string_literal: bool, ?verbose: bool, ?scopes: Array[Array[Symbol]]) -> String - def self.parse_file_comments: (String filepath, ?line: Integer, ?encoding: Encoding, ?frozen_string_literal: bool, ?verbose: bool, ?scopes: Array[Array[Symbol]]) -> Array[Comment] - def self.parse_file_failure?: (String filepath, ?line: Integer, ?encoding: Encoding, ?frozen_string_literal: bool, ?verbose: bool, ?scopes: Array[Array[Symbol]]) -> bool - def self.parse_file_success?: (String filepath, ?line: Integer, ?encoding: Encoding, ?frozen_string_literal: bool, ?verbose: bool, ?scopes: Array[Array[Symbol]]) -> bool + def self.parse: (String source, ?filepath: String, ?line: Integer, ?encoding: Encoding, ?frozen_string_literal: bool, ?scopes: Array[Array[Symbol]]) -> ParseResult[ProgramNode] + def self.lex: (String source, ?filepath: String, ?line: Integer, ?encoding: Encoding, ?frozen_string_literal: bool, ?scopes: Array[Array[Symbol]]) -> ParseResult[Array[[Token, Integer]]] + def self.parse_lex: (String source, ?filepath: String, ?line: Integer, ?encoding: Encoding, ?frozen_string_literal: bool, ?scopes: Array[Array[Symbol]]) -> ParseResult[[ProgramNode, Array[[Token, Integer]]]] + def self.dump: (String source, ?filepath: String, ?line: Integer, ?encoding: Encoding, ?frozen_string_literal: bool, ?scopes: Array[Array[Symbol]]) -> String + def self.parse_comments: (String source, ?filepath: String, ?line: Integer, ?encoding: Encoding, ?frozen_string_literal: bool, ?scopes: Array[Array[Symbol]]) -> Array[Comment] + def self.parse_success?: (String source, ?filepath: String, ?line: Integer, ?encoding: Encoding, ?frozen_string_literal: bool, ?scopes: Array[Array[Symbol]]) -> bool + def self.parse_failure?: (String source, ?filepath: String, ?line: Integer, ?encoding: Encoding, ?frozen_string_literal: bool, ?scopes: Array[Array[Symbol]]) -> bool + + def self.parse_file: (String filepath, ?line: Integer, ?encoding: Encoding, ?frozen_string_literal: bool, ?scopes: Array[Array[Symbol]]) -> ParseResult[ProgramNode] + def self.lex_file: (String filepath, ?line: Integer, ?encoding: Encoding, ?frozen_string_literal: bool, ?scopes: Array[Array[Symbol]]) -> ParseResult[Array[[Token, Integer]]] + def self.parse_lex_file: (String filepath, ?line: Integer, ?encoding: Encoding, ?frozen_string_literal: bool, ?scopes: Array[Array[Symbol]]) -> ParseResult[[ProgramNode, Array[[Token, Integer]]]] + def self.dump_file: (String filepath, ?line: Integer, ?encoding: Encoding, ?frozen_string_literal: bool, ?scopes: Array[Array[Symbol]]) -> String + def self.parse_file_comments: (String filepath, ?line: Integer, ?encoding: Encoding, ?frozen_string_literal: bool, ?scopes: Array[Array[Symbol]]) -> Array[Comment] + def self.parse_file_failure?: (String filepath, ?line: Integer, ?encoding: Encoding, ?frozen_string_literal: bool, ?scopes: Array[Array[Symbol]]) -> bool + def self.parse_file_success?: (String filepath, ?line: Integer, ?encoding: Encoding, ?frozen_string_literal: bool, ?scopes: Array[Array[Symbol]]) -> bool def self.load: (String source, String serialized) -> ParseResult[ProgramNode] type ripper_token = [[Integer, Integer], Symbol, String, untyped] - def self.lex_compat: (String source, ?filepath: String, ?line: Integer, ?encoding: Encoding, ?frozen_string_literal: bool, ?verbose: bool, ?scopes: Array[Array[Symbol]]) -> ParseResult[Array[ripper_token]] + def self.lex_compat: (String source, ?filepath: String, ?line: Integer, ?encoding: Encoding, ?frozen_string_literal: bool, ?scopes: Array[Array[Symbol]]) -> ParseResult[Array[ripper_token]] def self.lex_ripper: (String source) -> Array[ripper_token] class ParseResult[T] diff --git a/src/options.c b/src/options.c index 0dcae0d16fc..4187abf9fae 100644 --- a/src/options.c +++ b/src/options.c @@ -32,14 +32,6 @@ pm_options_frozen_string_literal_set(pm_options_t *options, bool frozen_string_l options->frozen_string_literal = frozen_string_literal; } -/** - * Set the suppress warnings option on the given options struct. - */ -PRISM_EXPORTED_FUNCTION void -pm_options_suppress_warnings_set(pm_options_t *options, bool suppress_warnings) { - options->suppress_warnings = suppress_warnings; -} - /** * Set the version option on the given options struct by parsing the given * string. If the string contains an invalid option, this returns false. @@ -189,7 +181,6 @@ pm_options_read(pm_options_t *options, const char *data) { } options->frozen_string_literal = *data++; - options->suppress_warnings = *data++; options->version = (pm_options_version_t) *data++; uint32_t scopes_count = pm_options_read_u32(data); diff --git a/src/prism.c b/src/prism.c index 9cc983ba341..12942704ec0 100644 --- a/src/prism.c +++ b/src/prism.c @@ -553,9 +553,7 @@ pm_parser_err_token(pm_parser_t *parser, const pm_token_t *token, pm_diagnostic_ */ static inline void pm_parser_warn(pm_parser_t *parser, const uint8_t *start, const uint8_t *end, pm_diagnostic_id_t diag_id) { - if (!parser->suppress_warnings) { - pm_diagnostic_list_append(&parser->warning_list, start, end, diag_id); - } + pm_diagnostic_list_append(&parser->warning_list, start, end, diag_id); } /** @@ -17767,8 +17765,7 @@ pm_parser_init(pm_parser_t *parser, const uint8_t *source, size_t size, const pm .in_keyword_arg = false, .current_param_name = 0, .semantic_token_seen = false, - .frozen_string_literal = false, - .suppress_warnings = false + .frozen_string_literal = false }; // Initialize the constant pool. We're going to completely guess as to the @@ -17814,11 +17811,6 @@ pm_parser_init(pm_parser_t *parser, const uint8_t *source, size_t size, const pm parser->frozen_string_literal = true; } - // suppress_warnings option - if (options->suppress_warnings) { - parser->suppress_warnings = true; - } - // version option parser->version = options->version; From fe489c04d69c750f050ccb85a684ff157587b2ea Mon Sep 17 00:00:00 2001 From: Kevin Newton Date: Thu, 1 Feb 2024 12:09:42 -0500 Subject: [PATCH 3/3] Bump versions --- Gemfile.lock | 2 +- ext/prism/extension.h | 2 +- include/prism/version.h | 4 ++-- javascript/package.json | 2 +- prism.gemspec | 2 +- rust/Cargo.lock | 4 ++-- rust/ruby-prism-sys/Cargo.toml | 2 +- rust/ruby-prism-sys/tests/utils_tests.rs | 2 +- rust/ruby-prism/Cargo.toml | 4 ++-- templates/java/org/prism/Loader.java.erb | 2 +- templates/javascript/src/deserialize.js.erb | 2 +- templates/lib/prism/serialize.rb.erb | 2 +- 12 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index e0408e6607e..6e3c64cce75 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - prism (0.19.0) + prism (0.20.0) GEM remote: https://rubygems.org/ diff --git a/ext/prism/extension.h b/ext/prism/extension.h index a21370cfa4b..08baad84b94 100644 --- a/ext/prism/extension.h +++ b/ext/prism/extension.h @@ -1,7 +1,7 @@ #ifndef PRISM_EXT_NODE_H #define PRISM_EXT_NODE_H -#define EXPECTED_PRISM_VERSION "0.19.0" +#define EXPECTED_PRISM_VERSION "0.20.0" #include #include diff --git a/include/prism/version.h b/include/prism/version.h index 1472c58be6f..8292aa424ad 100644 --- a/include/prism/version.h +++ b/include/prism/version.h @@ -14,7 +14,7 @@ /** * The minor version of the Prism library as an int. */ -#define PRISM_VERSION_MINOR 19 +#define PRISM_VERSION_MINOR 20 /** * The patch version of the Prism library as an int. @@ -24,6 +24,6 @@ /** * The version of the Prism library as a constant string. */ -#define PRISM_VERSION "0.19.0" +#define PRISM_VERSION "0.20.0" #endif diff --git a/javascript/package.json b/javascript/package.json index eaef15196b0..0f4c27c3413 100644 --- a/javascript/package.json +++ b/javascript/package.json @@ -1,6 +1,6 @@ { "name": "@ruby/prism", - "version": "0.19.0", + "version": "0.20.0", "description": "Prism Ruby parser", "type": "module", "main": "src/index.js", diff --git a/prism.gemspec b/prism.gemspec index 80d5abcaef0..65cfb74eddc 100644 --- a/prism.gemspec +++ b/prism.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |spec| spec.name = "prism" - spec.version = "0.19.0" + spec.version = "0.20.0" spec.authors = ["Shopify"] spec.email = ["ruby@shopify.com"] diff --git a/rust/Cargo.lock b/rust/Cargo.lock index a2e9eb16c86..42484840b17 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -267,7 +267,7 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "ruby-prism" -version = "0.19.0" +version = "0.20.0" dependencies = [ "ruby-prism-sys", "serde", @@ -276,7 +276,7 @@ dependencies = [ [[package]] name = "ruby-prism-sys" -version = "0.19.0" +version = "0.20.0" dependencies = [ "bindgen", "cc", diff --git a/rust/ruby-prism-sys/Cargo.toml b/rust/ruby-prism-sys/Cargo.toml index b879383b920..90d81ef9815 100644 --- a/rust/ruby-prism-sys/Cargo.toml +++ b/rust/ruby-prism-sys/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ruby-prism-sys" -version = "0.19.0" +version = "0.20.0" edition = "2021" license-file = "../../LICENSE.md" repository = "https://github.com/ruby/prism" diff --git a/rust/ruby-prism-sys/tests/utils_tests.rs b/rust/ruby-prism-sys/tests/utils_tests.rs index 8bd548ff1ff..552e6908049 100644 --- a/rust/ruby-prism-sys/tests/utils_tests.rs +++ b/rust/ruby-prism-sys/tests/utils_tests.rs @@ -12,7 +12,7 @@ fn version_test() { CStr::from_ptr(version) }; - assert_eq!(&cstring.to_string_lossy(), "0.19.0"); + assert_eq!(&cstring.to_string_lossy(), "0.20.0"); } #[test] diff --git a/rust/ruby-prism/Cargo.toml b/rust/ruby-prism/Cargo.toml index 64bb020554c..dfb401d7b7b 100644 --- a/rust/ruby-prism/Cargo.toml +++ b/rust/ruby-prism/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ruby-prism" -version = "0.19.0" +version = "0.20.0" edition = "2021" license-file = "../../LICENSE.md" repository = "https://github.com/ruby/prism" @@ -26,7 +26,7 @@ serde = { version = "1.0", features = ["derive"] } serde_yaml = "0.9" [dependencies] -ruby-prism-sys = { version = "0.19.0", path = "../ruby-prism-sys" } +ruby-prism-sys = { version = "0.20.0", path = "../ruby-prism-sys" } [features] default = ["vendored"] diff --git a/templates/java/org/prism/Loader.java.erb b/templates/java/org/prism/Loader.java.erb index 546d8ea7158..c470a3b9cc6 100644 --- a/templates/java/org/prism/Loader.java.erb +++ b/templates/java/org/prism/Loader.java.erb @@ -98,7 +98,7 @@ public class Loader { expect((byte) 'M', "incorrect prism header"); expect((byte) 0, "prism version does not match"); - expect((byte) 19, "prism version does not match"); + expect((byte) 20, "prism version does not match"); expect((byte) 0, "prism version does not match"); expect((byte) 1, "Loader.java requires no location fields in the serialized output"); diff --git a/templates/javascript/src/deserialize.js.erb b/templates/javascript/src/deserialize.js.erb index acd47a72c03..82782103ca7 100644 --- a/templates/javascript/src/deserialize.js.erb +++ b/templates/javascript/src/deserialize.js.erb @@ -1,7 +1,7 @@ import * as nodes from "./nodes.js"; const MAJOR_VERSION = 0; -const MINOR_VERSION = 19; +const MINOR_VERSION = 20; const PATCH_VERSION = 0; class SerializationBuffer { diff --git a/templates/lib/prism/serialize.rb.erb b/templates/lib/prism/serialize.rb.erb index 62379fa149f..5290df3c632 100644 --- a/templates/lib/prism/serialize.rb.erb +++ b/templates/lib/prism/serialize.rb.erb @@ -20,7 +20,7 @@ module Prism # The minor version of prism that we are expecting to find in the serialized # strings. - MINOR_VERSION = 19 + MINOR_VERSION = 20 # The patch version of prism that we are expecting to find in the serialized # strings.