GetEvalValue returns the parameters of function eval.
(s string)
| 268 | |
| 269 | // GetEvalValue returns the parameters of function eval. |
| 270 | func GetEvalValue(s string) []string { |
| 271 | subMatch := evalReg.FindAllStringSubmatch(s, -1) |
| 272 | var rules []string |
| 273 | for _, rule := range subMatch { |
| 274 | rules = append(rules, rule[1]) |
| 275 | } |
| 276 | return rules |
| 277 | } |
| 278 | |
| 279 | // EscapeStringLiterals escapes backslashes in string literals within an expression |
| 280 | // to ensure consistent handling between govaluate (which interprets escape sequences) |
no outgoing calls
searching dependent graphs…