main.bc updated, added Lbl/Goto to lexer.py

This commit is contained in:
KikooDX 2020-05-08 11:29:52 +02:00
parent a4683c3f72
commit e5b0c6c44c
2 changed files with 18 additions and 8 deletions

View File

@ -22,6 +22,8 @@ reserved = {
'List': 'LIST',
'Mat': 'MAT',
'Str': 'STR',
'Lbl': 'LBL',
'Goto': 'GOTO',
}
literals = '+-*/%(){}[]=,'

24
main.bc
View File

@ -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