This repository was archived by the owner on Nov 5, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +6
-6
lines changed
Expand file tree Collapse file tree 5 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ LIB_RUBY_PARSER_ParserOptions options = {
1616 .record_tokens = false,
1717 .token_rewriter = {.token_rewriter = {.f = NULL}}};
1818
19- LIB_RUBY_PARSER_ParserResult result = LIB_RUBY_PARSER_parse(options, input );
19+ LIB_RUBY_PARSER_ParserResult result = LIB_RUBY_PARSER_parse(input, options );
2020```
2121
2222Parser input:
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ static void test_parse(void)
1616
1717 LIB_RUBY_PARSER_ByteList input = LIB_RUBY_PARSER_new_bytes_from_cstr ("2 + 3" , 5 );
1818
19- LIB_RUBY_PARSER_ParserResult result = LIB_RUBY_PARSER_parse (options , input );
19+ LIB_RUBY_PARSER_ParserResult result = LIB_RUBY_PARSER_parse (input , options );
2020
2121 assert_eq (result .ast -> tag , LIB_RUBY_PARSER_NODE_SEND );
2222 assert_eq (result .tokens .len , 4 ); // tINT tPLUS tINT EOF
Original file line number Diff line number Diff line change 99 This is the main entrypoint API.
1010*/
1111LIB_RUBY_PARSER_ParserResult LIB_RUBY_PARSER_parse (
12- LIB_RUBY_PARSER_ParserOptions options ,
13- LIB_RUBY_PARSER_ByteList input );
12+ LIB_RUBY_PARSER_ByteList input ,
13+ LIB_RUBY_PARSER_ParserOptions options );
1414
1515#ifdef TEST_ENV
1616void run_test_group_api (void );
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ int main()
3030 entry -> content = NULL ;
3131 entry -> path = NULL ;
3232
33- LIB_RUBY_PARSER_ParserResult result = LIB_RUBY_PARSER_parse (options , input );
33+ LIB_RUBY_PARSER_ParserResult result = LIB_RUBY_PARSER_parse (input , options );
3434 LIB_RUBY_PARSER_drop_parser_result (& result );
3535 }
3636 clock_t end = clock ();
Original file line number Diff line number Diff line change @@ -80,8 +80,8 @@ pub extern "C" fn LIB_RUBY_PARSER_drop_parser_result(parser_result: *mut ParserR
8080
8181#[ no_mangle]
8282pub extern "C" fn LIB_RUBY_PARSER_parse (
83- options : ParserOptionsBlob ,
8483 input : ByteListBlob ,
84+ options : ParserOptionsBlob ,
8585) -> ParserResultBlob {
8686 let options: lib_ruby_parser:: ParserOptions = CParserOptions :: from ( options) . into ( ) ;
8787 let input: Vec < u8 > = input. into ( ) ;
You can’t perform that action at this time.
0 commit comments