luaur-ast 0.1.3

Lexer, parser, and AST for Luau (faithful Rust port).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::records::comma_separator_inserter::CommaSeparatorInserter;

impl CommaSeparatorInserter {
    pub fn operator_call(&mut self, writer: &mut dyn crate::records::writer::Writer) {
        if self.first {
            self.first = false;
        } else {
            if !self.comma_position.is_null() {
                unsafe {
                    writer.advance(&*self.comma_position);
                    self.comma_position = self.comma_position.add(1);
                }
            }
            writer.symbol(",");
        }
    }
}