summaryrefslogtreecommitdiff
path: root/prism_compile.h
diff options
context:
space:
mode:
authorKevin Newton <[email protected]>2024-03-27 15:04:27 -0400
committerKevin Newton <[email protected]>2024-03-27 17:19:24 -0400
commit7e12b03c5a179c1c738fec5ac1ad06dfdc879b1b (patch)
treeb7bd6958b7f6b24fec368de9b0f78132ba1831d4 /prism_compile.h
parent010286c767df393740872c8331408b42875ba64a (diff)
[PRISM] Set path on syntax error
Diffstat (limited to 'prism_compile.h')
-rw-r--r--prism_compile.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/prism_compile.h b/prism_compile.h
index 427fa54b51..32f8c12844 100644
--- a/prism_compile.h
+++ b/prism_compile.h
@@ -26,6 +26,13 @@ typedef struct pm_scope_node {
const pm_parser_t *parser;
rb_encoding *encoding;
+ /**
+ * This is the encoding of the actual filepath object that will be used when
+ * a __FILE__ node is compiled or when the path has to be set on a syntax
+ * error.
+ */
+ rb_encoding *filepath_encoding;
+
// The size of the local table
// on the iseq which includes
// locals and hidden variables
@@ -40,10 +47,19 @@ void pm_scope_node_destroy(pm_scope_node_t *scope_node);
bool *rb_ruby_prism_ptr(void);
typedef struct {
+ /** The parser that will do the actual parsing. */
pm_parser_t parser;
+
+ /** The options that will be passed to the parser. */
pm_options_t options;
+
+ /** The input that represents the source to be parsed. */
pm_string_t input;
+
+ /** The resulting scope node that will hold the generated AST. */
pm_scope_node_t node;
+
+ /** Whether or not this parse result has performed its parsing yet. */
bool parsed;
} pm_parse_result_t;