Package seph.lang.ast

Examples of seph.lang.ast.Message.position()


    @Test
    public void parsing_a_terminator_generates_a_correct_filename_line_and_position() {
        Message result = parse("\nblarg\n\nbra", "fox.sp").next();
        assertEquals("fox.sp", result.filename());
        assertEquals(3, result.line());
        assertEquals(-1, result.position());
    }

    @Test
    public void parsing_a_text_generates_a_correct_filename_line_and_position() {
        Message result = parse("\n\n\n   \"blargus\"", "box.sp");
View Full Code Here


    @Test
    public void parsing_a_text_generates_a_correct_filename_line_and_position() {
        Message result = parse("\n\n\n   \"blargus\"", "box.sp");
        assertEquals("box.sp", result.filename());
        assertEquals(4, result.line());
        assertEquals(3, result.position());
    }

    @Test
    public void parsing_an_operator_generates_a_correct_filename_line_and_position() {
        Message result = parse("\n\n\n   ::", "bax.sp");
View Full Code Here

    @Test
    public void parsing_an_operator_generates_a_correct_filename_line_and_position() {
        Message result = parse("\n\n\n   ::", "bax.sp");
        assertEquals("bax.sp", result.filename());
        assertEquals(4, result.line());
        assertEquals(3, result.position());

        result = parse("\n\n\n ::(bar)", "bax.sp");
        assertEquals("bax.sp", result.filename());
        assertEquals(4, result.line());
        assertEquals(1, result.position());
View Full Code Here

        assertEquals(3, result.position());

        result = parse("\n\n\n ::(bar)", "bax.sp");
        assertEquals("bax.sp", result.filename());
        assertEquals(4, result.line());
        assertEquals(1, result.position());
    }

    @Test
    public void parsing_an_empty_message_send_generates_a_correct_filename_line_and_position() {
        Message result = parse("\n\n\n          (blarg)", "aaa.sp");
View Full Code Here

    @Test
    public void parsing_a_number_generates_a_correct_filename_line_and_position() {
        Message result = parse("\n\n 32", "numx.sp");
        assertEquals("numx.sp", result.filename());
        assertEquals(3, result.line());
        assertEquals(1, result.position());
    }

    private static Message msg(String name) {
        return NamedMessage.create(name, null, null, null, -1, -1, new StaticScope(null));
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.