37 Commits
Author SHA1 Message Date
Kevin Newton 2564ebb3c9 [ruby/prism] Expose pm_node_list_append and pm_parser_constant_insert
https://github.com/ruby/prism/commit/4896c9f025
2026-10-20 20:14:48 +00:00
Kevin Newton 3357fecc4b [ruby/prism] Expand visit function to return an enum
When visiting, sometimes you want to stop the whole walk, not just
stop at a certain level. For example when you find a particular node.

https://github.com/ruby/prism/commit/8dccefe1cc
2026-10-20 12:09:38 -04:00
Kevin Newton 6bb22453e7 [ruby/prism] Better C++ hygiene
Make all public prism headers check for C++ so that consumers do
not have to wrap includes in extern "C".

https://github.com/ruby/prism/commit/a7071e9939
2026-10-20 03:12:57 +00:00
Kevin Newton 7e0c76d619 [ruby/prism] Clean up documentation
https://github.com/ruby/prism/commit/94d16c61cf
2026-03-20 09:37:43 -04:00
Kevin Newton a13f493852 [ruby/prism] Documentation on public API functions
https://github.com/ruby/prism/commit/7dde210447
2026-03-20 09:37:43 -04:00
Kevin Newton 57683314ff [ruby/prism] Cleanup
https://github.com/ruby/prism/commit/aa84fd5f53
2026-03-20 09:37:43 -04:00
Kevin Newton 3308fb6274 [ruby/prism] Move some of arena internal
https://github.com/ruby/prism/commit/639da14de5
2026-03-20 09:37:43 -04:00
Kevin Newton 28e5edb00d [ruby/prism] Move node list append internal
https://github.com/ruby/prism/commit/2867c529a3
2026-03-20 09:37:43 -04:00
Kevin Newton 44140d275b [ruby/prism] Give full lifetime functions to parser
https://github.com/ruby/prism/commit/d3153258af
2026-03-20 09:37:43 -04:00
Kevin Newton ca5ac3eb4d [ruby/prism] Make options fully opaque
https://github.com/ruby/prism/commit/0167645490
2026-03-20 09:37:43 -04:00
Kevin Newton f68f90d1fb [ruby/prism] pm_parser_free -> pm_parser_cleanup
https://github.com/ruby/prism/commit/b1be4b451d
2026-03-20 09:37:43 -04:00
Kevin Newton 6740603ad8 [ruby/prism] Split node.h headers
https://github.com/ruby/prism/commit/a4a44cb14a
2026-03-20 09:37:43 -04:00
Kevin Newton 807daae8f9 [ruby/prism] Move file system into compiler headers
https://github.com/ruby/prism/commit/323f7f16f8
2026-03-20 09:37:43 -04:00
Kevin Newton 75bfc14a8f [ruby/prism] Move compiler detection stuff into include/prism/compiler
https://github.com/ruby/prism/commit/01d575aa2f
2026-03-20 09:37:43 -04:00
Kevin Newton 8972731f25 [ruby/prism] Trim down node.h
https://github.com/ruby/prism/commit/76904582b1
2026-03-20 09:37:43 -04:00
Kevin Newton c1f0acda00 [ruby/prism] Split up buffer headers between internal and external
https://github.com/ruby/prism/commit/bda0f889b5
2026-03-20 09:37:43 -04:00
Kevin Newton c46d2168b6 [ruby/prism] Move buffer out of utils
https://github.com/ruby/prism/commit/429672ea58
2026-03-20 09:37:43 -04:00
Kevin Newton a91ae84b44 [ruby/prism] Inline pm_node_list_append, pm_char_is_whitespace, and pm_char_is_inline_whitespace
https://github.com/ruby/prism/commit/83f54c2dc2
2026-03-17 11:14:11 -04:00
Kevin Newton 45250a4169 [PRISM] Use arena allocator for nodes 2026-03-05 11:49:50 -05:00
Kevin Newton b04c959621 [ruby/prism] Remove various unused memsize infra
https://github.com/ruby/prism/commit/283938ed1f
2024-05-24 17:19:34 +00:00
Kevin Newton a64f1ab688 [ruby/prism] Fix up pm_node_list_grow
https://github.com/ruby/prism/commit/7784365d3f
2024-04-03 17:34:12 -04:00
Kevin Newton be48b733b6 [ruby/prism] Pass block exits up the tree
https://github.com/ruby/prism/commit/168f72b9fe
2024-04-03 17:34:12 -04:00
Kevin Newton 1fb11824f3 [ruby/prism] Introduce PM_NODE_LIST_FOREACH to make it easier to iterate over node lists
https://github.com/ruby/prism/commit/5d4da7c69c
2024-04-03 17:34:12 -04:00
Kevin Newton 50e9a6b7c5 [ruby/prism] Provide API for visiting in C
https://github.com/ruby/prism/commit/537947aa5c
2024-03-04 20:24:20 +00:00
Kevin Newton 3ca8b4aee0 [ruby/prism] Support -p, -n, -a, and -l command line options
https://github.com/ruby/prism/commit/959eb506ca
2024-02-27 04:22:39 +00:00
Kevin Newton d1ce989829 [ruby/prism] Duplicated hash keys
https://github.com/ruby/prism/commit/3e10c46c14
2024-02-23 13:25:31 -05:00
Kevin Newton b56b8ec797 [ruby/prism] Provide the ability to dump AST to JSON from C
https://github.com/ruby/prism/commit/d3a149efc5
2024-02-17 02:05:12 +00:00
Kevin Newton 690f3bbf5d [ruby/prism] Last remaining missing C comments
https://github.com/ruby/prism/commit/e327449db6
2023-11-01 13:10:29 -04:00
Kevin Newton 6b3b530cc1 [ruby/prism] Documentation for nodes
https://github.com/ruby/prism/commit/69323d3df4
2023-11-01 13:10:29 -04:00
Kevin Newton b12c795bdc [ruby/prism] Remove unnecessary PM_EMPTY_NODE_LIST
https://github.com/ruby/prism/commit/857f72e1f4
2023-11-01 13:10:29 -04:00
Jemma Issroff 8f71a5c530 [PRISM] Move scope_node itself to CRuby, create prism_compile.h 2023-10-25 18:18:35 -03:00
Jemma Issroff a9512e80b0 Revert "Revert "[ruby/prism] Change ScopeNode to point to previous ScopeNode""
This reverts commit fd87372a74.
2023-10-18 17:16:11 -07:00
Jemma Issroff fd87372a74 Revert "[ruby/prism] Change ScopeNode to point to previous ScopeNode"
This reverts commit 67a987f82b.
2023-10-16 15:20:26 -07:00
Jemma Issroff 67a987f82b [ruby/prism] Change ScopeNode to point to previous ScopeNode
Amend ScopeNode to point to previous ScopeNode, and to have void*
pointers to constants and index_lookup_table

https://github.com/ruby/prism/commit/0534324312
2023-10-16 21:53:11 +00:00
Matt Valentine-House 0fdee133fc [ruby/prism] Attach the ast node to the scope
So when building instruction sequences for a scope we can reference
items from the ast node that requires the scope. This is useful for for
loops, where the local variable tables from the parent scope will need
to be referenced.

https://github.com/ruby/prism/commit/426b1ca094
2023-10-09 10:16:01 +00:00
Kevin Newton 4f73a7c2f7 Sync to prism rename commits 2023-09-27 13:57:38 -04:00
Kevin Newton 8ab56869a6 Rename YARP filepaths to prism filepaths 2023-09-27 13:57:38 -04:00