diff options
author | Sébastien Dailly <sebastien@dailly.me> | 2024-12-26 21:29:46 +0100 |
---|---|---|
committer | Sébastien Dailly <sebastien@dailly.me> | 2024-12-26 21:29:46 +0100 |
commit | 6883d69e0f8eb0e67928ad2cfc92bf0792f948c9 (patch) | |
tree | bb3bf5c8b4237a7d08f3b3625d2f18b47733a768 /lib/configuration | |
parent | d9022188b6391728a4112b3e632744fb3a548569 (diff) |
Removed some code from the parser and moved it into the Expression.T module
Diffstat (limited to 'lib/configuration')
-rw-r--r-- | lib/configuration/expression_parser.mly | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/lib/configuration/expression_parser.mly b/lib/configuration/expression_parser.mly index 54f3bfe..18b79c8 100644 --- a/lib/configuration/expression_parser.mly +++ b/lib/configuration/expression_parser.mly @@ -22,27 +22,6 @@ %right INEQUALITY_OPERATOR EQUALITY_OPERATOR %right CONCAT_OPERATOR BINARY_OPERATOR -%{ - - let function_of_name param f = - match (String.lowercase_ascii f, param) with - | "nvl", _ -> - ImportExpression.T.Nvl param - | "join", (ImportExpression.T.Literal sep:: tl) -> - ImportExpression.T.Join (sep, tl) - | "join", (ImportExpression.T.Empty:: tl) -> - ImportExpression.T.Join ("", tl) - | "upper", _ -> - ImportExpression.T.Function' (ImportExpression.T.Upper, param) - | "trim", _ -> - ImportExpression.T.Function' (ImportExpression.T.Trim, param) - | "cmp", _ -> - ImportExpression.T.Function' (ImportExpression.T.Cmp, param) - | other, _ -> - ImportExpression.T.Function (other, param) - -%} - %% path_expr: @@ -146,7 +125,7 @@ expr_(PATH, ENDING_PHANTOM): { f } | s = IDENT args = arguments(PATH) - { function_of_name args s } + { ImportExpression.T.function_of_name args s } | s = IDENT L_PAREN |