From f8d3b791b765a1d23f28ee72086a6d0c958d0cca Mon Sep 17 00:00:00 2001 From: Fernando Araoz Date: Sun, 5 Jan 2025 13:01:21 -0500 Subject: [PATCH] feat: readme --- CHANGELOG.md | 3 ++- README.md | 25 +++++++++++++++++++++++++ src/01_lexic/string.zig | 2 ++ 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 README.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c2fd8e..934677c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,7 @@ Now in Zig! - [x] Parse minimal variable binding - [x] Parse minimal statement - [x] Parse minimal module -- [x] Generate error messages +- [x] Generate error messages on number lexing +- [x] Generate error messages on string lexing diff --git a/README.md b/README.md new file mode 100644 index 0000000..8e8f351 --- /dev/null +++ b/README.md @@ -0,0 +1,25 @@ +# The THP programming language + +This is the source code for the THP programming language. +THP stands for "Typed Hypertext Preprocessor", and is a +functional first, strong, nominal, statically typed language +that compiles down to PHP. + +It is completely written in Zig, it is being rewritten from Rust. +There is documentation and a WIP spec at +[https://thp-lang.org](https://thp-lang.org). + +## Install + +This software is nowhere near to be useful. + +This program has exactly 1 dependency: the zig standard library. + +- Install [the Zig programming language](https://ziglang.org/). +- Run `zig build -Doptimize=ReleaseFast` +- The binary will be located at `zig-out/bin/thp` +- Profit + + + + diff --git a/src/01_lexic/string.zig b/src/01_lexic/string.zig index 3dcb2ed..677a247 100644 --- a/src/01_lexic/string.zig +++ b/src/01_lexic/string.zig @@ -193,3 +193,5 @@ test "should fail on newline after backslash" { try std.testing.expect(false); } + +// TODO: test error messages