master
結愛すみか 8 months ago
parent 70fa77e966
commit e3ef5ed7b1

@ -82,7 +82,7 @@ def evaluate(query : str):
return tuple(evaluate(q) for q in query)
query = re.sub(r'//[^\n]*', '', query)
query = re.sub(r'(\$?[\d\w_]+)[\s\r\n]*:', r'"\1" :', query)
query = re.sub(r'[\r\n]|.\s*pretty\s*\(\s*\)|.\s*sort\s*\([^\)]*\)', '', query).strip()
query = re.sub(r'[\r\n]|.\s*(pretty|toArray)\s*\(\s*\)|.\s*sort\s*\([^\)]*\)', '', query).strip()
if not query: return [None] * 2
query = re.sub(r'.\s*aggregate\s*\(\s*([^\[^\s][^\)]*)\)', r'.aggregate([\1])', query)

Loading…
Cancel
Save