diff options
| author | Mustafa Quraish <[email protected]> | 2022-01-31 01:26:07 -0500 |
|---|---|---|
| committer | Mustafa Quraish <[email protected]> | 2022-01-31 01:26:07 -0500 |
| commit | cb0d77c3dc83d6c7cb39642e8708b12a29b7b8c7 (patch) | |
| tree | 904a6c70509da3f9274bb2df8e214f2b9e6fd9ac /examples/hello.cup | |
| parent | Put tokens in their own macro to allow looping over them (diff) | |
| download | cup-cb0d77c3dc83d6c7cb39642e8708b12a29b7b8c7.tar.xz cup-cb0d77c3dc83d6c7cb39642e8708b12a29b7b8c7.zip | |
Add basic builtin-function support
This isn't really super extendible for now, but it's a start and gives
us the `print` builtin which allows us to finally actually print out
values to the screen, so we can move away from testing with exit codes
eventually.
Diffstat (limited to 'examples/hello.cup')
| -rw-r--r-- | examples/hello.cup | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/examples/hello.cup b/examples/hello.cup new file mode 100644 index 0000000..eef63eb --- /dev/null +++ b/examples/hello.cup @@ -0,0 +1,17 @@ + +fn main(): int { + putc(72); + putc(101); + putc(108); + putc(108); + putc(111); + putc(44); + putc(32); + putc(87); + putc(111); + putc(114); + putc(108); + putc(100); + putc(33); + putc(10); +} |