feat: add async/await keywords, Num/String extensions, and Jinja markdown example
Add `async` and `await` token support to the Wren compiler with scheduler resolution logic, extend `Num` with `e` constant, hyperbolic trig, base conversion, and new methods (`isZero`, `gcd`, `lcm`, `digits`, etc.), extend `String` with `lower`, `upper`, `capitalize`, `title`, and regenerate `wren_core.wren.inc`. Include `Makefile` for multi-platform builds, rewrite `README.md` with updated build instructions, and add `example/await_demo.wren` and `example/jinja_markdown.wren` demonstrating new features.
This commit is contained in:
Vendored
+21
@@ -0,0 +1,21 @@
|
||||
// retoor <retoor@molodetz.nl>
|
||||
|
||||
import "tempfile" for TempFile
|
||||
import "io" for File
|
||||
import "pathlib" for Path
|
||||
|
||||
var path = TempFile.mkstemp()
|
||||
System.print(path is String) // expect: true
|
||||
System.print(Path.new(path).exists()) // expect: true
|
||||
|
||||
File.delete(path)
|
||||
System.print(Path.new(path).exists()) // expect: false
|
||||
|
||||
var path2 = TempFile.mkstemp(".txt")
|
||||
System.print(path2.endsWith(".txt")) // expect: true
|
||||
File.delete(path2)
|
||||
|
||||
var path3 = TempFile.mkstemp(".dat", "test_")
|
||||
System.print(path3.contains("test_")) // expect: true
|
||||
System.print(path3.endsWith(".dat")) // expect: true
|
||||
File.delete(path3)
|
||||
Reference in New Issue
Block a user