From 2ec32dac56b544bc4851a3efddf75ee5fd9314ed Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Sat, 17 Dec 2022 10:56:18 -0500 Subject: Change charp to uint8 + Change charp to uint8 + Start value abstraction --- tnslc/parse/parse.tnsl | 6 +++--- tnslc/parse/token.tnsl | 36 ++++++++++++++++++------------------ 2 files changed, 21 insertions(+), 21 deletions(-) (limited to 'tnslc/parse') diff --git a/tnslc/parse/parse.tnsl b/tnslc/parse/parse.tnsl index 5fb1a18..8919c3a 100644 --- a/tnslc/parse/parse.tnsl +++ b/tnslc/parse/parse.tnsl @@ -19,7 +19,7 @@ :include "parse/tokenizer.tnsl" ;/ -/; create_panic ({}charp err) +/; create_panic ({}uint8 err) ;tnsl.io.println("ABOUT TO INDUCE PANIC... STAND BY") ;tnsl.io.print("Error code given: ") ;tnsl.io.println(err) @@ -47,7 +47,7 @@ line, col, - ~{}charp + ~{}uint8 data } @@ -69,7 +69,7 @@ ;delete self.data ;/ - /; add_char (~{}charp part) + /; add_char (~{}uint8 part) # ;uint l = len self.data` # ;realloc self.data, l + len part /; loop (int i = 0; i < len part`) [i++] diff --git a/tnslc/parse/token.tnsl b/tnslc/parse/token.tnsl index c2c3d89..fecc7f7 100644 --- a/tnslc/parse/token.tnsl +++ b/tnslc/parse/token.tnsl @@ -19,7 +19,7 @@ helper funcs for checking their token types. #/ -;{}{}charp PREWORDS = { +;{}{}uint8 PREWORDS = { "include", "define", "extern", @@ -32,7 +32,7 @@ "abi" } -;{}{}charp KEYTYPES = { +;{}{}uint8 KEYTYPES = { "int8", "int16", "int32", @@ -54,7 +54,7 @@ "type" } -;{}{}charp KEYWORDS = { +;{}{}uint8 KEYWORDS = { "struct", "interface", "enum", @@ -96,7 +96,7 @@ "export" } -;{}{}charp LITERALS = { +;{}{}uint8 LITERALS = { "true", "false", @@ -106,14 +106,14 @@ "super" } -;{}charp RESERVED = "`~!#%^&*()-=+[]{}|;:,.<>/" +;{}uint8 RESERVED = "`~!#%^&*()-=+[]{}|;:,.<>/" -;{}charp DELIMITS = "()[]{}" -;{}charp LINESEPS = ";:#" -;{}charp INLNSEPS = "," -;{}charp AUGMENTS = "~`.&|^> 1) -- cgit v1.2.3