bugfixes & improved language design

This commit is contained in:
Sven Heidemann
2020-05-25 20:32:46 +02:00
parent b9e938f8a1
commit b01204fdd4
6 changed files with 109 additions and 38 deletions

View File

@@ -10,11 +10,14 @@ class Repo:
'class',
'func',
'var',
'use',
'from',
# builtin functions
'output',
'input',
'length',
'range',
'exit',
# normal keywords
'if',
'elseif',
@@ -37,17 +40,9 @@ class Repo:
'emptyType',
'void'
]
self.var_types = [
'any',
'number',
'string',
'bool',
'list',
'dict'
]
self.format_chars = ['{', '}', '(', ')', ';', ':', ',']
self.format_chars = ['{', '}', '(', ')', ';', ':', ',', '.']
self.expr_chars = ['+', '-', '*', '/', '=', '^']
self.bool_expr_chars = ['<', '>', '!', '!=', '==', '>=', '<=']
self.bool_expr_chars = ['<', '>', '!', '!=', '==', '>=', '<=', '&&', '||']
self.bool_values = ['true', 'false']
# runtime