mirascript-core 0.1.89

Compiler and bytecode definitions for the MiraScript language
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::parser::ParameterList;

use super::prelude::*;

impl Formattable for ParameterList<'_> {
    fn measure(&self, formatter: &Formatter, indent: usize) -> usize {
        self.1.measure(formatter, indent)
    }

    fn format(&self, formatter: &mut Formatter, complexity: usize) {
        formatter.write_token(&self.0);
        if !self.1.is_empty() {
            self.1.format(formatter, complexity);
        }
        formatter.write_token(&self.2);
    }
}