edify: Rename parse_string to ParseString and let it take std::string.
Also simplify the helper function expect() in {edify,updater}_test.cpp.
Test: Run recovery_component_test on marlin.
Change-Id: If54febba4b5013f6d71546318a1ca6b635204ac8
This commit is contained in:
@@ -156,6 +156,6 @@ Value* StringValue(const char* str);
|
||||
|
||||
Value* StringValue(const std::string& str);
|
||||
|
||||
int parse_string(const char* str, std::unique_ptr<Expr>* root, int* error_count);
|
||||
int ParseString(const std::string& str, std::unique_ptr<Expr>* root, int* error_count);
|
||||
|
||||
#endif // _EXPRESSION_H
|
||||
|
||||
+3
-3
@@ -138,7 +138,7 @@ void yyerror(std::unique_ptr<Expr>* root, int* error_count, const char* s) {
|
||||
++*error_count;
|
||||
}
|
||||
|
||||
int parse_string(const char* str, std::unique_ptr<Expr>* root, int* error_count) {
|
||||
yy_switch_to_buffer(yy_scan_string(str));
|
||||
return yyparse(root, error_count);
|
||||
int ParseString(const std::string& str, std::unique_ptr<Expr>* root, int* error_count) {
|
||||
yy_switch_to_buffer(yy_scan_string(str.c_str()));
|
||||
return yyparse(root, error_count);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user