Fixes broken span statement.

Adds a proper class and closer.
Merge pull request #7402 from PsiOmegaDelta/BrokenSpan

Fixes broken span statement.