fix: string parse and update sample

This commit is contained in:
Eatswap 2022-12-14 01:21:18 +08:00
parent d71ca134f2
commit ef9e1f0731
Signed by: Eatswap
GPG Key ID: BE661106A1F3FA0B
2 changed files with 3 additions and 2 deletions

View File

@ -35,7 +35,7 @@ int [+-]?(0[xX][0-9A-Fa-f]*|0[0-7]*|[1-9][0-9]*)
id [a-zA-Z_][a-zA-Z_0-9]* id [a-zA-Z_][a-zA-Z_0-9]*
blank [ \t\v\r] blank [ \t\v\r]
comment ;[^\n\r]* comment ;[^\n\r]*
string \"[^\r\n]*\" string \"(?:[^\"\\]|\\.)*\"
and [aA][nN][dD] and [aA][nN][dD]
or [oO][rR] or [oO][rR]

View File

@ -44,7 +44,8 @@
(print (+ 1 2 3 4 5)) ; prints 15 (print (+ 1 2 3 4 5)) ; prints 15
(print "Hello, world!") ; prints Hello, world! (print "Hello,
wo\n\"r\"ld!") ; prints Hello,(newline here) wo\n\"r\"ld!
(defvar lower_bound 1) (defvar lower_bound 1)
(loop (loop