Fixed issue #351.
Used 'getGrammar' in the translation of the 'asType' expression.