diff options
-rw-r--r-- | README.md | 8 | ||||
-rw-r--r-- | examples/hello.halk | 5 | ||||
-rw-r--r-- | src/lexer.c | 5 | ||||
-rw-r--r-- | src/main.c | 1 |
4 files changed, 13 insertions, 6 deletions
@@ -1,3 +1,9 @@ # HALK -No. +*HALK* seeks to be a language. + +I seek to fulfill its wishes. + +As of yet, *HALK* is nothing. + +As of yet, we are safe. diff --git a/examples/hello.halk b/examples/hello.halk index da10494..69967a4 100644 --- a/examples/hello.halk +++ b/examples/hello.halk @@ -1,5 +1,6 @@ USE."io"; -message="Hello, World!"; +message._="Hello, World!"; + +io~o.message._; -io~o.message; diff --git a/src/lexer.c b/src/lexer.c index 1f6a9d5..3a5f557 100644 --- a/src/lexer.c +++ b/src/lexer.c @@ -104,7 +104,7 @@ token_T* lexer_get_next_token(lexer_T* lexer) { token_T* lexer_get_string(lexer_T* lexer) { lexer_next(lexer); - char* str_so_far = calloc(1, sizeof(char)); + char* str_so_far = calloc(2, sizeof(char)); str_so_far[0] = '\0'; while (lexer->c != '"') { @@ -120,14 +120,13 @@ token_T* lexer_get_string(lexer_T* lexer) { } token_T* lexer_get_id(lexer_T* lexer) { - // + } token_T* lexer_next_token(lexer_T* lexer, token_T* token) { lexer_next(lexer); return token; - } char* lexer_get_c_as_string(lexer_T* lexer) { @@ -2,5 +2,6 @@ int main(int argc, char* argv[]) { printf("Hello, world."); + return 0; } |