Package seph.lang.ast

Examples of seph.lang.ast.Message


        assertThat(m, is(equalTo(expected)));
    }

    @Test
    public void plus_plus_parses_correctly_combined_with_assignment() {
        Message m = parse("foo x = a++");
        Message expected = msg("foo", msg("=", PersistentList.create(Arrays.asList(msg("x"), msg("++", PersistentList.create(Arrays.asList(msg("a"))))))));
        assertThat(m, is(equalTo(expected)));
    }
View Full Code Here


        assertThat(m, is(equalTo(expected)));
    }

    @Test
    public void plus_plus_parses_correctly_combined_with_assignment_and_receiver() {
        Message m = parse("foo x = fox a++");
        Message expected = msg("foo", msg("=", PersistentList.create(Arrays.asList(msg("x"), msg("fox", msg("++", PersistentList.create(Arrays.asList(msg("a")))))))));
        assertThat(m, is(equalTo(expected)));
    }
View Full Code Here

        assertThat(m, is(equalTo(expected)));
    }

    @Test
    public void minus_minus_parses_correctly_in_simple_expression() {
        Message m = parse("x--");
        Message expected = msg("--", PersistentList.create(Arrays.asList(msg("x"))));
        assertThat(m, is(equalTo(expected)));
    }
View Full Code Here

        assertThat(m, is(equalTo(expected)));
    }

    @Test
    public void minus_minus_parses_correctly_in_simple_expression_after_other_part() {
        Message m = parse("foo x--");
        Message expected = msg("foo", msg("--", PersistentList.create(Arrays.asList(msg("x")))));
        assertThat(m, is(equalTo(expected)));
    }
View Full Code Here

        assertThat(m, is(equalTo(expected)));
    }

    @Test
    public void minus_minus_parses_correctly_wrapped_as_argument() {
        Message m = parse("foo(x--)");
        Message expected = msg("foo", PersistentList.create(Arrays.asList(msg("--", PersistentList.create(Arrays.asList(msg("x")))))));
        assertThat(m, is(equalTo(expected)));
    }
View Full Code Here

        assertThat(m, is(equalTo(expected)));
    }

    @Test
    public void minus_minus_parses_correctly_in_simple_expression_with_space() {
        Message m = parse("x --");
        Message expected = msg("--", PersistentList.create(Arrays.asList(msg("x"))));
        assertThat(m, is(equalTo(expected)));
    }
View Full Code Here

        assertThat(m, is(equalTo(expected)));
    }

    @Test
    public void minus_minus_parses_correctly_in_simple_expression_after_other_part_with_space() {
        Message m = parse("foo x --");
        Message expected = msg("foo", msg("--", PersistentList.create(Arrays.asList(msg("x")))));
        assertThat(m, is(equalTo(expected)));
    }
View Full Code Here

        assertThat(m, is(equalTo(expected)));
    }

    @Test
    public void minus_minus_parses_correctly_wrapped_as_argument_with_space() {
        Message m = parse("foo(x --)");
        Message expected = msg("foo", PersistentList.create(Arrays.asList(msg("--", PersistentList.create(Arrays.asList(msg("x")))))));
        assertThat(m, is(equalTo(expected)));
    }
View Full Code Here

        assertThat(m, is(equalTo(expected)));
    }

    @Test
    public void minus_minus_parses_correctly_as_message_send() {
        Message m = parse("--(a)");
        Message expected = msg("--", PersistentList.create(Arrays.asList(msg("a"))));
        assertThat(m, is(equalTo(expected)));
    }
View Full Code Here

        assertThat(m, is(equalTo(expected)));
    }

    @Test
    public void minus_minus_parses_correctly_as_message_send_with_receiver() {
        Message m = parse("foo --(a)");
        Message expected = msg("foo", msg("--", PersistentList.create(Arrays.asList(msg("a")))));
        assertThat(m, is(equalTo(expected)));
    }
View Full Code Here

TOP

Related Classes of seph.lang.ast.Message

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.