98d6bbbcc17bc72bae121b3777c778fc4dae152b
this keyword support with method detection and error handling
Introduce TOKEN_THIS token and `this` keyword parsing in the compiler, enabling the `this` expression for method contexts. Add `isMethod` flag to Compiler struct to track whether the current function is a method, and pass it through `initCompiler`. Implement `this_` parsing function that emits appropriate bytecode or errors when used outside a method. Remove the now-unnecessary `numLocals` field from ObjFn struct in vm.h. Add test cases for `this` at top level (expects error), in a method (valid usage), in a top-level function (expects error), and as a variable name (expects error).
Description
Highly customized version of the wren programming language. It has all the modules that you would expect in a std library including http, websockets, sqlite3 and jinja-like templating engine. The idea is to make it suitable for web development.
22 MiB
Languages
HTML
50%
C
22.2%
PHP
13.4%
C++
6%
Makefile
2.9%
Other
5.5%