Add BlockStack.Len() for convenience

This commit is contained in:
Christian Muehlhaeuser
2019-12-08 13:52:22 +01:00
parent ad5343d395
commit b4c77e8101
2 changed files with 6 additions and 2 deletions
+4
View File
@@ -11,6 +11,10 @@ type BlockElement struct {
type BlockStack []BlockElement
func (s *BlockStack) Len() int {
return len(*s)
}
func (s *BlockStack) Push(e BlockElement) {
*s = append(*s, e)
}