Beispiel #1
0
        private void doTestInteger(int expectedValue)
        {
            CSTNode node = parseOK(expectedValue.ToString(CultureInfo.InvariantCulture), this.getCurrentMethodName());

            Assert.IsTrue(node is CSTIntegerLiteralExpCS);
            CSTIntegerLiteralExpCS literalExp = (CSTIntegerLiteralExpCS)node;

            Assert.IsNotNull(literalExp.getAst());
            Assert.IsTrue(literalExp.getAst() is IntegerLiteralExp);
            IntegerLiteralExp ast = (IntegerLiteralExp)literalExp.getAst();

            Assert.AreEqual(expectedValue, ast.getIntegerSymbol());
            CoreClassifier type = ast.getType();

            Assert.IsNotNull(type);
            Assert.AreEqual("Integer", type.getName());
        }
Beispiel #2
0
 /* (non-Javadoc)
  * @see br.ufrj.cos.lens.odyssey.tools.psw.parser.cst.CSTVisitor#visitIntegerLiteralExp(br.ufrj.cos.lens.odyssey.tools.psw.parser.cst.literalExp.CSTIntegerLiteralExpCS)
  */
 public override void visitIntegerLiteralExp(CSTIntegerLiteralExpCS literalExp)
 {
 }
        /* (non-Javadoc)
	 * @see br.ufrj.cos.lens.odyssey.tools.psw.parser.cst.CSTVisitor#visitIntegerLiteralExp(br.ufrj.cos.lens.odyssey.tools.psw.parser.cst.literalExp.CSTIntegerLiteralExpCS)
	 */
        public void visitIntegerLiteralExp(CSTIntegerLiteralExpCS literalExp) {
        }