Skip to content

Commit

Permalink
test: Class declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
obiwac committed Aug 31, 2024
1 parent da608d4 commit 4442470
Showing 1 changed file with 101 additions and 0 deletions.
101 changes: 101 additions & 0 deletions test/corpus/class_declaration.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
===
Class declaration
===

class EmptyClass {
}

class SomeFunctions {
fn a {
print "in a"
}

fn b {
print "in b"
}
}

class SingleFunction fn a {
print "in single function a"
}

---

(source_file
(statement
(class_declaration
(identifier)
(statement
(block)
)
)
)
(statement
(class_declaration
(identifier)
(statement
(block
(statement
(function_declaration
(identifier)
(statement
(block
(statement
(print
(expression
(literal
(string)
)
)
)
)
)
)
)
)
(statement
(function_declaration
(identifier)
(statement
(block
(statement
(print
(expression
(literal
(string)
)
)
)
)
)
)
)
)
)
)
)
)
(statement
(class_declaration
(identifier)
(statement
(function_declaration
(identifier)
(statement
(block
(statement
(print
(expression
(literal
(string)
)
)
)
)
)
)
)
)
)
)
)

0 comments on commit 4442470

Please sign in to comment.