khushi-411 / lox.cpp

Lox programming language.
0 stars 0 forks source link

Remove build warnings #6

Open khushi-411 opened 5 months ago

khushi-411 commented 5 months ago

As per title.

Command to replicate:

mkdir build && cd build && cmake .. && make VERBOSE=1 && cd ..
Build warnings

```cpp In file included from /home/khushi/Documents/lox.cpp/src/Lox.h:19, from /home/khushi/Documents/lox.cpp/src/Interpreter.cpp:9: /home/khushi/Documents/lox.cpp/src/Scanner.h: In member function ‘void lox::Scanner::identifier()’: /home/khushi/Documents/lox.cpp/src/Scanner.h:191:15: warning: NULL used in arithmetic [-Wpointer-arith] 191 | if (type == NULL) { | ^~~~ In file included from /home/khushi/Documents/lox.cpp/src/Interpreter.h:10, from /home/khushi/Documents/lox.cpp/src/Interpreter.cpp:8: /home/khushi/Documents/lox.cpp/src/Interpreter.h: In instantiation of ‘class lox::Interpreter’: /home/khushi/Documents/lox.cpp/src/Lox.h:30:30: required from ‘class lox::Lox’ /home/khushi/Documents/lox.cpp/src/Lox.h:134:21: required from here /home/khushi/Documents/lox.cpp/src/Stmt.h:187:13: warning: ‘T lox::stmt::Visitor::visitWhileStmt(const lox::stmt::While&) const [with T = void]’ was hidden [-Woverloaded-virtual=] 187 | virtual T visitWhileStmt(const While& stmt) const = 0; | ^~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:36:8: note: by ‘void lox::Interpreter::visitWhileStmt(const lox::stmt::While&) [with T = double]’ 36 | void visitWhileStmt(const lox::stmt::While& _stmt); | ^~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Stmt.h:186:13: warning: ‘T lox::stmt::Visitor::visitVarStmt(const lox::stmt::Var&) const [with T = void]’ was hidden [-Woverloaded-virtual=] 186 | virtual T visitVarStmt(const Var& stmt) const = 0; | ^~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:35:8: note: by ‘void lox::Interpreter::visitVarStmt(const lox::stmt::Var&) [with T = double]’ 35 | void visitVarStmt(const lox::stmt::Var& _stmt); | ^~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Stmt.h:185:13: warning: ‘T lox::stmt::Visitor::visitReturnStmt(const lox::stmt::Return&) const [with T = void]’ was hidden [-Woverloaded-virtual=] 185 | virtual T visitReturnStmt(const Return& stmt) const = 0; | ^~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:34:8: note: by ‘void lox::Interpreter::visitReturnStmt(const lox::stmt::Return&) [with T = double]’ 34 | void visitReturnStmt(const lox::stmt::Return& _stmt); | ^~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Stmt.h:184:13: warning: ‘T lox::stmt::Visitor::visitPrintStmt(const lox::stmt::Print&) const [with T = void]’ was hidden [-Woverloaded-virtual=] 184 | virtual T visitPrintStmt(const Print& stmt) const = 0; | ^~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:33:8: note: by ‘void lox::Interpreter::visitPrintStmt(const lox::stmt::Print&) [with T = double]’ 33 | void visitPrintStmt(const lox::stmt::Print& _stmt); | ^~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Stmt.h:183:13: warning: ‘T lox::stmt::Visitor::visitIfStmt(const lox::stmt::If&) const [with T = void]’ was hidden [-Woverloaded-virtual=] 183 | virtual T visitIfStmt(const If& stmt) const = 0; | ^~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:32:8: note: by ‘void lox::Interpreter::visitIfStmt(const lox::stmt::If&) [with T = double]’ 32 | void visitIfStmt(const lox::stmt::If& _stmt); | ^~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Stmt.h:182:13: warning: ‘T lox::stmt::Visitor::visitFunctionStmt(const lox::stmt::Function&) const [with T = void]’ was hidden [-Woverloaded-virtual=] 182 | virtual T visitFunctionStmt(const Function& stmt) const = 0; | ^~~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:31:8: note: by ‘void lox::Interpreter::visitFunctionStmt(const lox::stmt::Function&) [with T = double]’ 31 | void visitFunctionStmt(const lox::stmt::Function& _stmt); | ^~~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Stmt.h:181:13: warning: ‘T lox::stmt::Visitor::visitExpressionStmt(const lox::stmt::Expression&) const [with T = void]’ was hidden [-Woverloaded-virtual=] 181 | virtual T visitExpressionStmt(const Expression& stmt) const = 0; | ^~~~~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:30:8: note: by ‘void lox::Interpreter::visitExpressionStmt(const lox::stmt::Expression&) [with T = double]’ 30 | void visitExpressionStmt(const lox::stmt::Expression& _stmt); | ^~~~~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Stmt.h:180:13: warning: ‘T lox::stmt::Visitor::visitClassStmt(const lox::stmt::Class&) const [with T = void]’ was hidden [-Woverloaded-virtual=] 180 | virtual T visitClassStmt(const Class& stmt) const = 0; | ^~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:29:8: note: by ‘void lox::Interpreter::visitClassStmt(const lox::stmt::Class&) [with T = double]’ 29 | void visitClassStmt(const lox::stmt::Class& _stmt); | ^~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Stmt.h:179:13: warning: ‘T lox::stmt::Visitor::visitBlockStmt(const lox::stmt::Block&) const [with T = void]’ was hidden [-Woverloaded-virtual=] 179 | virtual T visitBlockStmt(const Block& stmt) const = 0; | ^~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:28:8: note: by ‘void lox::Interpreter::visitBlockStmt(const lox::stmt::Block&) [with T = double]’ 28 | void visitBlockStmt(const lox::stmt::Block& _stmt); | ^~~~~~~~~~~~~~ In file included from /home/khushi/Documents/lox.cpp/src/Interpreter.cpp:7: /home/khushi/Documents/lox.cpp/src/Expr.h:239:13: warning: ‘T lox::expr::Visitor::visitVariableExpr(const lox::expr::Variable&) const [with T = std::variant, std::allocator >, double, bool>]’ was hidden [-Woverloaded-virtual=] 239 | virtual T visitVariableExpr(const Variable& expr) const = 0; | ^~~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:58:10: note: by ‘Object lox::Interpreter::visitVariableExpr(const lox::expr::Variable&) [with T = double; Object = std::variant, std::allocator >, double, bool>]’ 58 | Object visitVariableExpr(const lox::expr::Variable& _expr); | ^~~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Expr.h:238:13: warning: ‘T lox::expr::Visitor::visitUnaryExpr(const lox::expr::Unary&) const [with T = std::variant, std::allocator >, double, bool>]’ was hidden [-Woverloaded-virtual=] 238 | virtual T visitUnaryExpr(const Unary& expr) const = 0; | ^~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:57:10: note: by ‘Object lox::Interpreter::visitUnaryExpr(const lox::expr::Unary&) [with T = double; Object = std::variant, std::allocator >, double, bool>]’ 57 | Object visitUnaryExpr(const lox::expr::Unary& _expr); | ^~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Expr.h:237:13: warning: ‘T lox::expr::Visitor::visitThisExpr(const lox::expr::This&) const [with T = std::variant, std::allocator >, double, bool>]’ was hidden [-Woverloaded-virtual=] 237 | virtual T visitThisExpr(const This& expr) const = 0; | ^~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:56:10: note: by ‘Object lox::Interpreter::visitThisExpr(const lox::expr::This&) [with T = double; Object = std::variant, std::allocator >, double, bool>]’ 56 | Object visitThisExpr(const lox::expr::This& _expr); | ^~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Expr.h:236:13: warning: ‘T lox::expr::Visitor::visitSuperExpr(const lox::expr::Super&) const [with T = std::variant, std::allocator >, double, bool>]’ was hidden [-Woverloaded-virtual=] 236 | virtual T visitSuperExpr(const Super& expr) const = 0; | ^~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:55:10: note: by ‘Object lox::Interpreter::visitSuperExpr(const lox::expr::Super&) [with T = double; Object = std::variant, std::allocator >, double, bool>]’ 55 | Object visitSuperExpr(const lox::expr::Super& _expr); | ^~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Expr.h:235:13: warning: ‘T lox::expr::Visitor::visitSetExpr(const lox::expr::Set&) const [with T = std::variant, std::allocator >, double, bool>]’ was hidden [-Woverloaded-virtual=] 235 | virtual T visitSetExpr(const Set& expr) const = 0; | ^~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:54:10: note: by ‘Object lox::Interpreter::visitSetExpr(const lox::expr::Set&) [with T = double; Object = std::variant, std::allocator >, double, bool>]’ 54 | Object visitSetExpr(const lox::expr::Set& _expr); | ^~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Expr.h:234:13: warning: ‘T lox::expr::Visitor::visitLogicalExpr(const lox::expr::Logical&) const [with T = std::variant, std::allocator >, double, bool>]’ was hidden [-Woverloaded-virtual=] 234 | virtual T visitLogicalExpr(const Logical& expr) const = 0; | ^~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:53:10: note: by ‘Object lox::Interpreter::visitLogicalExpr(const lox::expr::Logical&) [with T = double; Object = std::variant, std::allocator >, double, bool>]’ 53 | Object visitLogicalExpr(const lox::expr::Logical& _expr); | ^~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Expr.h:233:13: warning: ‘T lox::expr::Visitor::visitLiteralExpr(const lox::expr::Literal&) const [with T = std::variant, std::allocator >, double, bool>]’ was hidden [-Woverloaded-virtual=] 233 | virtual T visitLiteralExpr(const Literal& expr) const = 0; | ^~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:52:10: note: by ‘Object lox::Interpreter::visitLiteralExpr(const lox::expr::Literal&) [with T = double; Object = std::variant, std::allocator >, double, bool>]’ 52 | Object visitLiteralExpr(const lox::expr::Literal& _expr); | ^~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Expr.h:232:13: warning: ‘T lox::expr::Visitor::visitGroupingExpr(const lox::expr::Grouping&) const [with T = std::variant, std::allocator >, double, bool>]’ was hidden [-Woverloaded-virtual=] 232 | virtual T visitGroupingExpr(const Grouping& expr) const = 0; | ^~~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:51:10: note: by ‘Object lox::Interpreter::visitGroupingExpr(const lox::expr::Grouping&) [with T = double; Object = std::variant, std::allocator >, double, bool>]’ 51 | Object visitGroupingExpr(const lox::expr::Grouping& _expr); | ^~~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Expr.h:231:13: warning: ‘T lox::expr::Visitor::visitGetExpr(const lox::expr::Get&) const [with T = std::variant, std::allocator >, double, bool>]’ was hidden [-Woverloaded-virtual=] 231 | virtual T visitGetExpr(const Get& expr) const = 0; | ^~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:50:10: note: by ‘Object lox::Interpreter::visitGetExpr(const lox::expr::Get&) [with T = double; Object = std::variant, std::allocator >, double, bool>]’ 50 | Object visitGetExpr(const lox::expr::Get& _expr); | ^~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Expr.h:230:13: warning: ‘T lox::expr::Visitor::visitCallExpr(const lox::expr::Call&) const [with T = std::variant, std::allocator >, double, bool>]’ was hidden [-Woverloaded-virtual=] 230 | virtual T visitCallExpr(const Call& expr) const = 0; | ^~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:49:10: note: by ‘Object lox::Interpreter::visitCallExpr(const lox::expr::Call&) [with T = double; Object = std::variant, std::allocator >, double, bool>]’ 49 | Object visitCallExpr(const lox::expr::Call& _expr); | ^~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Expr.h:229:13: warning: ‘T lox::expr::Visitor::visitBinaryExpr(const lox::expr::Binary&) const [with T = std::variant, std::allocator >, double, bool>]’ was hidden [-Woverloaded-virtual=] 229 | virtual T visitBinaryExpr(const Binary& expr) const = 0; | ^~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:48:10: note: by ‘Object lox::Interpreter::visitBinaryExpr(const lox::expr::Binary&) [with T = double; Object = std::variant, std::allocator >, double, bool>]’ 48 | Object visitBinaryExpr(const lox::expr::Binary& _expr); | ^~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Expr.h:228:13: warning: ‘T lox::expr::Visitor::visitAssignExpr(const lox::expr::Assign&) const [with T = std::variant, std::allocator >, double, bool>]’ was hidden [-Woverloaded-virtual=] 228 | virtual T visitAssignExpr(const Assign& expr) const = 0; | ^~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:47:10: note: by ‘Object lox::Interpreter::visitAssignExpr(const lox::expr::Assign&) [with T = double; Object = std::variant, std::allocator >, double, bool>]’ 47 | Object visitAssignExpr(const lox::expr::Assign& _expr); | ^~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.cpp: In member function ‘Object lox::Interpreter::lookUpVariable(const lox::Token&, const lox::expr::Expr&)’: /home/khushi/Documents/lox.cpp/src/Interpreter.cpp:503:19: warning: NULL used in arithmetic [-Wpointer-arith] 503 | if (distance != NULL) { | ^~~~ /home/khushi/Documents/lox.cpp/src/Lox.h: In instantiation of ‘void lox::Lox::run(const std::string&) [with T = double; std::string = std::__cxx11::basic_string]’: /home/khushi/Documents/lox.cpp/src/Lox.h:134:21: required from here /home/khushi/Documents/lox.cpp/src/Lox.h:83:24: warning: variable ‘expression’ set but not used [-Wunused-but-set-variable] 83 | lox::expr::Expr expression = parser.parse(); | ^~~~~~~~~~ In file included from /home/khushi/Documents/lox.cpp/src/Lox.h:16: /home/khushi/Documents/lox.cpp/src/Parser.h: In instantiation of ‘lox::expr::Expr lox::parser::Parser::parse() [with T = double]’: /home/khushi/Documents/lox.cpp/src/Lox.h:83:49: required from ‘void lox::Lox::run(const std::string&) [with T = double; std::string = std::__cxx11::basic_string]’ /home/khushi/Documents/lox.cpp/src/Lox.h:134:21: required from here /home/khushi/Documents/lox.cpp/src/Parser.h:364:23: warning: catching polymorphic type ‘class lox::parser::ParseError’ by value [-Wcatch-value=] 364 | } catch (ParseError error) { | ^~~~~ /home/khushi/Documents/lox.cpp/src/Scanner.h: In instantiation of ‘bool lox::Scanner::isAtEnd() [with T = double]’: /home/khushi/Documents/lox.cpp/src/Scanner.h:87:20: required from ‘std::vector lox::Scanner::scanTokens() [with T = double]’ /home/khushi/Documents/lox.cpp/src/Lox.h:76:51: required from ‘void lox::Lox::run(const std::string&) [with T = double; std::string = std::__cxx11::basic_string]’ /home/khushi/Documents/lox.cpp/src/Lox.h:134:21: required from here /home/khushi/Documents/lox.cpp/src/Scanner.h:299:18: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 299 | return current >= source.length(); | ~~~~~~~~^~~~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Scanner.h: In instantiation of ‘void lox::Scanner::identifier() [with T = double]’: /home/khushi/Documents/lox.cpp/src/Scanner.h:171:21: required from ‘void lox::Scanner::scanToken() [with T = double]’ /home/khushi/Documents/lox.cpp/src/Scanner.h:89:17: required from ‘std::vector lox::Scanner::scanTokens() [with T = double]’ /home/khushi/Documents/lox.cpp/src/Lox.h:76:51: required from ‘void lox::Lox::run(const std::string&) [with T = double; std::string = std::__cxx11::basic_string]’ /home/khushi/Documents/lox.cpp/src/Lox.h:134:21: required from here /home/khushi/Documents/lox.cpp/src/Scanner.h:191:12: warning: NULL used in arithmetic [-Wpointer-arith] 191 | if (type == NULL) { | ^ /home/khushi/Documents/lox.cpp/src/Scanner.h: In instantiation of ‘char lox::Scanner::peekNext() [with T = double]’: /home/khushi/Documents/lox.cpp/src/Scanner.h:207:39: required from ‘void lox::Scanner::number() [with T = double]’ /home/khushi/Documents/lox.cpp/src/Scanner.h:169:21: required from ‘void lox::Scanner::scanToken() [with T = double]’ /home/khushi/Documents/lox.cpp/src/Scanner.h:89:17: required from ‘std::vector lox::Scanner::scanTokens() [with T = double]’ /home/khushi/Documents/lox.cpp/src/Lox.h:76:51: required from ‘void lox::Lox::run(const std::string&) [with T = double; std::string = std::__cxx11::basic_string]’ /home/khushi/Documents/lox.cpp/src/Lox.h:134:21: required from here /home/khushi/Documents/lox.cpp/src/Scanner.h:272:19: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 272 | if (current + 1 >= source.length()) { | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ In file included from /home/khushi/Documents/lox.cpp/src/Parser.h:4: /home/khushi/Documents/lox.cpp/src/Parser.h: In member function ‘bool lox::parser::Parser::match(const lox::TokenType&, ...) [with T = double]’: /home/khushi/Documents/lox.cpp/src/Parser.h:457:28: warning: ‘lox::TokenType’ is promoted to ‘int’ when passed through ‘...’ 457 | type = va_arg(args, TokenType)) { | ^ /home/khushi/Documents/lox.cpp/src/Parser.h:457:28: note: (so you should pass ‘int’ not ‘lox::TokenType’ to ‘va_arg’) /home/khushi/Documents/lox.cpp/src/Parser.h:457:28: note: if this code is reached, the program will abort [ 33%] Building CXX object CMakeFiles/lox.cpp.dir/src/LoxClass.cpp.o /usr/bin/c++ -Dlox_cpp_EXPORTS -I/home/khushi/Documents/lox.cpp/src -std=c++20 -fPIC -Wall -Wno-unused-function -MD -MT CMakeFiles/lox.cpp.dir/src/LoxClass.cpp.o -MF CMakeFiles/lox.cpp.dir/src/LoxClass.cpp.o.d -o CMakeFiles/lox.cpp.dir/src/LoxClass.cpp.o -c /home/khushi/Documents/lox.cpp/src/LoxClass.cpp [ 38%] Building CXX object CMakeFiles/lox.cpp.dir/src/LoxFunction.cpp.o /usr/bin/c++ -Dlox_cpp_EXPORTS -I/home/khushi/Documents/lox.cpp/src -std=c++20 -fPIC -Wall -Wno-unused-function -MD -MT CMakeFiles/lox.cpp.dir/src/LoxFunction.cpp.o -MF CMakeFiles/lox.cpp.dir/src/LoxFunction.cpp.o.d -o CMakeFiles/lox.cpp.dir/src/LoxFunction.cpp.o -c /home/khushi/Documents/lox.cpp/src/LoxFunction.cpp [ 44%] Building CXX object CMakeFiles/lox.cpp.dir/src/LoxInstance.cpp.o /usr/bin/c++ -Dlox_cpp_EXPORTS -I/home/khushi/Documents/lox.cpp/src -std=c++20 -fPIC -Wall -Wno-unused-function -MD -MT CMakeFiles/lox.cpp.dir/src/LoxInstance.cpp.o -MF CMakeFiles/lox.cpp.dir/src/LoxInstance.cpp.o.d -o CMakeFiles/lox.cpp.dir/src/LoxInstance.cpp.o -c /home/khushi/Documents/lox.cpp/src/LoxInstance.cpp [ 50%] Building CXX object CMakeFiles/lox.cpp.dir/src/Parser.cpp.o /usr/bin/c++ -Dlox_cpp_EXPORTS -I/home/khushi/Documents/lox.cpp/src -std=c++20 -fPIC -Wall -Wno-unused-function -MD -MT CMakeFiles/lox.cpp.dir/src/Parser.cpp.o -MF CMakeFiles/lox.cpp.dir/src/Parser.cpp.o.d -o CMakeFiles/lox.cpp.dir/src/Parser.cpp.o -c /home/khushi/Documents/lox.cpp/src/Parser.cpp In file included from /home/khushi/Documents/lox.cpp/src/Lox.h:19, from /home/khushi/Documents/lox.cpp/src/Parser.cpp:4: /home/khushi/Documents/lox.cpp/src/Scanner.h: In member function ‘void lox::Scanner::identifier()’: /home/khushi/Documents/lox.cpp/src/Scanner.h:191:15: warning: NULL used in arithmetic [-Wpointer-arith] 191 | if (type == NULL) { | ^~~~ In file included from /home/khushi/Documents/lox.cpp/src/ASTPrinter.h:8, from /home/khushi/Documents/lox.cpp/src/Lox.h:13: /home/khushi/Documents/lox.cpp/src/Interpreter.h: In instantiation of ‘class lox::Interpreter’: /home/khushi/Documents/lox.cpp/src/Lox.h:30:30: required from ‘class lox::Lox’ /home/khushi/Documents/lox.cpp/src/Lox.h:134:21: required from here /home/khushi/Documents/lox.cpp/src/Stmt.h:187:13: warning: ‘T lox::stmt::Visitor::visitWhileStmt(const lox::stmt::While&) const [with T = void]’ was hidden [-Woverloaded-virtual=] 187 | virtual T visitWhileStmt(const While& stmt) const = 0; | ^~~~~~~~~~~~~~ In file included from /home/khushi/Documents/lox.cpp/src/Lox.h:15: /home/khushi/Documents/lox.cpp/src/Interpreter.h:36:8: note: by ‘void lox::Interpreter::visitWhileStmt(const lox::stmt::While&) [with T = double]’ 36 | void visitWhileStmt(const lox::stmt::While& _stmt); | ^~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Stmt.h:186:13: warning: ‘T lox::stmt::Visitor::visitVarStmt(const lox::stmt::Var&) const [with T = void]’ was hidden [-Woverloaded-virtual=] 186 | virtual T visitVarStmt(const Var& stmt) const = 0; | ^~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:35:8: note: by ‘void lox::Interpreter::visitVarStmt(const lox::stmt::Var&) [with T = double]’ 35 | void visitVarStmt(const lox::stmt::Var& _stmt); | ^~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Stmt.h:185:13: warning: ‘T lox::stmt::Visitor::visitReturnStmt(const lox::stmt::Return&) const [with T = void]’ was hidden [-Woverloaded-virtual=] 185 | virtual T visitReturnStmt(const Return& stmt) const = 0; | ^~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:34:8: note: by ‘void lox::Interpreter::visitReturnStmt(const lox::stmt::Return&) [with T = double]’ 34 | void visitReturnStmt(const lox::stmt::Return& _stmt); | ^~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Stmt.h:184:13: warning: ‘T lox::stmt::Visitor::visitPrintStmt(const lox::stmt::Print&) const [with T = void]’ was hidden [-Woverloaded-virtual=] 184 | virtual T visitPrintStmt(const Print& stmt) const = 0; | ^~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:33:8: note: by ‘void lox::Interpreter::visitPrintStmt(const lox::stmt::Print&) [with T = double]’ 33 | void visitPrintStmt(const lox::stmt::Print& _stmt); | ^~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Stmt.h:183:13: warning: ‘T lox::stmt::Visitor::visitIfStmt(const lox::stmt::If&) const [with T = void]’ was hidden [-Woverloaded-virtual=] 183 | virtual T visitIfStmt(const If& stmt) const = 0; | ^~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:32:8: note: by ‘void lox::Interpreter::visitIfStmt(const lox::stmt::If&) [with T = double]’ 32 | void visitIfStmt(const lox::stmt::If& _stmt); | ^~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Stmt.h:182:13: warning: ‘T lox::stmt::Visitor::visitFunctionStmt(const lox::stmt::Function&) const [with T = void]’ was hidden [-Woverloaded-virtual=] 182 | virtual T visitFunctionStmt(const Function& stmt) const = 0; | ^~~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:31:8: note: by ‘void lox::Interpreter::visitFunctionStmt(const lox::stmt::Function&) [with T = double]’ 31 | void visitFunctionStmt(const lox::stmt::Function& _stmt); | ^~~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Stmt.h:181:13: warning: ‘T lox::stmt::Visitor::visitExpressionStmt(const lox::stmt::Expression&) const [with T = void]’ was hidden [-Woverloaded-virtual=] 181 | virtual T visitExpressionStmt(const Expression& stmt) const = 0; | ^~~~~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:30:8: note: by ‘void lox::Interpreter::visitExpressionStmt(const lox::stmt::Expression&) [with T = double]’ 30 | void visitExpressionStmt(const lox::stmt::Expression& _stmt); | ^~~~~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Stmt.h:180:13: warning: ‘T lox::stmt::Visitor::visitClassStmt(const lox::stmt::Class&) const [with T = void]’ was hidden [-Woverloaded-virtual=] 180 | virtual T visitClassStmt(const Class& stmt) const = 0; | ^~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:29:8: note: by ‘void lox::Interpreter::visitClassStmt(const lox::stmt::Class&) [with T = double]’ 29 | void visitClassStmt(const lox::stmt::Class& _stmt); | ^~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Stmt.h:179:13: warning: ‘T lox::stmt::Visitor::visitBlockStmt(const lox::stmt::Block&) const [with T = void]’ was hidden [-Woverloaded-virtual=] 179 | virtual T visitBlockStmt(const Block& stmt) const = 0; | ^~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:28:8: note: by ‘void lox::Interpreter::visitBlockStmt(const lox::stmt::Block&) [with T = double]’ 28 | void visitBlockStmt(const lox::stmt::Block& _stmt); | ^~~~~~~~~~~~~~ In file included from /home/khushi/Documents/lox.cpp/src/Parser.cpp:3: /home/khushi/Documents/lox.cpp/src/Expr.h:239:13: warning: ‘T lox::expr::Visitor::visitVariableExpr(const lox::expr::Variable&) const [with T = std::variant, std::allocator >, double, bool>]’ was hidden [-Woverloaded-virtual=] 239 | virtual T visitVariableExpr(const Variable& expr) const = 0; | ^~~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:58:10: note: by ‘Object lox::Interpreter::visitVariableExpr(const lox::expr::Variable&) [with T = double; Object = std::variant, std::allocator >, double, bool>]’ 58 | Object visitVariableExpr(const lox::expr::Variable& _expr); | ^~~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Expr.h:238:13: warning: ‘T lox::expr::Visitor::visitUnaryExpr(const lox::expr::Unary&) const [with T = std::variant, std::allocator >, double, bool>]’ was hidden [-Woverloaded-virtual=] 238 | virtual T visitUnaryExpr(const Unary& expr) const = 0; | ^~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:57:10: note: by ‘Object lox::Interpreter::visitUnaryExpr(const lox::expr::Unary&) [with T = double; Object = std::variant, std::allocator >, double, bool>]’ 57 | Object visitUnaryExpr(const lox::expr::Unary& _expr); | ^~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Expr.h:237:13: warning: ‘T lox::expr::Visitor::visitThisExpr(const lox::expr::This&) const [with T = std::variant, std::allocator >, double, bool>]’ was hidden [-Woverloaded-virtual=] 237 | virtual T visitThisExpr(const This& expr) const = 0; | ^~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:56:10: note: by ‘Object lox::Interpreter::visitThisExpr(const lox::expr::This&) [with T = double; Object = std::variant, std::allocator >, double, bool>]’ 56 | Object visitThisExpr(const lox::expr::This& _expr); | ^~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Expr.h:236:13: warning: ‘T lox::expr::Visitor::visitSuperExpr(const lox::expr::Super&) const [with T = std::variant, std::allocator >, double, bool>]’ was hidden [-Woverloaded-virtual=] 236 | virtual T visitSuperExpr(const Super& expr) const = 0; | ^~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:55:10: note: by ‘Object lox::Interpreter::visitSuperExpr(const lox::expr::Super&) [with T = double; Object = std::variant, std::allocator >, double, bool>]’ 55 | Object visitSuperExpr(const lox::expr::Super& _expr); | ^~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Expr.h:235:13: warning: ‘T lox::expr::Visitor::visitSetExpr(const lox::expr::Set&) const [with T = std::variant, std::allocator >, double, bool>]’ was hidden [-Woverloaded-virtual=] 235 | virtual T visitSetExpr(const Set& expr) const = 0; | ^~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:54:10: note: by ‘Object lox::Interpreter::visitSetExpr(const lox::expr::Set&) [with T = double; Object = std::variant, std::allocator >, double, bool>]’ 54 | Object visitSetExpr(const lox::expr::Set& _expr); | ^~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Expr.h:234:13: warning: ‘T lox::expr::Visitor::visitLogicalExpr(const lox::expr::Logical&) const [with T = std::variant, std::allocator >, double, bool>]’ was hidden [-Woverloaded-virtual=] 234 | virtual T visitLogicalExpr(const Logical& expr) const = 0; | ^~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:53:10: note: by ‘Object lox::Interpreter::visitLogicalExpr(const lox::expr::Logical&) [with T = double; Object = std::variant, std::allocator >, double, bool>]’ 53 | Object visitLogicalExpr(const lox::expr::Logical& _expr); | ^~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Expr.h:233:13: warning: ‘T lox::expr::Visitor::visitLiteralExpr(const lox::expr::Literal&) const [with T = std::variant, std::allocator >, double, bool>]’ was hidden [-Woverloaded-virtual=] 233 | virtual T visitLiteralExpr(const Literal& expr) const = 0; | ^~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:52:10: note: by ‘Object lox::Interpreter::visitLiteralExpr(const lox::expr::Literal&) [with T = double; Object = std::variant, std::allocator >, double, bool>]’ 52 | Object visitLiteralExpr(const lox::expr::Literal& _expr); | ^~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Expr.h:232:13: warning: ‘T lox::expr::Visitor::visitGroupingExpr(const lox::expr::Grouping&) const [with T = std::variant, std::allocator >, double, bool>]’ was hidden [-Woverloaded-virtual=] 232 | virtual T visitGroupingExpr(const Grouping& expr) const = 0; | ^~~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:51:10: note: by ‘Object lox::Interpreter::visitGroupingExpr(const lox::expr::Grouping&) [with T = double; Object = std::variant, std::allocator >, double, bool>]’ 51 | Object visitGroupingExpr(const lox::expr::Grouping& _expr); | ^~~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Expr.h:231:13: warning: ‘T lox::expr::Visitor::visitGetExpr(const lox::expr::Get&) const [with T = std::variant, std::allocator >, double, bool>]’ was hidden [-Woverloaded-virtual=] 231 | virtual T visitGetExpr(const Get& expr) const = 0; | ^~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:50:10: note: by ‘Object lox::Interpreter::visitGetExpr(const lox::expr::Get&) [with T = double; Object = std::variant, std::allocator >, double, bool>]’ 50 | Object visitGetExpr(const lox::expr::Get& _expr); | ^~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Expr.h:230:13: warning: ‘T lox::expr::Visitor::visitCallExpr(const lox::expr::Call&) const [with T = std::variant, std::allocator >, double, bool>]’ was hidden [-Woverloaded-virtual=] 230 | virtual T visitCallExpr(const Call& expr) const = 0; | ^~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:49:10: note: by ‘Object lox::Interpreter::visitCallExpr(const lox::expr::Call&) [with T = double; Object = std::variant, std::allocator >, double, bool>]’ 49 | Object visitCallExpr(const lox::expr::Call& _expr); | ^~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Expr.h:229:13: warning: ‘T lox::expr::Visitor::visitBinaryExpr(const lox::expr::Binary&) const [with T = std::variant, std::allocator >, double, bool>]’ was hidden [-Woverloaded-virtual=] 229 | virtual T visitBinaryExpr(const Binary& expr) const = 0; | ^~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:48:10: note: by ‘Object lox::Interpreter::visitBinaryExpr(const lox::expr::Binary&) [with T = double; Object = std::variant, std::allocator >, double, bool>]’ 48 | Object visitBinaryExpr(const lox::expr::Binary& _expr); | ^~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Expr.h:228:13: warning: ‘T lox::expr::Visitor::visitAssignExpr(const lox::expr::Assign&) const [with T = std::variant, std::allocator >, double, bool>]’ was hidden [-Woverloaded-virtual=] 228 | virtual T visitAssignExpr(const Assign& expr) const = 0; | ^~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:47:10: note: by ‘Object lox::Interpreter::visitAssignExpr(const lox::expr::Assign&) [with T = double; Object = std::variant, std::allocator >, double, bool>]’ 47 | Object visitAssignExpr(const lox::expr::Assign& _expr); | ^~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Lox.h: In instantiation of ‘void lox::Lox::run(const std::string&) [with T = double; std::string = std::__cxx11::basic_string]’: /home/khushi/Documents/lox.cpp/src/Lox.h:134:21: required from here /home/khushi/Documents/lox.cpp/src/Lox.h:83:24: warning: variable ‘expression’ set but not used [-Wunused-but-set-variable] 83 | lox::expr::Expr expression = parser.parse(); | ^~~~~~~~~~ In file included from /home/khushi/Documents/lox.cpp/src/Lox.h:16: /home/khushi/Documents/lox.cpp/src/Parser.h: In instantiation of ‘lox::expr::Expr lox::parser::Parser::parse() [with T = double]’: /home/khushi/Documents/lox.cpp/src/Lox.h:83:49: required from ‘void lox::Lox::run(const std::string&) [with T = double; std::string = std::__cxx11::basic_string]’ /home/khushi/Documents/lox.cpp/src/Lox.h:134:21: required from here /home/khushi/Documents/lox.cpp/src/Parser.h:364:23: warning: catching polymorphic type ‘class lox::parser::ParseError’ by value [-Wcatch-value=] 364 | } catch (ParseError error) { | ^~~~~ /home/khushi/Documents/lox.cpp/src/Scanner.h: In instantiation of ‘bool lox::Scanner::isAtEnd() [with T = double]’: /home/khushi/Documents/lox.cpp/src/Scanner.h:87:20: required from ‘std::vector lox::Scanner::scanTokens() [with T = double]’ /home/khushi/Documents/lox.cpp/src/Lox.h:76:51: required from ‘void lox::Lox::run(const std::string&) [with T = double; std::string = std::__cxx11::basic_string]’ /home/khushi/Documents/lox.cpp/src/Lox.h:134:21: required from here /home/khushi/Documents/lox.cpp/src/Scanner.h:299:18: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 299 | return current >= source.length(); | ~~~~~~~~^~~~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Scanner.h: In instantiation of ‘void lox::Scanner::identifier() [with T = double]’: /home/khushi/Documents/lox.cpp/src/Scanner.h:171:21: required from ‘void lox::Scanner::scanToken() [with T = double]’ /home/khushi/Documents/lox.cpp/src/Scanner.h:89:17: required from ‘std::vector lox::Scanner::scanTokens() [with T = double]’ /home/khushi/Documents/lox.cpp/src/Lox.h:76:51: required from ‘void lox::Lox::run(const std::string&) [with T = double; std::string = std::__cxx11::basic_string]’ /home/khushi/Documents/lox.cpp/src/Lox.h:134:21: required from here /home/khushi/Documents/lox.cpp/src/Scanner.h:191:12: warning: NULL used in arithmetic [-Wpointer-arith] 191 | if (type == NULL) { | ^ /home/khushi/Documents/lox.cpp/src/Scanner.h: In instantiation of ‘char lox::Scanner::peekNext() [with T = double]’: /home/khushi/Documents/lox.cpp/src/Scanner.h:207:39: required from ‘void lox::Scanner::number() [with T = double]’ /home/khushi/Documents/lox.cpp/src/Scanner.h:169:21: required from ‘void lox::Scanner::scanToken() [with T = double]’ /home/khushi/Documents/lox.cpp/src/Scanner.h:89:17: required from ‘std::vector lox::Scanner::scanTokens() [with T = double]’ /home/khushi/Documents/lox.cpp/src/Lox.h:76:51: required from ‘void lox::Lox::run(const std::string&) [with T = double; std::string = std::__cxx11::basic_string]’ /home/khushi/Documents/lox.cpp/src/Lox.h:134:21: required from here /home/khushi/Documents/lox.cpp/src/Scanner.h:272:19: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 272 | if (current + 1 >= source.length()) { | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ In file included from /home/khushi/Documents/lox.cpp/src/Parser.h:4: /home/khushi/Documents/lox.cpp/src/Parser.h: In member function ‘bool lox::parser::Parser::match(const lox::TokenType&, ...) [with T = double]’: /home/khushi/Documents/lox.cpp/src/Parser.h:457:28: warning: ‘lox::TokenType’ is promoted to ‘int’ when passed through ‘...’ 457 | type = va_arg(args, TokenType)) { | ^ /home/khushi/Documents/lox.cpp/src/Parser.h:457:28: note: (so you should pass ‘int’ not ‘lox::TokenType’ to ‘va_arg’) /home/khushi/Documents/lox.cpp/src/Parser.h:457:28: note: if this code is reached, the program will abort [ 55%] Building CXX object CMakeFiles/lox.cpp.dir/src/Resolver.cpp.o /usr/bin/c++ -Dlox_cpp_EXPORTS -I/home/khushi/Documents/lox.cpp/src -std=c++20 -fPIC -Wall -Wno-unused-function -MD -MT CMakeFiles/lox.cpp.dir/src/Resolver.cpp.o -MF CMakeFiles/lox.cpp.dir/src/Resolver.cpp.o.d -o CMakeFiles/lox.cpp.dir/src/Resolver.cpp.o -c /home/khushi/Documents/lox.cpp/src/Resolver.cpp In file included from /home/khushi/Documents/lox.cpp/src/Lox.h:19, from /home/khushi/Documents/lox.cpp/src/Resolver.cpp:9: /home/khushi/Documents/lox.cpp/src/Scanner.h: In member function ‘void lox::Scanner::identifier()’: /home/khushi/Documents/lox.cpp/src/Scanner.h:191:15: warning: NULL used in arithmetic [-Wpointer-arith] 191 | if (type == NULL) { | ^~~~ In file included from /home/khushi/Documents/lox.cpp/src/Interpreter.h:10, from /home/khushi/Documents/lox.cpp/src/Resolver.cpp:8: /home/khushi/Documents/lox.cpp/src/Interpreter.h: In instantiation of ‘class lox::Interpreter’: /home/khushi/Documents/lox.cpp/src/Lox.h:30:30: required from ‘class lox::Lox’ /home/khushi/Documents/lox.cpp/src/Lox.h:134:21: required from here /home/khushi/Documents/lox.cpp/src/Stmt.h:187:13: warning: ‘T lox::stmt::Visitor::visitWhileStmt(const lox::stmt::While&) const [with T = void]’ was hidden [-Woverloaded-virtual=] 187 | virtual T visitWhileStmt(const While& stmt) const = 0; | ^~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:36:8: note: by ‘void lox::Interpreter::visitWhileStmt(const lox::stmt::While&) [with T = double]’ 36 | void visitWhileStmt(const lox::stmt::While& _stmt); | ^~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Stmt.h:186:13: warning: ‘T lox::stmt::Visitor::visitVarStmt(const lox::stmt::Var&) const [with T = void]’ was hidden [-Woverloaded-virtual=] 186 | virtual T visitVarStmt(const Var& stmt) const = 0; | ^~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:35:8: note: by ‘void lox::Interpreter::visitVarStmt(const lox::stmt::Var&) [with T = double]’ 35 | void visitVarStmt(const lox::stmt::Var& _stmt); | ^~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Stmt.h:185:13: warning: ‘T lox::stmt::Visitor::visitReturnStmt(const lox::stmt::Return&) const [with T = void]’ was hidden [-Woverloaded-virtual=] 185 | virtual T visitReturnStmt(const Return& stmt) const = 0; | ^~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:34:8: note: by ‘void lox::Interpreter::visitReturnStmt(const lox::stmt::Return&) [with T = double]’ 34 | void visitReturnStmt(const lox::stmt::Return& _stmt); | ^~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Stmt.h:184:13: warning: ‘T lox::stmt::Visitor::visitPrintStmt(const lox::stmt::Print&) const [with T = void]’ was hidden [-Woverloaded-virtual=] 184 | virtual T visitPrintStmt(const Print& stmt) const = 0; | ^~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:33:8: note: by ‘void lox::Interpreter::visitPrintStmt(const lox::stmt::Print&) [with T = double]’ 33 | void visitPrintStmt(const lox::stmt::Print& _stmt); | ^~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Stmt.h:183:13: warning: ‘T lox::stmt::Visitor::visitIfStmt(const lox::stmt::If&) const [with T = void]’ was hidden [-Woverloaded-virtual=] 183 | virtual T visitIfStmt(const If& stmt) const = 0; | ^~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:32:8: note: by ‘void lox::Interpreter::visitIfStmt(const lox::stmt::If&) [with T = double]’ 32 | void visitIfStmt(const lox::stmt::If& _stmt); | ^~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Stmt.h:182:13: warning: ‘T lox::stmt::Visitor::visitFunctionStmt(const lox::stmt::Function&) const [with T = void]’ was hidden [-Woverloaded-virtual=] 182 | virtual T visitFunctionStmt(const Function& stmt) const = 0; | ^~~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:31:8: note: by ‘void lox::Interpreter::visitFunctionStmt(const lox::stmt::Function&) [with T = double]’ 31 | void visitFunctionStmt(const lox::stmt::Function& _stmt); | ^~~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Stmt.h:181:13: warning: ‘T lox::stmt::Visitor::visitExpressionStmt(const lox::stmt::Expression&) const [with T = void]’ was hidden [-Woverloaded-virtual=] 181 | virtual T visitExpressionStmt(const Expression& stmt) const = 0; | ^~~~~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:30:8: note: by ‘void lox::Interpreter::visitExpressionStmt(const lox::stmt::Expression&) [with T = double]’ 30 | void visitExpressionStmt(const lox::stmt::Expression& _stmt); | ^~~~~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Stmt.h:180:13: warning: ‘T lox::stmt::Visitor::visitClassStmt(const lox::stmt::Class&) const [with T = void]’ was hidden [-Woverloaded-virtual=] 180 | virtual T visitClassStmt(const Class& stmt) const = 0; | ^~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:29:8: note: by ‘void lox::Interpreter::visitClassStmt(const lox::stmt::Class&) [with T = double]’ 29 | void visitClassStmt(const lox::stmt::Class& _stmt); | ^~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Stmt.h:179:13: warning: ‘T lox::stmt::Visitor::visitBlockStmt(const lox::stmt::Block&) const [with T = void]’ was hidden [-Woverloaded-virtual=] 179 | virtual T visitBlockStmt(const Block& stmt) const = 0; | ^~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:28:8: note: by ‘void lox::Interpreter::visitBlockStmt(const lox::stmt::Block&) [with T = double]’ 28 | void visitBlockStmt(const lox::stmt::Block& _stmt); | ^~~~~~~~~~~~~~ In file included from /home/khushi/Documents/lox.cpp/src/Resolver.cpp:7: /home/khushi/Documents/lox.cpp/src/Expr.h:239:13: warning: ‘T lox::expr::Visitor::visitVariableExpr(const lox::expr::Variable&) const [with T = std::variant, std::allocator >, double, bool>]’ was hidden [-Woverloaded-virtual=] 239 | virtual T visitVariableExpr(const Variable& expr) const = 0; | ^~~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:58:10: note: by ‘Object lox::Interpreter::visitVariableExpr(const lox::expr::Variable&) [with T = double; Object = std::variant, std::allocator >, double, bool>]’ 58 | Object visitVariableExpr(const lox::expr::Variable& _expr); | ^~~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Expr.h:238:13: warning: ‘T lox::expr::Visitor::visitUnaryExpr(const lox::expr::Unary&) const [with T = std::variant, std::allocator >, double, bool>]’ was hidden [-Woverloaded-virtual=] 238 | virtual T visitUnaryExpr(const Unary& expr) const = 0; | ^~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:57:10: note: by ‘Object lox::Interpreter::visitUnaryExpr(const lox::expr::Unary&) [with T = double; Object = std::variant, std::allocator >, double, bool>]’ 57 | Object visitUnaryExpr(const lox::expr::Unary& _expr); | ^~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Expr.h:237:13: warning: ‘T lox::expr::Visitor::visitThisExpr(const lox::expr::This&) const [with T = std::variant, std::allocator >, double, bool>]’ was hidden [-Woverloaded-virtual=] 237 | virtual T visitThisExpr(const This& expr) const = 0; | ^~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:56:10: note: by ‘Object lox::Interpreter::visitThisExpr(const lox::expr::This&) [with T = double; Object = std::variant, std::allocator >, double, bool>]’ 56 | Object visitThisExpr(const lox::expr::This& _expr); | ^~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Expr.h:236:13: warning: ‘T lox::expr::Visitor::visitSuperExpr(const lox::expr::Super&) const [with T = std::variant, std::allocator >, double, bool>]’ was hidden [-Woverloaded-virtual=] 236 | virtual T visitSuperExpr(const Super& expr) const = 0; | ^~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:55:10: note: by ‘Object lox::Interpreter::visitSuperExpr(const lox::expr::Super&) [with T = double; Object = std::variant, std::allocator >, double, bool>]’ 55 | Object visitSuperExpr(const lox::expr::Super& _expr); | ^~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Expr.h:235:13: warning: ‘T lox::expr::Visitor::visitSetExpr(const lox::expr::Set&) const [with T = std::variant, std::allocator >, double, bool>]’ was hidden [-Woverloaded-virtual=] 235 | virtual T visitSetExpr(const Set& expr) const = 0; | ^~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:54:10: note: by ‘Object lox::Interpreter::visitSetExpr(const lox::expr::Set&) [with T = double; Object = std::variant, std::allocator >, double, bool>]’ 54 | Object visitSetExpr(const lox::expr::Set& _expr); | ^~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Expr.h:234:13: warning: ‘T lox::expr::Visitor::visitLogicalExpr(const lox::expr::Logical&) const [with T = std::variant, std::allocator >, double, bool>]’ was hidden [-Woverloaded-virtual=] 234 | virtual T visitLogicalExpr(const Logical& expr) const = 0; | ^~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:53:10: note: by ‘Object lox::Interpreter::visitLogicalExpr(const lox::expr::Logical&) [with T = double; Object = std::variant, std::allocator >, double, bool>]’ 53 | Object visitLogicalExpr(const lox::expr::Logical& _expr); | ^~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Expr.h:233:13: warning: ‘T lox::expr::Visitor::visitLiteralExpr(const lox::expr::Literal&) const [with T = std::variant, std::allocator >, double, bool>]’ was hidden [-Woverloaded-virtual=] 233 | virtual T visitLiteralExpr(const Literal& expr) const = 0; | ^~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:52:10: note: by ‘Object lox::Interpreter::visitLiteralExpr(const lox::expr::Literal&) [with T = double; Object = std::variant, std::allocator >, double, bool>]’ 52 | Object visitLiteralExpr(const lox::expr::Literal& _expr); | ^~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Expr.h:232:13: warning: ‘T lox::expr::Visitor::visitGroupingExpr(const lox::expr::Grouping&) const [with T = std::variant, std::allocator >, double, bool>]’ was hidden [-Woverloaded-virtual=] 232 | virtual T visitGroupingExpr(const Grouping& expr) const = 0; | ^~~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:51:10: note: by ‘Object lox::Interpreter::visitGroupingExpr(const lox::expr::Grouping&) [with T = double; Object = std::variant, std::allocator >, double, bool>]’ 51 | Object visitGroupingExpr(const lox::expr::Grouping& _expr); | ^~~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Expr.h:231:13: warning: ‘T lox::expr::Visitor::visitGetExpr(const lox::expr::Get&) const [with T = std::variant, std::allocator >, double, bool>]’ was hidden [-Woverloaded-virtual=] 231 | virtual T visitGetExpr(const Get& expr) const = 0; | ^~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:50:10: note: by ‘Object lox::Interpreter::visitGetExpr(const lox::expr::Get&) [with T = double; Object = std::variant, std::allocator >, double, bool>]’ 50 | Object visitGetExpr(const lox::expr::Get& _expr); | ^~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Expr.h:230:13: warning: ‘T lox::expr::Visitor::visitCallExpr(const lox::expr::Call&) const [with T = std::variant, std::allocator >, double, bool>]’ was hidden [-Woverloaded-virtual=] 230 | virtual T visitCallExpr(const Call& expr) const = 0; | ^~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:49:10: note: by ‘Object lox::Interpreter::visitCallExpr(const lox::expr::Call&) [with T = double; Object = std::variant, std::allocator >, double, bool>]’ 49 | Object visitCallExpr(const lox::expr::Call& _expr); | ^~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Expr.h:229:13: warning: ‘T lox::expr::Visitor::visitBinaryExpr(const lox::expr::Binary&) const [with T = std::variant, std::allocator >, double, bool>]’ was hidden [-Woverloaded-virtual=] 229 | virtual T visitBinaryExpr(const Binary& expr) const = 0; | ^~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:48:10: note: by ‘Object lox::Interpreter::visitBinaryExpr(const lox::expr::Binary&) [with T = double; Object = std::variant, std::allocator >, double, bool>]’ 48 | Object visitBinaryExpr(const lox::expr::Binary& _expr); | ^~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Expr.h:228:13: warning: ‘T lox::expr::Visitor::visitAssignExpr(const lox::expr::Assign&) const [with T = std::variant, std::allocator >, double, bool>]’ was hidden [-Woverloaded-virtual=] 228 | virtual T visitAssignExpr(const Assign& expr) const = 0; | ^~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:47:10: note: by ‘Object lox::Interpreter::visitAssignExpr(const lox::expr::Assign&) [with T = double; Object = std::variant, std::allocator >, double, bool>]’ 47 | Object visitAssignExpr(const lox::expr::Assign& _expr); | ^~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Lox.h: In instantiation of ‘void lox::Lox::run(const std::string&) [with T = double; std::string = std::__cxx11::basic_string]’: /home/khushi/Documents/lox.cpp/src/Lox.h:134:21: required from here /home/khushi/Documents/lox.cpp/src/Lox.h:83:24: warning: variable ‘expression’ set but not used [-Wunused-but-set-variable] 83 | lox::expr::Expr expression = parser.parse(); | ^~~~~~~~~~ In file included from /home/khushi/Documents/lox.cpp/src/Lox.h:16: /home/khushi/Documents/lox.cpp/src/Parser.h: In instantiation of ‘lox::expr::Expr lox::parser::Parser::parse() [with T = double]’: /home/khushi/Documents/lox.cpp/src/Lox.h:83:49: required from ‘void lox::Lox::run(const std::string&) [with T = double; std::string = std::__cxx11::basic_string]’ /home/khushi/Documents/lox.cpp/src/Lox.h:134:21: required from here /home/khushi/Documents/lox.cpp/src/Parser.h:364:23: warning: catching polymorphic type ‘class lox::parser::ParseError’ by value [-Wcatch-value=] 364 | } catch (ParseError error) { | ^~~~~ /home/khushi/Documents/lox.cpp/src/Scanner.h: In instantiation of ‘bool lox::Scanner::isAtEnd() [with T = double]’: /home/khushi/Documents/lox.cpp/src/Scanner.h:87:20: required from ‘std::vector lox::Scanner::scanTokens() [with T = double]’ /home/khushi/Documents/lox.cpp/src/Lox.h:76:51: required from ‘void lox::Lox::run(const std::string&) [with T = double; std::string = std::__cxx11::basic_string]’ /home/khushi/Documents/lox.cpp/src/Lox.h:134:21: required from here /home/khushi/Documents/lox.cpp/src/Scanner.h:299:18: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 299 | return current >= source.length(); | ~~~~~~~~^~~~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Scanner.h: In instantiation of ‘void lox::Scanner::identifier() [with T = double]’: /home/khushi/Documents/lox.cpp/src/Scanner.h:171:21: required from ‘void lox::Scanner::scanToken() [with T = double]’ /home/khushi/Documents/lox.cpp/src/Scanner.h:89:17: required from ‘std::vector lox::Scanner::scanTokens() [with T = double]’ /home/khushi/Documents/lox.cpp/src/Lox.h:76:51: required from ‘void lox::Lox::run(const std::string&) [with T = double; std::string = std::__cxx11::basic_string]’ /home/khushi/Documents/lox.cpp/src/Lox.h:134:21: required from here /home/khushi/Documents/lox.cpp/src/Scanner.h:191:12: warning: NULL used in arithmetic [-Wpointer-arith] 191 | if (type == NULL) { | ^ /home/khushi/Documents/lox.cpp/src/Scanner.h: In instantiation of ‘char lox::Scanner::peekNext() [with T = double]’: /home/khushi/Documents/lox.cpp/src/Scanner.h:207:39: required from ‘void lox::Scanner::number() [with T = double]’ /home/khushi/Documents/lox.cpp/src/Scanner.h:169:21: required from ‘void lox::Scanner::scanToken() [with T = double]’ /home/khushi/Documents/lox.cpp/src/Scanner.h:89:17: required from ‘std::vector lox::Scanner::scanTokens() [with T = double]’ /home/khushi/Documents/lox.cpp/src/Lox.h:76:51: required from ‘void lox::Lox::run(const std::string&) [with T = double; std::string = std::__cxx11::basic_string]’ /home/khushi/Documents/lox.cpp/src/Lox.h:134:21: required from here /home/khushi/Documents/lox.cpp/src/Scanner.h:272:19: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 272 | if (current + 1 >= source.length()) { | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ In file included from /home/khushi/Documents/lox.cpp/src/Parser.h:4: /home/khushi/Documents/lox.cpp/src/Parser.h: In member function ‘bool lox::parser::Parser::match(const lox::TokenType&, ...) [with T = double]’: /home/khushi/Documents/lox.cpp/src/Parser.h:457:28: warning: ‘lox::TokenType’ is promoted to ‘int’ when passed through ‘...’ 457 | type = va_arg(args, TokenType)) { | ^ /home/khushi/Documents/lox.cpp/src/Parser.h:457:28: note: (so you should pass ‘int’ not ‘lox::TokenType’ to ‘va_arg’) /home/khushi/Documents/lox.cpp/src/Parser.h:457:28: note: if this code is reached, the program will abort [ 61%] Building CXX object CMakeFiles/lox.cpp.dir/src/Return.cpp.o /usr/bin/c++ -Dlox_cpp_EXPORTS -I/home/khushi/Documents/lox.cpp/src -std=c++20 -fPIC -Wall -Wno-unused-function -MD -MT CMakeFiles/lox.cpp.dir/src/Return.cpp.o -MF CMakeFiles/lox.cpp.dir/src/Return.cpp.o.d -o CMakeFiles/lox.cpp.dir/src/Return.cpp.o -c /home/khushi/Documents/lox.cpp/src/Return.cpp [ 66%] Building CXX object CMakeFiles/lox.cpp.dir/src/RuntimeError.cpp.o /usr/bin/c++ -Dlox_cpp_EXPORTS -I/home/khushi/Documents/lox.cpp/src -std=c++20 -fPIC -Wall -Wno-unused-function -MD -MT CMakeFiles/lox.cpp.dir/src/RuntimeError.cpp.o -MF CMakeFiles/lox.cpp.dir/src/RuntimeError.cpp.o.d -o CMakeFiles/lox.cpp.dir/src/RuntimeError.cpp.o -c /home/khushi/Documents/lox.cpp/src/RuntimeError.cpp [ 72%] Building CXX object CMakeFiles/lox.cpp.dir/src/Scanner.cpp.o /usr/bin/c++ -Dlox_cpp_EXPORTS -I/home/khushi/Documents/lox.cpp/src -std=c++20 -fPIC -Wall -Wno-unused-function -MD -MT CMakeFiles/lox.cpp.dir/src/Scanner.cpp.o -MF CMakeFiles/lox.cpp.dir/src/Scanner.cpp.o.d -o CMakeFiles/lox.cpp.dir/src/Scanner.cpp.o -c /home/khushi/Documents/lox.cpp/src/Scanner.cpp In file included from /home/khushi/Documents/lox.cpp/src/Lox.h:19, from /home/khushi/Documents/lox.cpp/src/Scanner.cpp:8: /home/khushi/Documents/lox.cpp/src/Scanner.h: In member function ‘void lox::Scanner::identifier()’: /home/khushi/Documents/lox.cpp/src/Scanner.h:191:15: warning: NULL used in arithmetic [-Wpointer-arith] 191 | if (type == NULL) { | ^~~~ In file included from /home/khushi/Documents/lox.cpp/src/ASTPrinter.h:8, from /home/khushi/Documents/lox.cpp/src/Lox.h:13: /home/khushi/Documents/lox.cpp/src/Interpreter.h: In instantiation of ‘class lox::Interpreter’: /home/khushi/Documents/lox.cpp/src/Lox.h:30:30: required from ‘class lox::Lox’ /home/khushi/Documents/lox.cpp/src/Lox.h:134:21: required from here /home/khushi/Documents/lox.cpp/src/Stmt.h:187:13: warning: ‘T lox::stmt::Visitor::visitWhileStmt(const lox::stmt::While&) const [with T = void]’ was hidden [-Woverloaded-virtual=] 187 | virtual T visitWhileStmt(const While& stmt) const = 0; | ^~~~~~~~~~~~~~ In file included from /home/khushi/Documents/lox.cpp/src/Lox.h:15: /home/khushi/Documents/lox.cpp/src/Interpreter.h:36:8: note: by ‘void lox::Interpreter::visitWhileStmt(const lox::stmt::While&) [with T = double]’ 36 | void visitWhileStmt(const lox::stmt::While& _stmt); | ^~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Stmt.h:186:13: warning: ‘T lox::stmt::Visitor::visitVarStmt(const lox::stmt::Var&) const [with T = void]’ was hidden [-Woverloaded-virtual=] 186 | virtual T visitVarStmt(const Var& stmt) const = 0; | ^~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:35:8: note: by ‘void lox::Interpreter::visitVarStmt(const lox::stmt::Var&) [with T = double]’ 35 | void visitVarStmt(const lox::stmt::Var& _stmt); | ^~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Stmt.h:185:13: warning: ‘T lox::stmt::Visitor::visitReturnStmt(const lox::stmt::Return&) const [with T = void]’ was hidden [-Woverloaded-virtual=] 185 | virtual T visitReturnStmt(const Return& stmt) const = 0; | ^~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:34:8: note: by ‘void lox::Interpreter::visitReturnStmt(const lox::stmt::Return&) [with T = double]’ 34 | void visitReturnStmt(const lox::stmt::Return& _stmt); | ^~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Stmt.h:184:13: warning: ‘T lox::stmt::Visitor::visitPrintStmt(const lox::stmt::Print&) const [with T = void]’ was hidden [-Woverloaded-virtual=] 184 | virtual T visitPrintStmt(const Print& stmt) const = 0; | ^~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:33:8: note: by ‘void lox::Interpreter::visitPrintStmt(const lox::stmt::Print&) [with T = double]’ 33 | void visitPrintStmt(const lox::stmt::Print& _stmt); | ^~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Stmt.h:183:13: warning: ‘T lox::stmt::Visitor::visitIfStmt(const lox::stmt::If&) const [with T = void]’ was hidden [-Woverloaded-virtual=] 183 | virtual T visitIfStmt(const If& stmt) const = 0; | ^~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:32:8: note: by ‘void lox::Interpreter::visitIfStmt(const lox::stmt::If&) [with T = double]’ 32 | void visitIfStmt(const lox::stmt::If& _stmt); | ^~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Stmt.h:182:13: warning: ‘T lox::stmt::Visitor::visitFunctionStmt(const lox::stmt::Function&) const [with T = void]’ was hidden [-Woverloaded-virtual=] 182 | virtual T visitFunctionStmt(const Function& stmt) const = 0; | ^~~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:31:8: note: by ‘void lox::Interpreter::visitFunctionStmt(const lox::stmt::Function&) [with T = double]’ 31 | void visitFunctionStmt(const lox::stmt::Function& _stmt); | ^~~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Stmt.h:181:13: warning: ‘T lox::stmt::Visitor::visitExpressionStmt(const lox::stmt::Expression&) const [with T = void]’ was hidden [-Woverloaded-virtual=] 181 | virtual T visitExpressionStmt(const Expression& stmt) const = 0; | ^~~~~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:30:8: note: by ‘void lox::Interpreter::visitExpressionStmt(const lox::stmt::Expression&) [with T = double]’ 30 | void visitExpressionStmt(const lox::stmt::Expression& _stmt); | ^~~~~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Stmt.h:180:13: warning: ‘T lox::stmt::Visitor::visitClassStmt(const lox::stmt::Class&) const [with T = void]’ was hidden [-Woverloaded-virtual=] 180 | virtual T visitClassStmt(const Class& stmt) const = 0; | ^~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:29:8: note: by ‘void lox::Interpreter::visitClassStmt(const lox::stmt::Class&) [with T = double]’ 29 | void visitClassStmt(const lox::stmt::Class& _stmt); | ^~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Stmt.h:179:13: warning: ‘T lox::stmt::Visitor::visitBlockStmt(const lox::stmt::Block&) const [with T = void]’ was hidden [-Woverloaded-virtual=] 179 | virtual T visitBlockStmt(const Block& stmt) const = 0; | ^~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:28:8: note: by ‘void lox::Interpreter::visitBlockStmt(const lox::stmt::Block&) [with T = double]’ 28 | void visitBlockStmt(const lox::stmt::Block& _stmt); | ^~~~~~~~~~~~~~ In file included from /home/khushi/Documents/lox.cpp/src/ASTPrinter.h:7: /home/khushi/Documents/lox.cpp/src/Expr.h:239:13: warning: ‘T lox::expr::Visitor::visitVariableExpr(const lox::expr::Variable&) const [with T = std::variant, std::allocator >, double, bool>]’ was hidden [-Woverloaded-virtual=] 239 | virtual T visitVariableExpr(const Variable& expr) const = 0; | ^~~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:58:10: note: by ‘Object lox::Interpreter::visitVariableExpr(const lox::expr::Variable&) [with T = double; Object = std::variant, std::allocator >, double, bool>]’ 58 | Object visitVariableExpr(const lox::expr::Variable& _expr); | ^~~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Expr.h:238:13: warning: ‘T lox::expr::Visitor::visitUnaryExpr(const lox::expr::Unary&) const [with T = std::variant, std::allocator >, double, bool>]’ was hidden [-Woverloaded-virtual=] 238 | virtual T visitUnaryExpr(const Unary& expr) const = 0; | ^~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:57:10: note: by ‘Object lox::Interpreter::visitUnaryExpr(const lox::expr::Unary&) [with T = double; Object = std::variant, std::allocator >, double, bool>]’ 57 | Object visitUnaryExpr(const lox::expr::Unary& _expr); | ^~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Expr.h:237:13: warning: ‘T lox::expr::Visitor::visitThisExpr(const lox::expr::This&) const [with T = std::variant, std::allocator >, double, bool>]’ was hidden [-Woverloaded-virtual=] 237 | virtual T visitThisExpr(const This& expr) const = 0; | ^~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:56:10: note: by ‘Object lox::Interpreter::visitThisExpr(const lox::expr::This&) [with T = double; Object = std::variant, std::allocator >, double, bool>]’ 56 | Object visitThisExpr(const lox::expr::This& _expr); | ^~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Expr.h:236:13: warning: ‘T lox::expr::Visitor::visitSuperExpr(const lox::expr::Super&) const [with T = std::variant, std::allocator >, double, bool>]’ was hidden [-Woverloaded-virtual=] 236 | virtual T visitSuperExpr(const Super& expr) const = 0; | ^~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:55:10: note: by ‘Object lox::Interpreter::visitSuperExpr(const lox::expr::Super&) [with T = double; Object = std::variant, std::allocator >, double, bool>]’ 55 | Object visitSuperExpr(const lox::expr::Super& _expr); | ^~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Expr.h:235:13: warning: ‘T lox::expr::Visitor::visitSetExpr(const lox::expr::Set&) const [with T = std::variant, std::allocator >, double, bool>]’ was hidden [-Woverloaded-virtual=] 235 | virtual T visitSetExpr(const Set& expr) const = 0; | ^~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:54:10: note: by ‘Object lox::Interpreter::visitSetExpr(const lox::expr::Set&) [with T = double; Object = std::variant, std::allocator >, double, bool>]’ 54 | Object visitSetExpr(const lox::expr::Set& _expr); | ^~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Expr.h:234:13: warning: ‘T lox::expr::Visitor::visitLogicalExpr(const lox::expr::Logical&) const [with T = std::variant, std::allocator >, double, bool>]’ was hidden [-Woverloaded-virtual=] 234 | virtual T visitLogicalExpr(const Logical& expr) const = 0; | ^~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:53:10: note: by ‘Object lox::Interpreter::visitLogicalExpr(const lox::expr::Logical&) [with T = double; Object = std::variant, std::allocator >, double, bool>]’ 53 | Object visitLogicalExpr(const lox::expr::Logical& _expr); | ^~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Expr.h:233:13: warning: ‘T lox::expr::Visitor::visitLiteralExpr(const lox::expr::Literal&) const [with T = std::variant, std::allocator >, double, bool>]’ was hidden [-Woverloaded-virtual=] 233 | virtual T visitLiteralExpr(const Literal& expr) const = 0; | ^~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:52:10: note: by ‘Object lox::Interpreter::visitLiteralExpr(const lox::expr::Literal&) [with T = double; Object = std::variant, std::allocator >, double, bool>]’ 52 | Object visitLiteralExpr(const lox::expr::Literal& _expr); | ^~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Expr.h:232:13: warning: ‘T lox::expr::Visitor::visitGroupingExpr(const lox::expr::Grouping&) const [with T = std::variant, std::allocator >, double, bool>]’ was hidden [-Woverloaded-virtual=] 232 | virtual T visitGroupingExpr(const Grouping& expr) const = 0; | ^~~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:51:10: note: by ‘Object lox::Interpreter::visitGroupingExpr(const lox::expr::Grouping&) [with T = double; Object = std::variant, std::allocator >, double, bool>]’ 51 | Object visitGroupingExpr(const lox::expr::Grouping& _expr); | ^~~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Expr.h:231:13: warning: ‘T lox::expr::Visitor::visitGetExpr(const lox::expr::Get&) const [with T = std::variant, std::allocator >, double, bool>]’ was hidden [-Woverloaded-virtual=] 231 | virtual T visitGetExpr(const Get& expr) const = 0; | ^~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:50:10: note: by ‘Object lox::Interpreter::visitGetExpr(const lox::expr::Get&) [with T = double; Object = std::variant, std::allocator >, double, bool>]’ 50 | Object visitGetExpr(const lox::expr::Get& _expr); | ^~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Expr.h:230:13: warning: ‘T lox::expr::Visitor::visitCallExpr(const lox::expr::Call&) const [with T = std::variant, std::allocator >, double, bool>]’ was hidden [-Woverloaded-virtual=] 230 | virtual T visitCallExpr(const Call& expr) const = 0; | ^~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:49:10: note: by ‘Object lox::Interpreter::visitCallExpr(const lox::expr::Call&) [with T = double; Object = std::variant, std::allocator >, double, bool>]’ 49 | Object visitCallExpr(const lox::expr::Call& _expr); | ^~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Expr.h:229:13: warning: ‘T lox::expr::Visitor::visitBinaryExpr(const lox::expr::Binary&) const [with T = std::variant, std::allocator >, double, bool>]’ was hidden [-Woverloaded-virtual=] 229 | virtual T visitBinaryExpr(const Binary& expr) const = 0; | ^~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:48:10: note: by ‘Object lox::Interpreter::visitBinaryExpr(const lox::expr::Binary&) [with T = double; Object = std::variant, std::allocator >, double, bool>]’ 48 | Object visitBinaryExpr(const lox::expr::Binary& _expr); | ^~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Expr.h:228:13: warning: ‘T lox::expr::Visitor::visitAssignExpr(const lox::expr::Assign&) const [with T = std::variant, std::allocator >, double, bool>]’ was hidden [-Woverloaded-virtual=] 228 | virtual T visitAssignExpr(const Assign& expr) const = 0; | ^~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Interpreter.h:47:10: note: by ‘Object lox::Interpreter::visitAssignExpr(const lox::expr::Assign&) [with T = double; Object = std::variant, std::allocator >, double, bool>]’ 47 | Object visitAssignExpr(const lox::expr::Assign& _expr); | ^~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Lox.h: In instantiation of ‘void lox::Lox::run(const std::string&) [with T = double; std::string = std::__cxx11::basic_string]’: /home/khushi/Documents/lox.cpp/src/Lox.h:134:21: required from here /home/khushi/Documents/lox.cpp/src/Lox.h:83:24: warning: variable ‘expression’ set but not used [-Wunused-but-set-variable] 83 | lox::expr::Expr expression = parser.parse(); | ^~~~~~~~~~ In file included from /home/khushi/Documents/lox.cpp/src/Lox.h:16: /home/khushi/Documents/lox.cpp/src/Parser.h: In instantiation of ‘lox::expr::Expr lox::parser::Parser::parse() [with T = double]’: /home/khushi/Documents/lox.cpp/src/Lox.h:83:49: required from ‘void lox::Lox::run(const std::string&) [with T = double; std::string = std::__cxx11::basic_string]’ /home/khushi/Documents/lox.cpp/src/Lox.h:134:21: required from here /home/khushi/Documents/lox.cpp/src/Parser.h:364:23: warning: catching polymorphic type ‘class lox::parser::ParseError’ by value [-Wcatch-value=] 364 | } catch (ParseError error) { | ^~~~~ /home/khushi/Documents/lox.cpp/src/Scanner.h: In instantiation of ‘bool lox::Scanner::isAtEnd() [with T = double]’: /home/khushi/Documents/lox.cpp/src/Scanner.h:87:20: required from ‘std::vector lox::Scanner::scanTokens() [with T = double]’ /home/khushi/Documents/lox.cpp/src/Lox.h:76:51: required from ‘void lox::Lox::run(const std::string&) [with T = double; std::string = std::__cxx11::basic_string]’ /home/khushi/Documents/lox.cpp/src/Lox.h:134:21: required from here /home/khushi/Documents/lox.cpp/src/Scanner.h:299:18: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 299 | return current >= source.length(); | ~~~~~~~~^~~~~~~~~~~~~~~~~~ /home/khushi/Documents/lox.cpp/src/Scanner.h: In instantiation of ‘void lox::Scanner::identifier() [with T = double]’: /home/khushi/Documents/lox.cpp/src/Scanner.h:171:21: required from ‘void lox::Scanner::scanToken() [with T = double]’ /home/khushi/Documents/lox.cpp/src/Scanner.h:89:17: required from ‘std::vector lox::Scanner::scanTokens() [with T = double]’ /home/khushi/Documents/lox.cpp/src/Lox.h:76:51: required from ‘void lox::Lox::run(const std::string&) [with T = double; std::string = std::__cxx11::basic_string]’ /home/khushi/Documents/lox.cpp/src/Lox.h:134:21: required from here /home/khushi/Documents/lox.cpp/src/Scanner.h:191:12: warning: NULL used in arithmetic [-Wpointer-arith] 191 | if (type == NULL) { | ^ /home/khushi/Documents/lox.cpp/src/Scanner.h: In instantiation of ‘char lox::Scanner::peekNext() [with T = double]’: /home/khushi/Documents/lox.cpp/src/Scanner.h:207:39: required from ‘void lox::Scanner::number() [with T = double]’ /home/khushi/Documents/lox.cpp/src/Scanner.h:169:21: required from ‘void lox::Scanner::scanToken() [with T = double]’ /home/khushi/Documents/lox.cpp/src/Scanner.h:89:17: required from ‘std::vector lox::Scanner::scanTokens() [with T = double]’ /home/khushi/Documents/lox.cpp/src/Lox.h:76:51: required from ‘void lox::Lox::run(const std::string&) [with T = double; std::string = std::__cxx11::basic_string]’ /home/khushi/Documents/lox.cpp/src/Lox.h:134:21: required from here /home/khushi/Documents/lox.cpp/src/Scanner.h:272:19: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 272 | if (current + 1 >= source.length()) { | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ In file included from /home/khushi/Documents/lox.cpp/src/Parser.h:4: /home/khushi/Documents/lox.cpp/src/Parser.h: In member function ‘bool lox::parser::Parser::match(const lox::TokenType&, ...) [with T = double]’: /home/khushi/Documents/lox.cpp/src/Parser.h:457:28: warning: ‘lox::TokenType’ is promoted to ‘int’ when passed through ‘...’ 457 | type = va_arg(args, TokenType)) { | ^ /home/khushi/Documents/lox.cpp/src/Parser.h:457:28: note: (so you should pass ‘int’ not ‘lox::TokenType’ to ‘va_arg’) /home/khushi/Documents/lox.cpp/src/Parser.h:457:28: note: if this code is reached, the program will abort [ 77%] Building CXX object CMakeFiles/lox.cpp.dir/src/Stmt.cpp.o /usr/bin/c++ -Dlox_cpp_EXPORTS -I/home/khushi/Documents/lox.cpp/src -std=c++20 -fPIC -Wall -Wno-unused-function -MD -MT CMakeFiles/lox.cpp.dir/src/Stmt.cpp.o -MF CMakeFiles/lox.cpp.dir/src/Stmt.cpp.o.d -o CMakeFiles/lox.cpp.dir/src/Stmt.cpp.o -c /home/khushi/Documents/lox.cpp/src/Stmt.cpp In file included from /home/khushi/Documents/lox.cpp/src/Stmt.cpp:3: /home/khushi/Documents/lox.cpp/src/Stmt.h: In instantiation of ‘class lox::stmt::Block’: /home/khushi/Documents/lox.cpp/src/Stmt.cpp:230:27: required from here /home/khushi/Documents/lox.cpp/src/Stmt.h:21:16: warning: ‘void lox::stmt::Stmt::accept(const lox::stmt::Visitor&) const [with T = double]’ was hidden [-Woverloaded-virtual=] 21 | virtual void accept(const Visitor& visitor) const = 0; | ^~~~~~ /home/khushi/Documents/lox.cpp/src/Stmt.cpp:17:9: note: by ‘const T lox::stmt::Block::accept(const lox::stmt::Visitor&) const [with T = double]’ 17 | const T lox::stmt::Block::accept(const Visitor& visitor) const { | ^~~ /home/khushi/Documents/lox.cpp/src/Stmt.h: In instantiation of ‘class lox::stmt::Expression’: /home/khushi/Documents/lox.cpp/src/Stmt.cpp:231:27: required from here /home/khushi/Documents/lox.cpp/src/Stmt.h:21:16: warning: ‘void lox::stmt::Stmt::accept(const lox::stmt::Visitor&) const [with T = double]’ was hidden [-Woverloaded-virtual=] 21 | virtual void accept(const Visitor& visitor) const = 0; | ^~~~~~ /home/khushi/Documents/lox.cpp/src/Stmt.cpp:37:9: note: by ‘const T lox::stmt::Expression::accept(const lox::stmt::Visitor&) const [with T = double]’ 37 | const T lox::stmt::Expression::accept(const Visitor& visitor) const { | ^~~ /home/khushi/Documents/lox.cpp/src/Stmt.h: In instantiation of ‘class lox::stmt::Function’: /home/khushi/Documents/lox.cpp/src/Stmt.cpp:232:27: required from here /home/khushi/Documents/lox.cpp/src/Stmt.h:21:16: warning: ‘void lox::stmt::Stmt::accept(const lox::stmt::Visitor&) const [with T = double]’ was hidden [-Woverloaded-virtual=] 21 | virtual void accept(const Visitor& visitor) const = 0; | ^~~~~~ /home/khushi/Documents/lox.cpp/src/Stmt.cpp:59:9: note: by ‘const T lox::stmt::Function::accept(const lox::stmt::Visitor&) const [with T = double]’ 59 | const T lox::stmt::Function::accept(const Visitor& visitor) const { | ^~~ /home/khushi/Documents/lox.cpp/src/Stmt.h: In instantiation of ‘class lox::stmt::Class’: /home/khushi/Documents/lox.cpp/src/Stmt.cpp:233:27: required from here /home/khushi/Documents/lox.cpp/src/Stmt.h:21:16: warning: ‘void lox::stmt::Stmt::accept(const lox::stmt::Visitor&) const [with T = double]’ was hidden [-Woverloaded-virtual=] 21 | virtual void accept(const Visitor& visitor) const = 0; | ^~~~~~ /home/khushi/Documents/lox.cpp/src/Stmt.cpp:75:9: note: by ‘const T lox::stmt::Class::accept(const lox::stmt::Visitor&) const [with T = double]’ 75 | const T lox::stmt::Class::accept(const Visitor& visitor) const { | ^~~ /home/khushi/Documents/lox.cpp/src/Stmt.h: In instantiation of ‘class lox::stmt::If’: /home/khushi/Documents/lox.cpp/src/Stmt.cpp:234:27: required from here /home/khushi/Documents/lox.cpp/src/Stmt.h:21:16: warning: ‘void lox::stmt::Stmt::accept(const lox::stmt::Visitor&) const [with T = double]’ was hidden [-Woverloaded-virtual=] 21 | virtual void accept(const Visitor& visitor) const = 0; | ^~~~~~ /home/khushi/Documents/lox.cpp/src/Stmt.cpp:110:9: note: by ‘const T lox::stmt::If::accept(const lox::stmt::Visitor&) const [with T = double]’ 110 | const T lox::stmt::If::accept(const Visitor& visitor) const { | ^~~ /home/khushi/Documents/lox.cpp/src/Stmt.h: In instantiation of ‘class lox::stmt::Print’: /home/khushi/Documents/lox.cpp/src/Stmt.cpp:235:27: required from here /home/khushi/Documents/lox.cpp/src/Stmt.h:21:16: warning: ‘void lox::stmt::Stmt::accept(const lox::stmt::Visitor&) const [with T = double]’ was hidden [-Woverloaded-virtual=] 21 | virtual void accept(const Visitor& visitor) const = 0; | ^~~~~~ /home/khushi/Documents/lox.cpp/src/Stmt.cpp:141:9: note: by ‘const T lox::stmt::Print::accept(const lox::stmt::Visitor&) const [with T = double]’ 141 | const T lox::stmt::Print::accept(const Visitor& visitor) const { | ^~~ /home/khushi/Documents/lox.cpp/src/Stmt.h: In instantiation of ‘class lox::stmt::Return’: /home/khushi/Documents/lox.cpp/src/Stmt.cpp:236:27: required from here /home/khushi/Documents/lox.cpp/src/Stmt.h:21:16: warning: ‘void lox::stmt::Stmt::accept(const lox::stmt::Visitor&) const [with T = double]’ was hidden [-Woverloaded-virtual=] 21 | virtual void accept(const Visitor& visitor) const = 0; | ^~~~~~ /home/khushi/Documents/lox.cpp/src/Stmt.cpp:162:9: note: by ‘const T lox::stmt::Return::accept(const lox::stmt::Visitor&) const [with T = double]’ 162 | const T lox::stmt::Return::accept(const Visitor& visitor) const { | ^~~ /home/khushi/Documents/lox.cpp/src/Stmt.h: In instantiation of ‘class lox::stmt::Var’: /home/khushi/Documents/lox.cpp/src/Stmt.cpp:237:27: required from here /home/khushi/Documents/lox.cpp/src/Stmt.h:21:16: warning: ‘void lox::stmt::Stmt::accept(const lox::stmt::Visitor&) const [with T = double]’ was hidden [-Woverloaded-virtual=] 21 | virtual void accept(const Visitor& visitor) const = 0; | ^~~~~~ /home/khushi/Documents/lox.cpp/src/Stmt.cpp:187:9: note: by ‘const T lox::stmt::Var::accept(const lox::stmt::Visitor&) const [with T = double]’ 187 | const T lox::stmt::Var::accept(const Visitor& visitor) const { | ^~~ /home/khushi/Documents/lox.cpp/src/Stmt.h: In instantiation of ‘class lox::stmt::While’: /home/khushi/Documents/lox.cpp/src/Stmt.cpp:238:27: required from here /home/khushi/Documents/lox.cpp/src/Stmt.h:21:16: warning: ‘void lox::stmt::Stmt::accept(const lox::stmt::Visitor&) const [with T = double]’ was hidden [-Woverloaded-virtual=] 21 | virtual void accept(const Visitor& visitor) const = 0; | ^~~~~~ /home/khushi/Documents/lox.cpp/src/Stmt.cpp:202:9: note: by ‘const T lox::stmt::While::accept(const lox::stmt::Visitor&) const [with T = double]’ 202 | const T lox::stmt::While::accept(const Visitor& visitor) const { | ^~~ [ 83%] Building CXX object CMakeFiles/lox.cpp.dir/src/Token.cpp.o /usr/bin/c++ -Dlox_cpp_EXPORTS -I/home/khushi/Documents/lox.cpp/src -std=c++20 -fPIC -Wall -Wno-unused-function -MD -MT CMakeFiles/lox.cpp.dir/src/Token.cpp.o -MF CMakeFiles/lox.cpp.dir/src/Token.cpp.o.d -o CMakeFiles/lox.cpp.dir/src/Token.cpp.o -c /home/khushi/Documents/lox.cpp/src/Token.cpp /home/khushi/Documents/lox.cpp/src/Token.cpp: In member function ‘const std::string& lox::Token::to_string() const’: /home/khushi/Documents/lox.cpp/src/Token.cpp:28:36: warning: returning reference to temporary [-Wreturn-local-addr] 28 | return type + " " + lexeme + " " + std::get(literal); | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [ 88%] Linking CXX shared library liblox.cpp.so /home/khushi/anaconda3/envs/_dev/lib/python3.8/site-packages/cmake/data/bin/cmake -E cmake_link_script CMakeFiles/lox.cpp.dir/link.txt --verbose=1 /usr/bin/c++ -fPIC -std=c++20 -shared -Wl,-soname,liblox.cpp.so -o liblox.cpp.so CMakeFiles/lox.cpp.dir/src/ASTPrinter.cpp.o CMakeFiles/lox.cpp.dir/src/Environment.cpp.o CMakeFiles/lox.cpp.dir/src/Expr.cpp.o CMakeFiles/lox.cpp.dir/src/GenerateAST.cpp.o CMakeFiles/lox.cpp.dir/src/Interpreter.cpp.o CMakeFiles/lox.cpp.dir/src/LoxClass.cpp.o CMakeFiles/lox.cpp.dir/src/LoxFunction.cpp.o CMakeFiles/lox.cpp.dir/src/LoxInstance.cpp.o CMakeFiles/lox.cpp.dir/src/Parser.cpp.o CMakeFiles/lox.cpp.dir/src/Resolver.cpp.o CMakeFiles/lox.cpp.dir/src/Return.cpp.o CMakeFiles/lox.cpp.dir/src/RuntimeError.cpp.o CMakeFiles/lox.cpp.dir/src/Scanner.cpp.o CMakeFiles/lox.cpp.dir/src/Stmt.cpp.o CMakeFiles/lox.cpp.dir/src/Token.cpp.o make[2]: Leaving directory '/home/khushi/Documents/lox.cpp/build' [ 88%] Built target lox.cpp make -f CMakeFiles/main.dir/build.make CMakeFiles/main.dir/depend make[2]: Entering directory '/home/khushi/Documents/lox.cpp/build' cd /home/khushi/Documents/lox.cpp/build && /home/khushi/anaconda3/envs/_dev/lib/python3.8/site-packages/cmake/data/bin/cmake -E cmake_depends "Unix Makefiles" /home/khushi/Documents/lox.cpp /home/khushi/Documents/lox.cpp /home/khushi/Documents/lox.cpp/build /home/khushi/Documents/lox.cpp/build /home/khushi/Documents/lox.cpp/build/CMakeFiles/main.dir/DependInfo.cmake "--color=" make[2]: Leaving directory '/home/khushi/Documents/lox.cpp/build' make -f CMakeFiles/main.dir/build.make CMakeFiles/main.dir/build make[2]: Entering directory '/home/khushi/Documents/lox.cpp/build' [ 94%] Building CXX object CMakeFiles/main.dir/src/main.cpp.o /usr/bin/c++ -I/home/khushi/Documents/lox.cpp/src -std=c++20 -MD -MT CMakeFiles/main.dir/src/main.cpp.o -MF CMakeFiles/main.dir/src/main.cpp.o.d -o CMakeFiles/main.dir/src/main.cpp.o -c /home/khushi/Documents/lox.cpp/src/main.cpp In file included from /home/khushi/Documents/lox.cpp/src/Lox.h:19, from /home/khushi/Documents/lox.cpp/src/main.cpp:8: /home/khushi/Documents/lox.cpp/src/Scanner.h: In member function ‘void lox::Scanner::identifier()’: /home/khushi/Documents/lox.cpp/src/Scanner.h:191:15: warning: NULL used in arithmetic [-Wpointer-arith] 191 | if (type == NULL) { | ^~~~ /home/khushi/Documents/lox.cpp/src/Scanner.h: In instantiation of ‘void lox::Scanner::identifier() [with T = double]’: /home/khushi/Documents/lox.cpp/src/Scanner.h:171:21: required from ‘void lox::Scanner::scanToken() [with T = double]’ /home/khushi/Documents/lox.cpp/src/Scanner.h:89:17: required from ‘std::vector lox::Scanner::scanTokens() [with T = double]’ /home/khushi/Documents/lox.cpp/src/Lox.h:76:51: required from ‘void lox::Lox::run(const std::string&) [with T = double; std::string = std::__cxx11::basic_string]’ /home/khushi/Documents/lox.cpp/src/Lox.h:134:21: required from here /home/khushi/Documents/lox.cpp/src/Scanner.h:191:12: warning: NULL used in arithmetic [-Wpointer-arith] 191 | if (type == NULL) { | ^ In file included from /home/khushi/Documents/lox.cpp/src/Parser.h:4, from /home/khushi/Documents/lox.cpp/src/Lox.h:16: /home/khushi/Documents/lox.cpp/src/Parser.h: In member function ‘bool lox::parser::Parser::match(const lox::TokenType&, ...) [with T = double]’: /home/khushi/Documents/lox.cpp/src/Parser.h:457:28: warning: ‘lox::TokenType’ is promoted to ‘int’ when passed through ‘...’ 457 | type = va_arg(args, TokenType)) { | ^ /home/khushi/Documents/lox.cpp/src/Parser.h:457:28: note: (so you should pass ‘int’ not ‘lox::TokenType’ to ‘va_arg’) /home/khushi/Documents/lox.cpp/src/Parser.h:457:28: note: if this code is reached, the program will abort [100%] Linking CXX executable main /home/khushi/anaconda3/envs/_dev/lib/python3.8/site-packages/cmake/data/bin/cmake -E cmake_link_script CMakeFiles/main.dir/link.txt --verbose=1 /usr/bin/c++ -std=c++20 -rdynamic CMakeFiles/main.dir/src/main.cpp.o -o main -Wl,-rpath,/home/khushi/Documents/lox.cpp/build liblox.cpp.so make[2]: Leaving directory '/home/khushi/Documents/lox.cpp/build' [100%] Built target main make[1]: Leaving directory '/home/khushi/Documents/lox.cpp/build' /home/khushi/anaconda3/envs/_dev/lib/python3.8/site-packages/cmake/data/bin/cmake -E cmake_progress_start /home/khushi/Documents/lox.cpp/build/CMakeFiles 0 ```