Skip to content

Commit

Permalink
Added test cases for index expression and documented string
Browse files Browse the repository at this point in the history
Signed-off-by: Vishal <[email protected]>
  • Loading branch information
Vishalk91-4 committed Jun 28, 2024
1 parent 1ecac67 commit a9e20d4
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/corpus/expr.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,22 @@ unary expression
(unary_operator
(integer)))

================================================================================
Index expression
================================================================================

"abc"[1]

--------------------------------------------------------------------------------

(module
(subscript
(string
(string_start)
(string_content)
(string_end))
(integer)))

================================================================================
slice expression
================================================================================
Expand Down
31 changes: 31 additions & 0 deletions test/corpus/literal.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,37 @@ r"Hi\nHello"
(string_content)
(string_end)))

================================================================================
Documented String
================================================================================

schema Person:
"""
Person schema doc string
"""

name: str = "Alice"

--------------------------------------------------------------------------------

(module
(schema_statement
(identifier)
(block
(string
(string_start)
(string_content)
(string_end))
(assignment
(dotted_name
(identifier))
(type
(basic_type))
(string
(string_start)
(string_content)
(string_end))))))

================================================================================
number
================================================================================
Expand Down

0 comments on commit a9e20d4

Please sign in to comment.