ParseCheck parses input expression and checks its types. Also, it applies all provided patchers. In case of error, it returns error with a tree.
(input string, config *conf.Config)
| 32 | // ParseCheck parses input expression and checks its types. Also, it applies |
| 33 | // all provided patchers. In case of error, it returns error with a tree. |
| 34 | func ParseCheck(input string, config *conf.Config) (*parser.Tree, error) { |
| 35 | tree, err := parser.ParseWithConfig(input, config) |
| 36 | if err != nil { |
| 37 | return tree, err |
| 38 | } |
| 39 | |
| 40 | _, err = new(Checker).PatchAndCheck(tree, config) |
| 41 | if err != nil { |
| 42 | return tree, err |
| 43 | } |
| 44 | |
| 45 | return tree, nil |
| 46 | } |
| 47 | |
| 48 | // Check calls Check on a disposable Checker. |
| 49 | func Check(tree *parser.Tree, config *conf.Config) (reflect.Type, error) { |
searching dependent graphs…