Commit Graph

9 Commits

Author SHA1 Message Date
Bob Nystrom
93839b588a fix: add parentheses to method calls in delta_blue benchmark for idiomatic Wren syntax 2015-12-01 04:58:08 +00:00
Bob Nystrom
920b3e2a32 feat: implement string interpolation with %(expr) syntax in compiler and core library
Add lexer support for `TOKEN_INTERPOLATION` to split string literals at interpolation points, introduce `MAX_INTERPOLATION_NESTING` limit of 8, and compile interpolated strings by emitting calls to `String.interpolate_()`. Optimize list and map literal construction with new `addCore_` primitives to reduce stack churn. Update `String`, `List`, and `Map` `toString` methods in core library to use interpolation syntax, and migrate all benchmark and test files from explicit concatenation to interpolated strings.
2015-11-11 15:55:48 +00:00
Bob Nystrom
aa72900a9e feat: replace IO class with System class and remove separate IO module
- Delete wren_io.c, wren_io.h, and io.wren source files
- Remove multi-arity print overloads and IO.read/IO.time methods
- Add System class with print, printAll, write, writeAll methods to core.wren
- Update all documentation examples and README to use System.print instead of IO.print
2015-09-15 14:46:09 +00:00
Bob Nystrom
ca8e97521a feat: add Alexander Roper to AUTHORS and expand embedding API documentation
- Add Alexander Roper to AUTHORS file with newline fix for Starbeamrainbowlabs entry
- Replace placeholder embedding API docs with full guide covering static/dynamic linking and source inclusion
- Update codebase line count from 5,000 to 7,000 lines in README and index
- Fix relative documentation links to absolute URLs in README
- Add CSS styling for preprocessor directive syntax highlighting
- Update Xcode project file references and CopyFiles build phase UUID
- Adjust delta_blue benchmark expected value from 7032700 to 14065400
- Improve markdown header detection regex in generate_docs.py to avoid matching #include
- Refactor metrics.py to exclude curly brace lines from code line counting
- Add TEST_HEADERS dependency to test object compilation in wren.mk
- Remove NULL parameter from runFile call in main.c
- Refactor vm.c to support WrenBindForeignClassFn callback and rename externalBindForeign to bindMethodFn
- Update vm.h to remove bindForeign parameter documentation and adjust runFile signature
2015-08-29 06:13:56 +00:00
Bob Nystrom
f95436f640 refactor: move libuv download to deps/ and build per-arch static libs
Move libuv download location from build/ to deps/ so that make clean does not
remove the downloaded source. Introduce per-architecture libuv static library
naming (build/libuv-32.a, build/libuv-64.a) and pass arch parameter through
build_libuv_linux and build_libuv functions. Add cleanall target to remove
deps/ separately from build artifacts.
2015-08-29 02:31:03 +00:00
Bob Nystrom
bd0957dc48 fix: double delta_blue benchmark iterations and update expected result
The delta_blue benchmark was updated to run 40 iterations instead of 20 in both the Python and Wren implementations, and the expected benchmark result was adjusted from 7032700 to 14065400 to match the doubled workload. Additionally, the Wren source was cleaned up by removing forward declaration placeholders for global variables and converting them to proper `var` declarations with immediate initialization.
2015-08-27 13:25:24 +00:00
Bob Nystrom
7d9e45e906 feat: replace 'this' keyword with 'construct' for constructor definitions across core lib, compiler, docs, and tests
Add TOKEN_CONSTRUCT as a new reserved word in the Wren compiler lexer and parser, and update the grammar rule table so that 'construct' triggers a constructor signature instead of 'this'. Modify all built-in class definitions in core.wren, wren_core.c, benchmark files, and test fixtures to use 'construct new(...)' and 'construct named(...)' syntax. Update documentation in classes.markdown and syntax.markdown to reflect the new keyword, and remove the deprecated test files for 'new' and infix class expressions.
2015-07-21 14:24:53 +00:00
Bob Nystrom
e19ff59cce feat: replace new keyword with this constructor syntax and ClassName.new() calls across core library and docs
Replace all uses of the `new` reserved word with explicit `this new()` constructor definitions and `ClassName.new()` instantiation calls in builtin/core.wren. Update all documentation files (classes.markdown, fiber.markdown, fn.markdown, sequence.markdown, error-handling.markdown, expressions.markdown, fibers.markdown, functions.markdown) to reflect the new constructor syntax, removing `new` keyword examples and replacing them with `ClassName.new()` patterns and `this new()` definitions.
2015-07-10 16:18:22 +00:00
Bob Nystrom
c4ef964f92 refactor: move benchmark directory under test and update all references
The benchmark directory is relocated from the project root into the test directory, and all scripts, documentation links, and gitignore paths are updated accordingly. The test runner is also refactored to explicitly walk subdirectories (core, io, language, limit) instead of using a single test root, and a new test/README.md is added to document the test suite structure. Additionally, the constructor test for the Foo class is updated to add a zero-arity constructor and adjust expected output strings.
2015-03-14 19:45:56 +00:00