Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
186 commits
Select commit Hold shift + click to select a range
6d49066
Reenable ibm runners
Earlopain Feb 4, 2026
91a47f4
Merge pull request #3904 from Earlopain/reenable-ibm
Earlopain Feb 4, 2026
c49ce84
Update testing guide
Earlopain Feb 4, 2026
2e214f1
Remove `license-file` from rust crates
Earlopain Feb 4, 2026
443e9b9
Rewrite "version: nearest" to require no maintenance
Earlopain Feb 4, 2026
41a65d9
Merge pull request #3906 from Earlopain/version-nearest-less-maintenance
kddnewton Feb 4, 2026
10f09b6
Merge pull request #3905 from Earlopain/rust-license-file
kddnewton Feb 4, 2026
55948fe
Merge pull request #3903 from Earlopain/update-testing-guide
kddnewton Feb 4, 2026
0bd9a7d
Document fewer useless methods/classes (#3908)
Earlopain Feb 6, 2026
94e5525
More docs improvements (#3910)
Earlopain Feb 6, 2026
caf018e
Improve node docs (#3912)
Earlopain Feb 9, 2026
430da84
Remove rdoc coverage workaround (#3913)
Earlopain Feb 9, 2026
1afdc72
Make typechecking work without setting gemfile (#3914)
Earlopain Feb 9, 2026
c642600
Remove explicit rbs dependency (#3915)
Earlopain Feb 9, 2026
8b63780
Remove unneeded exit conditions for `parse_stream`
Earlopain Feb 10, 2026
24e4ae8
Merge pull request #3916 from Earlopain/parse-stream-end-condition
Earlopain Feb 11, 2026
bf8ce56
Remove pack parsing
Earlopain Feb 6, 2026
e01b4b0
Merge pull request #3909 from Earlopain/remove-pack
Earlopain Feb 11, 2026
2ffb629
Run ruby_parser versions for ruby 3.3
Earlopain Feb 12, 2026
677b032
Merge pull request #3919 from Earlopain/ruby-parser-ruby-version
Earlopain Feb 12, 2026
8f35e8e
Fix lexing for unterminated strings/heredocs etc.
Earlopain Feb 11, 2026
0a3b560
Skip missing heredoc end in ripper translator
Earlopain Feb 11, 2026
ed48f6d
Revert "Fix lexing for unterminated strings/heredocs etc."
Earlopain Feb 12, 2026
a964703
Merge pull request #3921 from Earlopain/revert-3918
Earlopain Feb 12, 2026
afff9d2
Reverse-sync https://github.com/ruby/ruby/commit/dca8d9a6aa9c590a5707…
Earlopain Feb 12, 2026
eb29d03
Merge pull request #3923 from Earlopain/reverse-sync-doc-fix
Earlopain Feb 12, 2026
27c24fd
Fix lexing for unterminated strings/heredocs etc.
Earlopain Feb 13, 2026
4dce80f
Reverse-sync `&nil` block handling
Earlopain Feb 16, 2026
8aad248
Only compare &nil syntax on rubies that support it
Earlopain Feb 16, 2026
7c16f77
Merge pull request #3926 from Earlopain/reverse-sync-nil-block
Earlopain Feb 16, 2026
4ee9b1b
Fix C extension docs in ruby/ruby
Earlopain Feb 16, 2026
edd4212
Bump the java-deps group in /java-wasm with 2 updates
dependabot[bot] Feb 16, 2026
80c2e37
Merge pull request #3930 from ruby/dependabot/maven/java-wasm/java-de…
Earlopain Feb 16, 2026
fb88c72
Only accept noblock in Ruby 4.1+
kddnewton Feb 16, 2026
e5fb0e1
Add a test for multiple `&nil` blocks/mixing them
Earlopain Feb 16, 2026
675f9c3
Parser support for no block parameter syntax
kddnewton Feb 16, 2026
02e0dad
rename `pm_newline_list.h`
froydnj Feb 1, 2026
2950474
`fd -e h -e c . |xargs perl -p -i -e s/pm_newline_list.h/pm_line_offs…
froydnj Feb 1, 2026
a55dbf3
fix include guards
froydnj Feb 1, 2026
74ddb89
rename the C type everywhere
froydnj Feb 1, 2026
320bddc
rename the C functions
froydnj Feb 1, 2026
29ca94a
rename struct fields in `pm_parser_t` and `pm_static_literals_metadat…
froydnj Feb 15, 2026
7406704
rename function parameters in `static_literals.c`
froydnj Feb 15, 2026
28d7bc3
rename function parameters and docs
froydnj Feb 15, 2026
702b58a
rename in serialization code
froydnj Feb 15, 2026
6db9037
fixup docs for the list header itself
froydnj Feb 15, 2026
094e28a
fixup docs in `parser.h`
froydnj Feb 15, 2026
e5b0c29
rename `pm_newline_list.c`
froydnj Feb 15, 2026
ffe8f7a
Recompile when config.yml changes
eregon Feb 17, 2026
003ff53
add `extern "C"` wrappers to `prism.h` when using C++
froydnj Feb 18, 2026
6fb4c42
Revert "[DOC] Add code fences" (#3936)
Earlopain Feb 19, 2026
7f57823
Implement noblock for the ripper/ruby_parser translator
Earlopain Feb 19, 2026
4ba7fb6
remove `ruby_memcheck` from version gemfiles
Earlopain Feb 20, 2026
bd0a4e7
Update group and artifact for publishing
headius Jan 21, 2026
e8fd0a4
Add JRuby dependency for building parser API
headius Jan 21, 2026
380b080
Move java_wasm output to src/main/resources
headius Jan 22, 2026
cd5f68a
Add basic bootstrapping instructions
headius Jan 22, 2026
340c6ed
Upgrade to chicory 1.6.1
headius Jan 22, 2026
26d1597
Simplify setup and teardown
headius Jan 25, 2026
a5e7445
Support AOT and interp WASM
headius Jan 26, 2026
4701c7e
Add test that parses JRuby's boot files
headius Jan 26, 2026
7feae0d
Fix the memory leak
andreaTP Jan 27, 2026
fb707f5
rem string free
andreaTP Jan 27, 2026
1d10ae2
Cleanup and improvements
andreaTP Jan 28, 2026
d716178
Update java-wasm to Java 21 minimum
headius Feb 3, 2026
365d3df
Move WASM parser to a JRuby package
headius Feb 3, 2026
80b7402
Rename Java package to org.ruby_lang.prism
headius Feb 4, 2026
16674e5
[rust] add support for accesing the list of line offsets
froydnj Jan 18, 2026
b7e247c
[Feature #19107] Allow trailing comma in method signature
Earlopain Feb 12, 2026
a8a7c6b
Preserve line-continuation only in dedent heredocs
Earlopain Feb 2, 2026
3b3d236
Bump the java-deps group in /java-wasm with 2 updates
dependabot[bot] Feb 23, 2026
1d3db9b
Merge pull request #3942 from ruby/dependabot/maven/java-wasm/java-de…
headius Feb 23, 2026
64e29ba
Fix some locations in the the config
Earlopain Feb 23, 2026
cbe9692
Bump the ruby-deps group across 9 directories with 1 update
dependabot[bot] Feb 23, 2026
a5c3ee3
Introduce xfree_sized and xrealloc_sized
byroot Feb 1, 2026
d895319
Bump dependencies in the main gemfile (#3945)
Earlopain Feb 25, 2026
1fdd4c5
rbs-inline
kddnewton Feb 17, 2026
e371985
Don't document rbs inline magic comment
Earlopain Feb 18, 2026
2c88ed8
Generate RBI from RBS
kddnewton Feb 22, 2026
329e187
Typecheck _Visitor as Visitor
kddnewton Feb 22, 2026
f741032
Handle aliases in RBI generation
kddnewton Feb 22, 2026
0aa2363
Fix error message for block/lambda with `...` argument
Earlopain Feb 27, 2026
20374ce
Fix in handling
kddnewton Mar 2, 2026
6d97e76
feat: add `is_success` and `is_failure` methods for `ParseResult`
sei40kr Jan 29, 2026
4e71dbf
Reject infix operators on command call on writes
kddnewton Mar 2, 2026
b38010c
Require arguments to Source.for
kddnewton Mar 2, 2026
4896994
Bump the action-deps group with 2 updates
dependabot[bot] Mar 2, 2026
c2479ef
Bump the java-deps group in /java-wasm with 3 updates
dependabot[bot] Mar 2, 2026
c5882ce
Bump rbi
dependabot[bot] Mar 2, 2026
6701ffe
Prism::ParseResult#continuable?
kddnewton Mar 2, 2026
0f47e18
Fix up endless method definition with do/end
kddnewton Mar 2, 2026
02c944c
Fix modifier rescue pattern matching
kddnewton Mar 3, 2026
0399342
Revert "Reject infix operators on command call on writes" (#3960)
Earlopain Mar 4, 2026
f5f2219
Add an MCP server for more efficient agents
kddnewton Mar 5, 2026
88cfd26
Arena allocations
kddnewton Mar 5, 2026
de78576
Recompile when prism headers change
eregon Mar 5, 2026
5a33460
Revert "Recompile when config.yml changes"
eregon Mar 5, 2026
d4575f6
Include ext/prism/extconf.rb explicitly in prism.gemspec
eregon Mar 5, 2026
5d80bc5
Correctly handle `and?` and similar on ruby 4.0
Earlopain Mar 5, 2026
b548656
Template out node creation functions
kddnewton Mar 5, 2026
7d17fd2
Fix the handling of `do` on commands
kddnewton Mar 6, 2026
35470bb
Fix precedence of infix operators after command
kddnewton Mar 6, 2026
7d21e56
Fix not without parentheses binding power
kddnewton Mar 6, 2026
17c404f
Add a simple benchmark script to bin/prism
kddnewton Mar 5, 2026
0a3b048
Merge pull request #3970 from ruby/command-call-in
kddnewton Mar 6, 2026
819a796
Merge pull request #3971 from ruby/fix-not
kddnewton Mar 6, 2026
7414a8c
Merge pull request #3965 from ruby/bench
kddnewton Mar 6, 2026
0e7fb6b
Copy and embed for serialization format
kddnewton Mar 7, 2026
94646f5
Fix link to node interface
Earlopain Mar 8, 2026
a1567ec
Merge pull request #3975 from Earlopain/node-interface-link
kddnewton Mar 8, 2026
1b492aa
Update types
kddnewton Mar 8, 2026
ffeb05d
Merge pull request #3972 from ruby/copy-and-embed
kddnewton Mar 8, 2026
2675dc0
Use ByteBuffer#get(int index, byte[] dst) in Loader.java
eregon Mar 8, 2026
697c3f1
Use javac --release to properly check compatibility with older version
eregon Mar 8, 2026
9647023
Compile Java files with compatibility 21+
eregon Mar 8, 2026
c8fd89e
Merge pull request #3977 from eregon/ConstantPool-get-do-not-alter-po…
eregon Mar 9, 2026
c28810f
Refine continuable? with algorithm in C
kddnewton Mar 9, 2026
8cc4eda
Merge pull request #3978 from ruby/continuable
kddnewton Mar 9, 2026
fd0a20f
Fix binding for `in`, `not`, and `do` on/after command calls
kddnewton Mar 10, 2026
0ee68f7
Merge pull request #3980 from ruby/fix-binding
kddnewton Mar 10, 2026
979251e
Fix pinned expression binding power
kddnewton Mar 10, 2026
9e47c83
Merge pull request #3981 from ruby/pinned-expressions
kddnewton Mar 10, 2026
7e797f5
Fix not binding power in endless methods
kddnewton Mar 10, 2026
203a520
Merge pull request #3982 from ruby/fix-not
kddnewton Mar 10, 2026
e08b47e
Make it possible to lazily deserialize DefNode in Loader.java
eregon Mar 10, 2026
0944c7f
Restructure regexp encoding validation
kddnewton Mar 11, 2026
ae5ea48
Merge pull request #3984 from ruby/regex
kddnewton Mar 11, 2026
1d6a966
Fix reading past end of target names
kddnewton Mar 11, 2026
fb8f6fa
Merge pull request #3985 from ruby/fix-overflow
kddnewton Mar 11, 2026
2e58c52
Track newlines in character escape sequences
kddnewton Mar 11, 2026
3bdd792
Improve pm_regexp_classify_property perf
kddnewton Mar 11, 2026
e2f28a6
Merge pull request #3989 from ruby/pm_regexp_classify_property-perf
kddnewton Mar 11, 2026
3c5292a
Merge pull request #3988 from ruby/track-newlines-in-escapes
kddnewton Mar 11, 2026
da37a65
Merge pull request #3983 from eregon/lazy-DefNode
kddnewton Mar 13, 2026
82cb026
Use the flags name for flags fields in JSON
kddnewton Mar 13, 2026
8e79053
Merge pull request #3992 from ruby/reverse-sync
kddnewton Mar 13, 2026
0f1500c
Expose parse options to Rust
kddnewton Mar 13, 2026
d9e359f
Merge pull request #3991 from ruby/expose-options
kddnewton Mar 13, 2026
4258b2a
feat: add `start_line`, `end_line`, `start_column`, `end_column`, and…
sei40kr Mar 4, 2026
a690c9d
Merge pull request #3890 from sei40kr/feat/rust-location-methods
kddnewton Mar 13, 2026
04b986f
feat: add `node_ext` module with `full_name` methods for constant nodes
sei40kr Jan 29, 2026
db57f23
Merge pull request #3887 from sei40kr/feat/rust-node-ext
kddnewton Mar 13, 2026
660b0f7
Bump actions/create-github-app-token in the action-deps group
dependabot[bot] Mar 16, 2026
eceb44d
Merge pull request #3995 from ruby/dependabot/github_actions/action-d…
kddnewton Mar 16, 2026
572f35f
[rust] Expose `start` offsets
reese Mar 16, 2026
fb80fe2
Do not pass source bytes to Loader.java at all
eregon Mar 16, 2026
96edaf3
Mark newlines for lazy DefNodes
eregon Mar 16, 2026
bf8be9b
Use explicit npm dist-tag to allow publishing older versions
k0kubun Mar 16, 2026
aafb1e9
Merge pull request #4004 from k0kubun/fix-npm-publish-tag
kddnewton Mar 17, 2026
787b88c
Merge pull request #3997 from reese/reese-rust-expose-start-offset
kddnewton Mar 17, 2026
dadeb7e
Use an arena for parser metadata
kddnewton Mar 7, 2026
390bdaa
Use the parser arena for the constant pool
kddnewton Mar 7, 2026
1dd9853
Speed up the constant hash function
kddnewton Mar 8, 2026
e0708c4
Small optimization for parser_lex_magic_comment
kddnewton Mar 8, 2026
c1ad25e
Scan forward through inline whitespace to avoid writing to parser->cu…
kddnewton Mar 8, 2026
fb526a8
Fast-paths for ASCII-only identifiers
kddnewton Mar 8, 2026
bfa7692
Avoid unnecessary zero-ing of memory
kddnewton Mar 9, 2026
f94fe6b
Pre-size arena to avoid unnecessary growth
kddnewton Mar 9, 2026
dfdc930
Force the allocation to be inlined
kddnewton Mar 9, 2026
83f54c2
Inline pm_node_list_append, pm_char_is_whitespace, and pm_char_is_inl…
kddnewton Mar 9, 2026
a14431c
Avoid redundant whitespace scanning in magic comment lexing
kddnewton Mar 9, 2026
b5b88ba
Potentially skip whitespace scanning for speed
kddnewton Mar 9, 2026
fbcd3fc
Inline three more functions, and lower the hash threshold for locals
kddnewton Mar 9, 2026
20e626a
Lex simple integer values as we are lexing
kddnewton Mar 10, 2026
2a1dc79
Only dispatch to lex_optional_float_suffix when it is possible
kddnewton Mar 10, 2026
a52c2bd
Optimize constant pool hash for short strings
kddnewton Mar 10, 2026
dcb2e8c
Include string in constant pool entry to avoid chasing pointer
kddnewton Mar 10, 2026
c464b29
SIMD/SWAR for strpbrk
kddnewton Mar 10, 2026
559f24f
Fix a bug where we removed the \r warning
kddnewton Mar 10, 2026
fc0ec4c
Use a bloom filter to quickly reject local lookups
kddnewton Mar 11, 2026
46656b2
Cache strpbrk lookup tables
kddnewton Mar 11, 2026
b2658d2
Fix up rebase errors
kddnewton Mar 17, 2026
5fe0448
More correctly detect SIMD on MSVC
kddnewton Mar 17, 2026
2957868
Add workflow changes from 4.0 branch
Earlopain Mar 17, 2026
f5ae7b7
Ensure allocations to the constant pool are through the arena
kddnewton Mar 17, 2026
7d7870e
Sync changelog
Earlopain Mar 17, 2026
616930e
Merge pull request #3998 from eregon/no-source-bytes-for-java
eregon Mar 17, 2026
1cabef7
Fix ASAN reading off end of strpbrk cache
Earlopain Mar 18, 2026
898241c
Do not use GCC-specific syntax for lookup tables
Earlopain Mar 18, 2026
ec2cf2e
Fix infinite loop in parser_lex_magic_comment
Earlopain Mar 18, 2026
eab6f33
Fix C coverage by moving stuff slightly around
Earlopain Mar 18, 2026
7c1927e
Fix assignments (#4012)
nobu Mar 18, 2026
93542e6
Optimizations (#4006)
Earlopain Mar 18, 2026
b44fbb8
Merge pull request #4008 from Earlopain/sync-4.0-workflows
kddnewton Mar 18, 2026
aa6bce6
Merge pull request #4007 from Earlopain/sync-changelog
kddnewton Mar 18, 2026
a1d2677
Swich identifiers to byte[]
headius Mar 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ test/prism/fixtures/unparser/**/*.txt linguist-vendored
test/prism/fixtures/whitequark/**/*.txt linguist-vendored
test/prism/snapshots/**/*.txt linguist-generated

rbi/generated/**/*.rbi linguist-generated
sig/generated/**/*.rbs linguist-generated

# All .rb files should have LF line ending, even on Windows, regardless of the git config core.autocrlf value.
# All .txt should have their line endings as committed in the repository (there are some intentional CR in there),
# regardless of the git config core.autocrlf value.
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/cpp-bindings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
- "*akefile*"
branches:
- main
- ruby-4.0
pull_request:

jobs:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/cruby-bindings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:
branches:
- main
pull_request:
branches:
- main

jobs:
test-all:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
push:
branches:
- main
- ruby-4.0
pull_request:

jobs:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/java-wasm-bindings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- "*akefile*"
branches:
- main
- ruby-4.0
pull_request:

jobs:
Expand Down Expand Up @@ -38,14 +39,14 @@ jobs:
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '17'
java-version: '21'
cache: maven

- name: Run the tests
run: mvn -B install
working-directory: java-wasm

- uses: actions/upload-artifact@v6
- uses: actions/upload-artifact@v7
with:
name: prism.wasm
path: java-wasm/src/test/resources/prism.wasm
3 changes: 2 additions & 1 deletion .github/workflows/javascript-bindings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- "*akefile*"
branches:
- main
- ruby-4.0
pull_request:

jobs:
Expand All @@ -34,7 +35,7 @@ jobs:
- name: Build the project
run: make wasm WASI_SDK_PATH=$(pwd)/wasi-sdk-25.0-x86_64-linux

- uses: actions/upload-artifact@v6
- uses: actions/upload-artifact@v7
with:
name: prism.wasm
path: javascript/src/prism.wasm
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
push:
branches:
- main
- ruby-4.0
pull_request:

jobs:
Expand Down Expand Up @@ -79,7 +80,7 @@ jobs:
shell: bash

build-ibm:
if: github.repository == 'ruby/prism' && false
if: github.repository == 'ruby/prism'
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -257,7 +258,7 @@ jobs:
bundler-cache: true
- run: bundle config --local frozen false
- run: bundle exec rake build:dev
- uses: actions/upload-artifact@v6
- uses: actions/upload-artifact@v7
with:
name: gem-package
path: pkg
Expand Down Expand Up @@ -308,7 +309,7 @@ jobs:
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.target.ruby }}
- uses: actions/download-artifact@v7
- uses: actions/download-artifact@v8
with:
name: gem-package
path: pkg
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,17 @@ jobs:
- name: Update npm
run: npm install -g npm@latest

- run: npm publish
- name: Determine npm tag
id: npm-tag
run: |
PACKAGE_VERSION=$(node -p "require('./javascript/package.json').version")
LATEST_VERSION=$(npm view @ruby/prism version 2>/dev/null || echo "0.0.0")
if npx semver "$PACKAGE_VERSION" -r ">$LATEST_VERSION"; then
echo "tag=latest" >> "$GITHUB_OUTPUT"
else
MINOR=$(echo "$PACKAGE_VERSION" | cut -d. -f1,2)
echo "tag=stable-$MINOR" >> "$GITHUB_OUTPUT"
fi

- run: npm publish --tag ${{ steps.npm-tag.outputs.tag }}
working-directory: javascript
1 change: 1 addition & 0 deletions .github/workflows/rust-bindings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
- "*akefile*"
branches:
- main
- ruby-4.0
pull_request:

env:
Expand Down
16 changes: 13 additions & 3 deletions .github/workflows/sync-ruby.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: Sync ruby
on:
push:
branches: [main]
branches:
- main
- ruby-4.0
jobs:
sync:
name: Sync ruby
Expand All @@ -10,9 +12,17 @@ jobs:
steps:
- uses: actions/checkout@v6

- name: Set ruby/ruby target branch
id: target
run: |
case "$GITHUB_REF_NAME" in
main) echo "ref=master" >> "$GITHUB_OUTPUT" ;;
ruby-4.0) echo "ref=ruby_4_0" >> "$GITHUB_OUTPUT" ;;
esac

- name: Create GitHub App token
id: app-token
uses: actions/create-github-app-token@v2
uses: actions/create-github-app-token@v3
with:
app-id: 2060836
private-key: ${{ secrets.RUBY_SYNC_DEFAULT_GEMS_PRIVATE_KEY }}
Expand All @@ -26,7 +36,7 @@ jobs:
repo: ruby
workflow_file_name: sync_default_gems.yml
github_token: ${{ steps.app-token.outputs.token }}
ref: master
ref: ${{ steps.target.outputs.ref }}
client_payload: |
{"gem":"${{ github.event.repository.name }}","before":"${{ github.event.before }}","after":"${{ github.event.after }}"}
propagate_failure: true
Expand Down
15 changes: 6 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,17 @@ out.svg
/gemfiles/typecheck/bin/
/include/prism/ast.h
/include/prism/diagnostic.h
/include/prism/node_new.h
/javascript/node_modules/
/javascript/package-lock.json
/javascript/src/deserialize.js
/javascript/src/nodes.js
/javascript/src/visitor.js
/javascript/src/prism.wasm
/javascript/src/*.d.ts
/java/org/prism/AbstractNodeVisitor.java
/java/org/prism/Loader.java
/java/org/prism/Nodes.java
/java/org/ruby_lang/prism/AbstractNodeVisitor.java
/java/org/ruby_lang/prism/Loader.java
/java/org/ruby_lang/prism/Nodes.java
/lib/prism/compiler.rb
/lib/prism/dispatcher.rb
/lib/prism/dot_visitor.rb
Expand All @@ -59,12 +60,6 @@ out.svg
/src/serialize.c
/src/token_type.c
/src/**/*.o
/sig/prism.rbs
/sig/prism/dsl.rbs
/sig/prism/mutation_compiler.rbs
/sig/prism/node.rbs
/sig/prism/visitor.rbs
/sig/prism/_private/dot_visitor.rbs
/rbi/prism/dsl.rbi
/rbi/prism/node.rbi
/rbi/prism/visitor.rbi
Expand All @@ -74,3 +69,5 @@ compile_commands.json
.vscode/

tags

wasi-sdk*
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
- Fixed location of opening tokens when invalid syntax is parsed.
- Fix RBI for parsing options.

## [1.8.1] - 2026-03-16 (Ruby 4.0.2 maintenance release)

### Changed

- Fix `not` binding power in endless methods.
- Correctly handle `and?` and similar on Ruby 4.0.
- Fix error message for block/lambda with `...` argument.
- Fix `in` handling.

## [1.8.0] - 2026-01-12

### Added
Expand Down Expand Up @@ -746,6 +755,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a

[unreleased]: https://github.com/ruby/prism/compare/v1.9.0...HEAD
[1.9.0]: https://github.com/ruby/prism/compare/v1.8.0...v1.9.0
[1.8.1]: https://github.com/ruby/prism/compare/v1.8.0...v1.8.1
[1.8.0]: https://github.com/ruby/prism/compare/v1.7.0...v1.8.0
[1.7.0]: https://github.com/ruby/prism/compare/v1.6.0...v1.7.0
[1.6.0]: https://github.com/ruby/prism/compare/v1.5.2...v1.6.0
Expand Down
1 change: 1 addition & 0 deletions Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ OUTPUT_DIRECTORY = doc
JAVADOC_AUTOBRIEF = YES
OPTIMIZE_OUTPUT_FOR_C = YES
INPUT = src src/util include include/prism include/prism/util
EXCLUDE = include/prism/debug_allocator.h
HTML_OUTPUT = c
SORT_MEMBER_DOCS = NO
GENERATE_LATEX = NO
Expand Down
17 changes: 9 additions & 8 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,25 @@ GEM
benchmark-ips (2.14.0)
date (3.5.1)
date (3.5.1-java)
erb (6.0.1)
erb (6.0.1-java)
erb (6.0.2)
erb (6.0.2-java)
ffi (1.17.3)
io-console (0.8.2)
io-console (0.8.2-java)
irb (1.16.0)
irb (1.17.0)
pp (>= 0.6.0)
prism (>= 1.3.0)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
jar-dependencies (0.5.5)
mini_portile2 (2.8.9)
nokogiri (1.19.0)
nokogiri (1.19.1)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nokogiri (1.19.0-java)
nokogiri (1.19.1-java)
racc (~> 1.4)
onigmo (0.1.0)
parser (3.3.10.0)
parser (3.3.10.2)
ast (~> 2.4.1)
racc
power_assert (3.0.1)
Expand All @@ -45,7 +46,7 @@ GEM
rake (13.3.1)
rake-compiler (1.3.1)
rake
rdoc (7.0.3)
rdoc (7.2.0)
erb
psych (>= 4.0.0)
tsort
Expand All @@ -58,7 +59,7 @@ GEM
sexp_processor (~> 4.16)
sexp_processor (4.17.5)
stringio (3.2.0)
test-unit (3.7.6)
test-unit (3.7.7)
power_assert
tsort (0.2.0)

Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ SOEXT ?= $(shell ruby -e 'puts RbConfig::CONFIG["SOEXT"]')

CPPFLAGS := -Iinclude $(CPPFLAGS)
CFLAGS := -g -O2 -std=c99 -Wall -Werror -Wextra -Wpedantic -Wundef -Wconversion -Wno-missing-braces -fPIC -fvisibility=hidden -Wimplicit-fallthrough $(CFLAGS)
JAVA_WASM_CFLAGS := -g -Oz -std=c99 -Wall -Werror -Wextra -Wpedantic -Wundef -Wconversion -Wno-missing-braces -fPIC -fvisibility=hidden -Wimplicit-fallthrough $(JAVA_WASM_CFLAGS)
JAVA_WASM_CFLAGS := -g0 -O2 -Oz -std=c99 -Wall -Werror -Wextra -Wpedantic -Wundef -Wconversion -Wno-missing-braces -fno-sanitize=all -fno-stack-protector -fPIC -fvisibility=hidden -Wimplicit-fallthrough $(JAVA_WASM_CFLAGS)
CC ?= cc
AR ?= ar
ARFLAGS ?= -r$(V0:1=v)
Expand Down Expand Up @@ -45,14 +45,15 @@ javascript/src/prism.wasm: Makefile $(SOURCES) $(HEADERS)
$(ECHO) "building $@"
$(Q) $(WASI_SDK_PATH)/bin/clang --sysroot=$(WASI_SDK_PATH)/share/wasi-sysroot/ \
$(DEBUG_FLAGS) \
-DPRISM_EXPORT_SYMBOLS -DPRISM_EXCLUDE_PRETTYPRINT -DPRISM_EXCLUDE_JSON -DPRISM_EXCLUDE_PACK \
-DPRISM_EXPORT_SYMBOLS -DPRISM_EXCLUDE_PRETTYPRINT -DPRISM_EXCLUDE_JSON \
-D_WASI_EMULATED_MMAN -lwasi-emulated-mman $(CPPFLAGS) $(CFLAGS) \
-Wl,--export-all -Wl,--gc-sections -Wl,--strip-all -Wl,--lto-O3 -Wl,--no-entry -mexec-model=reactor \
-Oz -g0 -flto -fdata-sections -ffunction-sections \
-o $@ $(SOURCES)

java-wasm/src/test/resources/prism.wasm: Makefile $(SOURCES) $(HEADERS)
$(ECHO) "building $@"
$(Q) $(MAKEDIRS) $(@D)
$(Q) $(WASI_SDK_PATH)/bin/clang $(DEBUG_FLAGS) -DPRISM_EXCLUDE_PRETTYPRINT -DPRISM_EXPORT_SYMBOLS -D_WASI_EMULATED_MMAN -lwasi-emulated-mman $(CPPFLAGS) $(JAVA_WASM_CFLAGS) -Wl,--export-all -Wl,--no-entry -mexec-model=reactor -lc++ -lc++abi -o $@ $(SOURCES)

build/shared/%.o: src/%.c Makefile $(HEADERS)
Expand Down
4 changes: 2 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ elsif RUBY_ENGINE == "jruby"
ext.name = "prism"
ext.ext_dir = "java"
ext.lib_dir = "tmp"
ext.source_version = "1.8"
ext.target_version = "1.8"
ext.release = "21"
ext.gem_spec = Gem::Specification.load("prism.gemspec")
end
end
Expand All @@ -55,6 +54,7 @@ end
CLOBBER.concat(Prism::Template::TEMPLATES)
CLOBBER.concat(["build"])
CLOBBER << "lib/prism/prism.#{RbConfig::CONFIG["DLEXT"]}"
CLOBBER << "java-wasm/src/main/resources/prism.wasm"

Prism::Template::TEMPLATES.each do |filepath|
desc "Generate #{filepath}"
Expand Down
21 changes: 9 additions & 12 deletions Steepfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
# frozen_string_literal: true

target :lib do
check "lib"
signature "sig"

library "cgi" # in lib/prism/dot_visitor.rb (Prism::DotVisitor)

check "lib"
library "cgi"
library "pp"

# TODO: Type-checking these files is still WIP
ignore "lib/prism/desugar_compiler.rb"
ignore "lib/prism/lex_compat.rb"
ignore "lib/prism/serialize.rb"
ignore "lib/prism/ffi.rb"
# Ignored because it requires other libraries.
ignore "lib/prism/translation"

ignore "lib/prism/polyfill/append_as_bytes.rb"
ignore "lib/prism/polyfill/byteindex.rb"
ignore "lib/prism/polyfill/scan_byte.rb"
ignore "lib/prism/polyfill/unpack1.rb"
# Ignored because they are only for older Rubies.
ignore "lib/prism/polyfill"

# Ignored because we do not want to overlap with the C extension.
ignore "lib/prism/ffi.rb"
end
Loading