Make the argument of parseString a const reference.
This commit is contained in:
parent
915774cce3
commit
11b92f7346
|
@ -16,7 +16,7 @@ string getFileContent(const string& file);
|
|||
void setOutputFileContent(const string& language, const string& file, const string& content);
|
||||
|
||||
#include "ParseComponents.hpp"
|
||||
ParseTree parseString(unique_ptr<string> toParse);
|
||||
ParseTree parseString(const unique_ptr<string>& toParse);
|
||||
string transpile(ParseTree toTranspile, string language);
|
||||
|
||||
#endif //YERBACON_MISC_HPP
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
using namespace std;
|
||||
|
||||
ParseTree parseString(unique_ptr<string> toParse) {
|
||||
ParseTree parseString(const unique_ptr<string>& toParse) {
|
||||
ParseTree parseTree = ParseTree();
|
||||
auto lexed = lex(*toParse);
|
||||
for (tok& token: lexed) {
|
||||
|
|
Loading…
Reference in New Issue