Rename 'parse_config' export -> 'parser'
This commit is contained in:
parent
0dc3a95d0c
commit
da992b77ff
6 changed files with 11 additions and 12 deletions
|
|
@ -759,4 +759,4 @@ PARSE_FN() {
|
|||
FINISH_PARSER();
|
||||
}
|
||||
|
||||
EXPORT_PARSER(ts_parse_config_arithmetic);
|
||||
EXPORT_PARSER(ts_parser_arithmetic);
|
||||
|
|
|
|||
|
|
@ -916,4 +916,4 @@ PARSE_FN() {
|
|||
FINISH_PARSER();
|
||||
}
|
||||
|
||||
EXPORT_PARSER(ts_parse_config_json);
|
||||
EXPORT_PARSER(ts_parser_json);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include "runtime_spec_helper.h"
|
||||
|
||||
extern "C" ts_parser ts_parse_config_arithmetic();
|
||||
extern "C" ts_parser ts_parser_arithmetic();
|
||||
|
||||
START_TEST
|
||||
|
||||
|
|
@ -9,8 +9,7 @@ describe("arithmetic", []() {
|
|||
|
||||
before_each([&]() {
|
||||
doc = ts_document_make();
|
||||
ts_parser parser = ts_parse_config_arithmetic();
|
||||
ts_document_set_parser(doc, parser);
|
||||
ts_document_set_parser(doc, ts_parser_arithmetic());
|
||||
});
|
||||
|
||||
after_each([&]() {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include "runtime_spec_helper.h"
|
||||
|
||||
extern "C" ts_parser ts_parse_config_json();
|
||||
extern "C" ts_parser ts_parser_json();
|
||||
|
||||
START_TEST
|
||||
|
||||
|
|
@ -9,7 +9,7 @@ describe("json", []() {
|
|||
|
||||
before_each([&]() {
|
||||
doc = ts_document_make();
|
||||
ts_document_set_parser(doc, ts_parse_config_json());
|
||||
ts_document_set_parser(doc, ts_parser_json());
|
||||
});
|
||||
|
||||
after_each([&]() {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#include "runtime_spec_helper.h"
|
||||
#include "helpers/spy_reader.h"
|
||||
|
||||
extern "C" ts_parser ts_parse_config_json();
|
||||
extern "C" ts_parser ts_parser_json();
|
||||
|
||||
START_TEST
|
||||
|
||||
|
|
@ -11,7 +11,7 @@ describe("parsing", [&]() {
|
|||
|
||||
before_each([&]() {
|
||||
doc = ts_document_make();
|
||||
ts_document_set_parser(doc, ts_parse_config_json());
|
||||
ts_document_set_parser(doc, ts_parser_json());
|
||||
|
||||
reader = new SpyReader("{ \"key\": [1, 2] }", 5);
|
||||
ts_document_set_input(doc, reader->input);
|
||||
|
|
|
|||
|
|
@ -279,8 +279,8 @@ namespace tree_sitter {
|
|||
});
|
||||
}
|
||||
|
||||
string parse_config_struct() {
|
||||
return "EXPORT_PARSER(ts_parse_config_" + name + ");";
|
||||
string parser_export() {
|
||||
return "EXPORT_PARSER(ts_parser_" + name + ");";
|
||||
}
|
||||
|
||||
string code() {
|
||||
|
|
@ -291,7 +291,7 @@ namespace tree_sitter {
|
|||
recover_function(),
|
||||
lex_function(),
|
||||
parse_function(),
|
||||
parse_config_struct(),
|
||||
parser_export(),
|
||||
}, "\n\n") + "\n";
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue