be more benevolent on symbol names

This commit is contained in:
VaclavT 2021-09-16 23:59:49 +02:00
parent 8e94a01d2d
commit 8b78ff87c9
2 changed files with 6 additions and 1 deletions

View File

@ -13,7 +13,12 @@
(print (usql "select to_string(datetime, '%d.%m.%Y %H:%M:%S'), symbol, prev_close, open, price, change, change_prct from prices"))
(define var "promena var")
(define var2 "promena var2")
(print var)
(print var2)
(print (+ "select min(adjClose), max(adjClose) from history_prices where symbol = '" var "'"))
;; (print (usql "create table data (ticker varchar(8), price float null)"))
;; (usql "load data from '/Users/vaclavt/Library/Mobile Documents/com~apple~CloudDocs/Development/usql/data.csv')")

2
ml.cpp
View File

@ -853,7 +853,7 @@ MlValue parse(std::string &s, int &ptr) {
} else if (is_symbol(s[ptr])) {
// If this is a string
int n = 0;
while (is_symbol(s[ptr + n])) {
while (is_symbol(s[ptr + n]) || isdigit(s[ptr + n])) {
n++;
}