summaryrefslogtreecommitdiff
path: root/src/texec/libtnsl.go
diff options
context:
space:
mode:
authorKyle Gunger <kgunger12@gmail.com>2022-12-23 03:35:43 -0500
committerKyle Gunger <kgunger12@gmail.com>2022-12-23 03:35:43 -0500
commit3192b9ace7a5c653d81a42e4d5cd437e6d81fbe1 (patch)
tree4091bb94413f88d3b4ea7c6a36e20f8ee7a631c3 /src/texec/libtnsl.go
parent0f1faa877167324c52f2626cebe335a85cae40d9 (diff)
Remove charp in favor of uint8master
Diffstat (limited to 'src/texec/libtnsl.go')
-rw-r--r--src/texec/libtnsl.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/texec/libtnsl.go b/src/texec/libtnsl.go
index 91d65ae..3072cdd 100644
--- a/src/texec/libtnsl.go
+++ b/src/texec/libtnsl.go
@@ -45,13 +45,11 @@ import (
var (
tFile = TType{Pre: []string{}, T: TArtifact{Path: []string{"tnsl", "io"}, Name: "File"}, Post: ""}
- tString = TType{Pre: []string{"{}"}, T: TArtifact{Path: []string{}, Name:"charp"}, Post: ""}
+ tString = TType{Pre: []string{"{}"}, T: TArtifact{Path: []string{}, Name:"uint8"}, Post: ""}
tInt = TType{Pre: []string{}, T: TArtifact{Path: []string{}, Name:"int"}, Post: ""}
tUint = TType{Pre: []string{}, T: TArtifact{Path: []string{}, Name:"uint"}, Post: ""}
tByte = TType{Pre: []string{}, T: TArtifact{Path: []string{}, Name:"uint8"}, Post: ""}
- tByteArray = TType{Pre: []string{"{}"}, T: TArtifact{Path: []string{}, Name:"uint8"}, Post: ""}
tFloat = TType{Pre: []string{}, T: TArtifact{Path: []string{}, Name:"float"}, Post: ""}
- tCharp = TType{Pre: []string{}, T: TArtifact{Path: []string{}, Name:"charp"}, Post: ""}
tNull = TType{Pre: []string{}, T: TArtifact{Path: []string{}, Name: "null"}, Post: ""}
tBool = TType{Pre: []string{}, T: TArtifact{Path: []string{}, Name: "bool"}, Post: ""}
@@ -188,11 +186,11 @@ func tfile_read(file TVariable) TVariable {
// tnsl.io.File.write
func tfile_write(file, in TVariable) {
if equateType(file.Type, tFile) {
- if equateType(in.Type, tCharp) || equateType(in.Type, tByte) {
+ if equateType(in.Type, tByte) {
b := []byte{0}
b[0] = (in.Data).(byte)
(file.Data).(*os.File).Write(b)
- } else if equateType(in.Type, tByteArray) || equateType(in.Type, tString) {
+ } else if equateType(in.Type, tString) {
dat := (in.Data).([]interface{})
wrt := []byte{}
for i := 0; i < len(dat); i++ {