use of org.develnext.jphp.core.tokenizer.token.expr.operator.MinusExprToken in project jphp by jphp-compiler.
the class SimpleExprTest method testVarCall.
@Test
public void testVarCall() {
List<Token> tokens = getSyntaxTree("$x - $func(1, 3, 4);");
Assert.assertEquals(1, tokens.size());
Assert.assertTrue(tokens.get(0) instanceof ExprStmtToken);
ExprStmtToken expr = (ExprStmtToken) tokens.get(0);
tokens = expr.getTokens();
Assert.assertTrue(tokens.size() == 3);
Assert.assertTrue(tokens.get(0) instanceof VariableExprToken);
Assert.assertTrue(tokens.get(1) instanceof MinusExprToken);
Assert.assertTrue(tokens.get(2) instanceof CallExprToken);
}
Aggregations