Search in sources :

Example 1 with GreaterOrEqualExprToken

use of org.develnext.jphp.core.tokenizer.token.expr.operator.GreaterOrEqualExprToken in project jphp by jphp-compiler.

the class TokenizerTest method testComplexOperators.

@Test
public void testComplexOperators() throws IOException {
    Tokenizer tokenizer = new Tokenizer(new Context("== >= <= === !== != && ||"));
    assertTrue(tokenizer.nextToken() instanceof EqualExprToken);
    assertTrue(tokenizer.nextToken() instanceof GreaterOrEqualExprToken);
    assertTrue(tokenizer.nextToken() instanceof SmallerOrEqualToken);
    assertTrue(tokenizer.nextToken() instanceof IdenticalExprToken);
    assertTrue(tokenizer.nextToken() instanceof NotIdenticalExprToken);
    assertTrue(tokenizer.nextToken() instanceof BooleanNotEqualExprToken);
    assertTrue(tokenizer.nextToken() instanceof BooleanAndExprToken);
    assertTrue(tokenizer.nextToken() instanceof BooleanOrExprToken);
}
Also used : Context(php.runtime.env.Context) BooleanOrExprToken(org.develnext.jphp.core.tokenizer.token.expr.operator.BooleanOrExprToken) EqualExprToken(org.develnext.jphp.core.tokenizer.token.expr.operator.EqualExprToken) BooleanNotEqualExprToken(org.develnext.jphp.core.tokenizer.token.expr.operator.BooleanNotEqualExprToken) GreaterOrEqualExprToken(org.develnext.jphp.core.tokenizer.token.expr.operator.GreaterOrEqualExprToken) SmallerOrEqualToken(org.develnext.jphp.core.tokenizer.token.expr.operator.SmallerOrEqualToken) NotIdenticalExprToken(org.develnext.jphp.core.tokenizer.token.expr.operator.NotIdenticalExprToken) Tokenizer(org.develnext.jphp.core.tokenizer.Tokenizer) GreaterOrEqualExprToken(org.develnext.jphp.core.tokenizer.token.expr.operator.GreaterOrEqualExprToken) BooleanNotEqualExprToken(org.develnext.jphp.core.tokenizer.token.expr.operator.BooleanNotEqualExprToken) BooleanAndExprToken(org.develnext.jphp.core.tokenizer.token.expr.operator.BooleanAndExprToken) IdenticalExprToken(org.develnext.jphp.core.tokenizer.token.expr.operator.IdenticalExprToken) NotIdenticalExprToken(org.develnext.jphp.core.tokenizer.token.expr.operator.NotIdenticalExprToken) Test(org.junit.Test)

Aggregations

Tokenizer (org.develnext.jphp.core.tokenizer.Tokenizer)1 BooleanAndExprToken (org.develnext.jphp.core.tokenizer.token.expr.operator.BooleanAndExprToken)1 BooleanNotEqualExprToken (org.develnext.jphp.core.tokenizer.token.expr.operator.BooleanNotEqualExprToken)1 BooleanOrExprToken (org.develnext.jphp.core.tokenizer.token.expr.operator.BooleanOrExprToken)1 EqualExprToken (org.develnext.jphp.core.tokenizer.token.expr.operator.EqualExprToken)1 GreaterOrEqualExprToken (org.develnext.jphp.core.tokenizer.token.expr.operator.GreaterOrEqualExprToken)1 IdenticalExprToken (org.develnext.jphp.core.tokenizer.token.expr.operator.IdenticalExprToken)1 NotIdenticalExprToken (org.develnext.jphp.core.tokenizer.token.expr.operator.NotIdenticalExprToken)1 SmallerOrEqualToken (org.develnext.jphp.core.tokenizer.token.expr.operator.SmallerOrEqualToken)1 Test (org.junit.Test)1 Context (php.runtime.env.Context)1