*
* @param chameleon the node to parse.
* @return the parsed contents of the node.
*/
public ASTNode parseContents(ASTNode chameleon) {
final PeerFactory factory = PeerFactory.getInstance();
final PsiElement parentElement = chameleon.getTreeParent().getPsi();
final Project project = parentElement.getManager().getProject();
final LanguageDialect langDialect = parentElement.getContainingFile().getLanguageDialect();
final PsiBuilder builder = factory.createBuilder(
chameleon,
null,
langDialect != null ? langDialect:getLanguage(),
chameleon.getText(),
project