Skip to content

Commit 7212053

Browse files
committed
[GR-48146] Import YARP 0.8.0
PullRequest: truffleruby/3957
2 parents 3122bee + 697d2c5 commit 7212053

25 files changed

+998
-2496
lines changed

src/main/c/yarp/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ fuzz-docker-build: fuzz/docker/Dockerfile
6161
$(Q) docker build -t yarp/fuzz fuzz/docker/
6262

6363
fuzz-run-%: FORCE fuzz-docker-build
64+
$(ECHO) "generating templates"
65+
$(Q) bundle exec rake templates
6466
$(ECHO) "running $* fuzzer"
6567
$(Q) docker run --rm -v $(shell pwd):/yarp yarp/fuzz /bin/bash -c "FUZZ_FLAGS=\"$(FUZZ_FLAGS)\" make build/fuzz.$*"
6668
$(ECHO) "starting AFL++ run"

src/main/c/yarp/include/yarp.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,12 @@ YP_EXPORTED_FUNCTION void yp_prettyprint(yp_parser_t *parser, yp_node_t *node, y
5959
// Serialize the AST represented by the given node to the given buffer.
6060
YP_EXPORTED_FUNCTION void yp_serialize(yp_parser_t *parser, yp_node_t *node, yp_buffer_t *buffer);
6161

62-
// Parse and serialize the AST represented by the given source to the given
63-
// buffer.
62+
// Parse the given source to the AST and serialize the AST to the given buffer.
6463
YP_EXPORTED_FUNCTION void yp_parse_serialize(const char *source, size_t size, yp_buffer_t *buffer, const char *metadata);
6564

65+
// Lex the given source and serialize to the given buffer.
66+
YP_EXPORTED_FUNCTION void yp_lex_serialize(const char *source, size_t size, const char *filepath, yp_buffer_t *buffer);
67+
6668
// Returns a string representation of the given token type.
6769
YP_EXPORTED_FUNCTION const char * yp_token_type_to_str(yp_token_type_t token_type);
6870

0 commit comments

Comments
 (0)