Skip to content

Commit 9a1b505

Browse files
committed
Remove pack parsing
It was never adopted by ruby or other implementations. Ruyb 4.1 may add new directives, so now is a good time to remove it. It was actually never properly documented (just shows `Prism::Pack` with no methods) so removing seems safe to do even now.
1 parent 55948fe commit 9a1b505

16 files changed

Lines changed: 1 addition & 1371 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ javascript/src/prism.wasm: Makefile $(SOURCES) $(HEADERS)
4545
$(ECHO) "building $@"
4646
$(Q) $(WASI_SDK_PATH)/bin/clang --sysroot=$(WASI_SDK_PATH)/share/wasi-sysroot/ \
4747
$(DEBUG_FLAGS) \
48-
-DPRISM_EXPORT_SYMBOLS -DPRISM_EXCLUDE_PRETTYPRINT -DPRISM_EXCLUDE_JSON -DPRISM_EXCLUDE_PACK \
48+
-DPRISM_EXPORT_SYMBOLS -DPRISM_EXCLUDE_PRETTYPRINT -DPRISM_EXCLUDE_JSON \
4949
-D_WASI_EMULATED_MMAN -lwasi-emulated-mman $(CPPFLAGS) $(CFLAGS) \
5050
-Wl,--export-all -Wl,--gc-sections -Wl,--strip-all -Wl,--lto-O3 -Wl,--no-entry -mexec-model=reactor \
5151
-Oz -g0 -flto -fdata-sections -ffunction-sections \

docs/build_system.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ MAKEFLAGS="-j10" bundle exec rake compile
113113
* `PRISM_ENCODING_EXCLUDE_FULL` - Will cause the library to exclude the full encoding API, and only include the minimal number of encodings to support parsing Ruby code without encoding comments. By default this is off.
114114
* `PRISM_EXPORT_SYMBOLS` - Will cause the shared library to export symbols. By default this is off.
115115
* `PRISM_EXCLUDE_JSON` - Will cause the library to exclude the JSON API. By default this is off.
116-
* `PRISM_EXCLUDE_PACK` - Will cause the library to exclude the pack API. By default this is off.
117116
* `PRISM_EXCLUDE_PRETTYPRINT` - Will cause the library to exclude the prettyprint API. By default this is off.
118117
* `PRISM_EXCLUDE_SERIALIZATION` - Will cause the library to exclude the serialization API. By default this is off.
119118
* `PRISM_XALLOCATOR` - Will cause the library to use the custom memory allocator. By default this is off.

ext/prism/api_pack.c

Lines changed: 0 additions & 276 deletions
This file was deleted.

ext/prism/extension.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1434,5 +1434,4 @@ Init_prism(void) {
14341434

14351435
// Next, initialize the other APIs.
14361436
Init_prism_api_node();
1437-
Init_prism_pack();
14381437
}

ext/prism/extension.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ VALUE pm_ast_new(const pm_parser_t *parser, const pm_node_t *node, rb_encoding *
1414
VALUE pm_integer_new(const pm_integer_t *integer);
1515

1616
void Init_prism_api_node(void);
17-
void Init_prism_pack(void);
1817
RUBY_FUNC_EXPORTED void Init_prism(void);
1918

2019
#endif

include/prism.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#include "prism/diagnostic.h"
1818
#include "prism/node.h"
1919
#include "prism/options.h"
20-
#include "prism/pack.h"
2120
#include "prism/parser.h"
2221
#include "prism/prettyprint.h"
2322
#include "prism/regexp.h"

include/prism/defines.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,6 @@
215215
/** Exclude the JSON serialization API. */
216216
#define PRISM_EXCLUDE_JSON
217217

218-
/** Exclude the Array#pack parser API. */
219-
#define PRISM_EXCLUDE_PACK
220-
221218
/** Exclude the prettyprint API. */
222219
#define PRISM_EXCLUDE_PRETTYPRINT
223220

0 commit comments

Comments
 (0)