From e5b0c6c44ce3325e14dc0c167342119667da1f84 Mon Sep 17 00:00:00 2001 From: KikooDX Date: Fri, 8 May 2020 11:29:52 +0200 Subject: [PATCH] main.bc updated, added Lbl/Goto to lexer.py --- lexer.py | 2 ++ main.bc | 24 ++++++++++++++++-------- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/lexer.py b/lexer.py index 121307e..52abb85 100644 --- a/lexer.py +++ b/lexer.py @@ -22,6 +22,8 @@ reserved = { 'List': 'LIST', 'Mat': 'MAT', 'Str': 'STR', + 'Lbl': 'LBL', + 'Goto': 'GOTO', } literals = '+-*/%(){}[]=,' diff --git a/main.bc b/main.bc index 777be40..9e81392 100644 --- a/main.bc +++ b/main.bc @@ -1,8 +1,16 @@ -List 1 = {-53, 8, 9} -For I = 1 to 5 - Locate(1, 1, "\"Bonsoir Paris\" !") - Locate(1, 2, 'Ah oui on peut faire ça aussi "coucou"') - Locate(1, 3, "2+2=5") -Next //a test -//another one Locate -If I == 5 Or Not 0 Then Locate(21, 7, "Y") IfEnd +List stats_joueur +Str nom_joueur +Var xp +Var x(X), y(Y) +Var key +Var play +Mat map + +x = 11 +y = 4 +play = 1 #true + +While(play) + key = Getkey() + If key == KEY_EXIT Then play = 0 IfEnd +WhileEnd