diff options
| author | Chimrod <> | 2023-11-13 10:12:42 +0100 | 
|---|---|---|
| committer | Chimrod <> | 2023-11-13 11:54:49 +0100 | 
| commit | 4ec7f0b73f8aa43eccf387bdec55fc464d809896 (patch) | |
| tree | 9cf31bee4b23e4d48bdbd33bee49f2c25a6334a7 /test | |
| parent | 0d5bcaea3370697822675d9f8d25bca34c02505e (diff) | |
Simplified the representation of expressions in strings
Diffstat (limited to 'test')
| -rw-r--r-- | test/literals.ml | 38 | ||||
| -rw-r--r-- | test/syntax_error.ml | 6 | 
2 files changed, 19 insertions, 25 deletions
| diff --git a/test/literals.ml b/test/literals.ml index 6070f86..8f5a56e 100644 --- a/test/literals.ml +++ b/test/literals.ml @@ -13,7 +13,7 @@ let result =        (Tree.Ast.Literal           ( _position,             [ -             T.Expression [ Tree.Ast.Literal (_position, [ T.Text "key" ]) ]; +             T.Expression (Tree.Ast.Literal (_position, [ T.Text "key" ]));               T.Text "";             ] ));    ] @@ -71,25 +71,23 @@ let expression () =             ( _position,               [                 T.Expression -                 [ -                   Tree.Ast.Function -                     ( _position, -                       T.Iif, -                       [ -                         Tree.Ast.BinaryOp -                           ( _position, -                             T.Eq, -                             Tree.Ast.Ident -                               { -                                 Tree.Ast.pos = _position; -                                 name = "VAR"; -                                 index = None; -                               }, -                             Tree.Ast.Integer (_position, "0") ); -                         Tree.Ast.Integer (_position, "1"); -                         Tree.Ast.Integer (_position, "0"); -                       ] ); -                 ]; +                 (Tree.Ast.Function +                    ( _position, +                      T.Iif, +                      [ +                        Tree.Ast.BinaryOp +                          ( _position, +                            T.Eq, +                            Tree.Ast.Ident +                              { +                                Tree.Ast.pos = _position; +                                name = "VAR"; +                                index = None; +                              }, +                            Tree.Ast.Integer (_position, "0") ); +                        Tree.Ast.Integer (_position, "1"); +                        Tree.Ast.Integer (_position, "0"); +                      ] ));                 T.Text "";               ] ));      ] diff --git a/test/syntax_error.ml b/test/syntax_error.ml index b56d3f2..08de384 100644 --- a/test/syntax_error.ml +++ b/test/syntax_error.ml @@ -106,11 +106,7 @@ let missing_operand () =  let unknow_function () =    _test_instruction "a = ran(1, 2)" -    { -      level = Error; -      loc = _position; -      message = "Missing separator between instructions"; -    } +    { level = Error; loc = _position; message = "Unexpected expression here." }  let inline_elif () =    _test_instruction {| | 
