Skip to content

Commit

Permalink
style: make methods use camelCase
Browse files Browse the repository at this point in the history
  • Loading branch information
xXenvy committed Aug 9, 2024
1 parent 94d372d commit a0c14b2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/execution/include/interpreter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class ZynkInterpreter {
public:
void interpret(const std::string& source);
void interpret_file(const std::string& file_path);
void interpretFile(const std::string& file_path);
};

#endif // INTERPRETER_H
2 changes: 1 addition & 1 deletion src/execution/interpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ void ZynkInterpreter::interpret(const std::string& source) {
evaluator.evaluate(program.get());
}

void ZynkInterpreter::interpret_file(const std::string& filePath) {
void ZynkInterpreter::interpretFile(const std::string& filePath) {
std::ifstream file(filePath);
if (!file.is_open()) {
throw ZynkError{ ZynkErrorType::FileOpenError, "Failed to open a file " + filePath };
Expand Down
6 changes: 3 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ int main(int argc, char* argv[]) {
}
ZynkInterpreter interpreter;
try {
interpreter.interpret_file(cli.args.file_path);
interpreter.interpretFile(cli.args.file_path);
} catch (const ZynkError& error) {
error.print();
return -1;
} catch (const std::exception& unknown_error) {
} catch (const std::exception& unknownError) {
// Unknown error type, constructing a PanicError.
ZynkError{
ZynkErrorType::PanicError,
std::string("The interpreter unexpectedly panicked. Additional info: \"") + unknown_error.what() + "\".\n"
std::string("The interpreter unexpectedly panicked. Additional info: \"") + unknownError.what() + "\".\n"
}.print();
return -1;
}
Expand Down

0 comments on commit a0c14b2

Please sign in to comment.