bugfix: variable name and function name could have _

This commit is contained in:
debugtalk
2017-07-20 12:24:44 +08:00
parent 31c73d036e
commit a5bb50e32d

View File

@@ -16,8 +16,8 @@ except NameError:
string_type = str
PYTHON_VERSION = 3
variable_regexp = re.compile(r"^\$(\w+)$")
function_regexp = re.compile(r"^\$\{(\w+)\(([\$\w =,]*)\)\}$")
variable_regexp = re.compile(r"^\$([\w_]+)$")
function_regexp = re.compile(r"^\$\{([\w_]+)\(([\$\w_ =,]*)\)\}$")
def gen_random_string(str_len):
return ''.join(