is = new ByteArrayInputStream(text.getBytes("UTF-8"));
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
Assert.fail("UnsupportedEncodingException");
}
HaxeParser parser = createHaxeParser(is);
HaxeParser.statement_return parserResult = parser.statement();
assertEquals(0, parser.getNumberOfSyntaxErrors());
Assert.assertNotNull(parserResult.getTree());
return (HaxeTree) parserResult.getTree();
}