Skip to main content

oak_scss/ast/
mod.rs

1#![doc = include_str!("readme.md")]
2use core::range::Range;
3
4/// SCSS root node
5#[derive(Debug, Clone)]
6pub struct ScssRoot {
7    /// The source range of the root node
8    pub span: Range<usize>,
9    /// The children nodes
10    pub children: Vec<ScssNode>,
11}
12
13impl ScssRoot {
14    /// Traverses the AST with the given visitor.
15    pub fn traverse<V: ScssVisitor>(&self, visitor: &mut V) {
16        for child in &self.children {
17            child.traverse(visitor);
18        }
19        visitor.visit_root(self);
20    }
21
22    /// Mutably traverses the AST with the given visitor.
23    pub fn traverse_mut<V: ScssVisitorMut>(&mut self, visitor: &mut V) {
24        for child in &mut self.children {
25            child.traverse_mut(visitor);
26        }
27        visitor.visit_root_mut(self);
28    }
29}
30
31/// SCSS node types
32#[derive(Debug, Clone)]
33pub enum ScssNode {
34    /// A rule set (selector + block)
35    RuleSet(ScssRuleSet),
36    /// A mixin declaration
37    MixinDeclaration(ScssMixinDeclaration),
38    /// A function declaration
39    FunctionDeclaration(ScssFunctionDeclaration),
40    /// An include statement
41    IncludeStatement(ScssIncludeStatement),
42    /// An import statement
43    ImportStatement(ScssImportStatement),
44    /// A variable declaration
45    VariableDeclaration(ScssVariableDeclaration),
46    /// An if statement
47    IfStatement(ScssIfStatement),
48    /// A for statement
49    ForStatement(ScssForStatement),
50    /// An each statement
51    EachStatement(ScssEachStatement),
52    /// A while statement
53    WhileStatement(ScssWhileStatement),
54    /// A return statement
55    ReturnStatement(ScssReturnStatement),
56    /// A comment
57    Comment(ScssComment),
58    /// An error node
59    Error(ScssError),
60}
61
62impl ScssNode {
63    /// Traverses the node with the given visitor.
64    pub fn traverse<V: ScssVisitor>(&self, visitor: &mut V) {
65        match self {
66            ScssNode::RuleSet(node) => node.traverse(visitor),
67            ScssNode::MixinDeclaration(node) => node.traverse(visitor),
68            ScssNode::FunctionDeclaration(node) => node.traverse(visitor),
69            ScssNode::IncludeStatement(node) => node.traverse(visitor),
70            ScssNode::ImportStatement(node) => node.traverse(visitor),
71            ScssNode::VariableDeclaration(node) => node.traverse(visitor),
72            ScssNode::IfStatement(node) => node.traverse(visitor),
73            ScssNode::ForStatement(node) => node.traverse(visitor),
74            ScssNode::EachStatement(node) => node.traverse(visitor),
75            ScssNode::WhileStatement(node) => node.traverse(visitor),
76            ScssNode::ReturnStatement(node) => node.traverse(visitor),
77            ScssNode::Comment(node) => node.traverse(visitor),
78            ScssNode::Error(node) => node.traverse(visitor),
79        }
80    }
81
82    /// Mutably traverses the node with the given visitor.
83    pub fn traverse_mut<V: ScssVisitorMut>(&mut self, visitor: &mut V) {
84        match self {
85            ScssNode::RuleSet(node) => node.traverse_mut(visitor),
86            ScssNode::MixinDeclaration(node) => node.traverse_mut(visitor),
87            ScssNode::FunctionDeclaration(node) => node.traverse_mut(visitor),
88            ScssNode::IncludeStatement(node) => node.traverse_mut(visitor),
89            ScssNode::ImportStatement(node) => node.traverse_mut(visitor),
90            ScssNode::VariableDeclaration(node) => node.traverse_mut(visitor),
91            ScssNode::IfStatement(node) => node.traverse_mut(visitor),
92            ScssNode::ForStatement(node) => node.traverse_mut(visitor),
93            ScssNode::EachStatement(node) => node.traverse_mut(visitor),
94            ScssNode::WhileStatement(node) => node.traverse_mut(visitor),
95            ScssNode::ReturnStatement(node) => node.traverse_mut(visitor),
96            ScssNode::Comment(node) => node.traverse_mut(visitor),
97            ScssNode::Error(node) => node.traverse_mut(visitor),
98        }
99    }
100}
101
102/// A rule set consisting of a selector and a block
103#[derive(Debug, Clone)]
104pub struct ScssRuleSet {
105    /// The source range of the rule set
106    pub span: Range<usize>,
107    /// The selector
108    pub selector: ScssSelector,
109    /// The block containing declarations and nested rules
110    pub block: ScssBlock,
111}
112
113impl ScssRuleSet {
114    /// Traverses the rule set with the given visitor.
115    pub fn traverse<V: ScssVisitor>(&self, visitor: &mut V) {
116        self.selector.traverse(visitor);
117        self.block.traverse(visitor);
118        visitor.visit_rule_set(self);
119    }
120
121    /// Mutably traverses the rule set with the given visitor.
122    pub fn traverse_mut<V: ScssVisitorMut>(&mut self, visitor: &mut V) {
123        self.selector.traverse_mut(visitor);
124        self.block.traverse_mut(visitor);
125        visitor.visit_rule_set_mut(self);
126    }
127}
128
129/// A selector
130#[derive(Debug, Clone)]
131pub struct ScssSelector {
132    /// The source range of the selector
133    pub span: Range<usize>,
134    /// The selector text
135    pub text: String,
136}
137
138impl ScssSelector {
139    /// Traverses the selector with the given visitor.
140    pub fn traverse<V: ScssVisitor>(&self, visitor: &mut V) {
141        visitor.visit_selector(self);
142    }
143
144    /// Mutably traverses the selector with the given visitor.
145    pub fn traverse_mut<V: ScssVisitorMut>(&mut self, visitor: &mut V) {
146        visitor.visit_selector_mut(self);
147    }
148}
149
150/// A block containing declarations and nested rules
151#[derive(Debug, Clone)]
152pub struct ScssBlock {
153    /// The source range of the block
154    pub span: Range<usize>,
155    /// The children nodes (declarations and nested rules)
156    pub children: Vec<ScssNode>,
157}
158
159impl ScssBlock {
160    /// Traverses the block with the given visitor.
161    pub fn traverse<V: ScssVisitor>(&self, visitor: &mut V) {
162        for child in &self.children {
163            child.traverse(visitor);
164        }
165        visitor.visit_block(self);
166    }
167
168    /// Mutably traverses the block with the given visitor.
169    pub fn traverse_mut<V: ScssVisitorMut>(&mut self, visitor: &mut V) {
170        for child in &mut self.children {
171            child.traverse_mut(visitor);
172        }
173        visitor.visit_block_mut(self);
174    }
175}
176
177/// A declaration (property: value;)
178#[derive(Debug, Clone)]
179pub struct ScssDeclaration {
180    /// The source range of the declaration
181    pub span: Range<usize>,
182    /// The property
183    pub property: ScssProperty,
184    /// The value
185    pub value: ScssValue,
186}
187
188impl ScssDeclaration {
189    /// Traverses the declaration with the given visitor.
190    pub fn traverse<V: ScssVisitor>(&self, visitor: &mut V) {
191        self.property.traverse(visitor);
192        self.value.traverse(visitor);
193        visitor.visit_declaration(self);
194    }
195
196    /// Mutably traverses the declaration with the given visitor.
197    pub fn traverse_mut<V: ScssVisitorMut>(&mut self, visitor: &mut V) {
198        self.property.traverse_mut(visitor);
199        self.value.traverse_mut(visitor);
200        visitor.visit_declaration_mut(self);
201    }
202}
203
204/// A property
205#[derive(Debug, Clone)]
206pub struct ScssProperty {
207    /// The source range of the property
208    pub span: Range<usize>,
209    /// The property name
210    pub name: String,
211}
212
213impl ScssProperty {
214    /// Traverses the property with the given visitor.
215    pub fn traverse<V: ScssVisitor>(&self, visitor: &mut V) {
216        visitor.visit_property(self);
217    }
218
219    /// Mutably traverses the property with the given visitor.
220    pub fn traverse_mut<V: ScssVisitorMut>(&mut self, visitor: &mut V) {
221        visitor.visit_property_mut(self);
222    }
223}
224
225/// A value
226#[derive(Debug, Clone)]
227pub struct ScssValue {
228    /// The source range of the value
229    pub span: Range<usize>,
230    /// The value text
231    pub text: String,
232}
233
234impl ScssValue {
235    /// Traverses the value with the given visitor.
236    pub fn traverse<V: ScssVisitor>(&self, visitor: &mut V) {
237        visitor.visit_value(self);
238    }
239
240    /// Mutably traverses the value with the given visitor.
241    pub fn traverse_mut<V: ScssVisitorMut>(&mut self, visitor: &mut V) {
242        visitor.visit_value_mut(self);
243    }
244}
245
246/// A mixin declaration
247#[derive(Debug, Clone)]
248pub struct ScssMixinDeclaration {
249    /// The source range of the mixin declaration
250    pub span: Range<usize>,
251    /// The mixin name
252    pub name: String,
253    /// The parameters
254    pub parameters: Vec<ScssParameter>,
255    /// The block
256    pub block: ScssBlock,
257}
258
259impl ScssMixinDeclaration {
260    /// Traverses the mixin declaration with the given visitor.
261    pub fn traverse<V: ScssVisitor>(&self, visitor: &mut V) {
262        for param in &self.parameters {
263            param.traverse(visitor);
264        }
265        self.block.traverse(visitor);
266        visitor.visit_mixin_declaration(self);
267    }
268
269    /// Mutably traverses the mixin declaration with the given visitor.
270    pub fn traverse_mut<V: ScssVisitorMut>(&mut self, visitor: &mut V) {
271        for param in &mut self.parameters {
272            param.traverse_mut(visitor);
273        }
274        self.block.traverse_mut(visitor);
275        visitor.visit_mixin_declaration_mut(self);
276    }
277}
278
279/// A function declaration
280#[derive(Debug, Clone)]
281pub struct ScssFunctionDeclaration {
282    /// The source range of the function declaration
283    pub span: Range<usize>,
284    /// The function name
285    pub name: String,
286    /// The parameters
287    pub parameters: Vec<ScssParameter>,
288    /// The block
289    pub block: ScssBlock,
290}
291
292impl ScssFunctionDeclaration {
293    /// Traverses the function declaration with the given visitor.
294    pub fn traverse<V: ScssVisitor>(&self, visitor: &mut V) {
295        for param in &self.parameters {
296            param.traverse(visitor);
297        }
298        self.block.traverse(visitor);
299        visitor.visit_function_declaration(self);
300    }
301
302    /// Mutably traverses the function declaration with the given visitor.
303    pub fn traverse_mut<V: ScssVisitorMut>(&mut self, visitor: &mut V) {
304        for param in &mut self.parameters {
305            param.traverse_mut(visitor);
306        }
307        self.block.traverse_mut(visitor);
308        visitor.visit_function_declaration_mut(self);
309    }
310}
311
312/// A parameter
313#[derive(Debug, Clone)]
314pub struct ScssParameter {
315    /// The source range of the parameter
316    pub span: Range<usize>,
317    /// The parameter name
318    pub name: String,
319    /// The default value (optional)
320    pub default_value: Option<ScssValue>,
321}
322
323impl ScssParameter {
324    /// Traverses the parameter with the given visitor.
325    pub fn traverse<V: ScssVisitor>(&self, visitor: &mut V) {
326        if let Some(value) = &self.default_value {
327            value.traverse(visitor);
328        }
329        visitor.visit_parameter(self);
330    }
331
332    /// Mutably traverses the parameter with the given visitor.
333    pub fn traverse_mut<V: ScssVisitorMut>(&mut self, visitor: &mut V) {
334        if let Some(value) = &mut self.default_value {
335            value.traverse_mut(visitor);
336        }
337        visitor.visit_parameter_mut(self);
338    }
339}
340
341/// An include statement
342#[derive(Debug, Clone)]
343pub struct ScssIncludeStatement {
344    /// The source range of the include statement
345    pub span: Range<usize>,
346    /// The mixin name
347    pub name: String,
348    /// The arguments
349    pub arguments: Vec<ScssArgument>,
350    /// The block (optional)
351    pub block: Option<ScssBlock>,
352}
353
354impl ScssIncludeStatement {
355    /// Traverses the include statement with the given visitor.
356    pub fn traverse<V: ScssVisitor>(&self, visitor: &mut V) {
357        for arg in &self.arguments {
358            arg.traverse(visitor);
359        }
360        if let Some(block) = &self.block {
361            block.traverse(visitor);
362        }
363        visitor.visit_include_statement(self);
364    }
365
366    /// Mutably traverses the include statement with the given visitor.
367    pub fn traverse_mut<V: ScssVisitorMut>(&mut self, visitor: &mut V) {
368        for arg in &mut self.arguments {
369            arg.traverse_mut(visitor);
370        }
371        if let Some(block) = &mut self.block {
372            block.traverse_mut(visitor);
373        }
374        visitor.visit_include_statement_mut(self);
375    }
376}
377
378/// An argument
379#[derive(Debug, Clone)]
380pub struct ScssArgument {
381    /// The source range of the argument
382    pub span: Range<usize>,
383    /// The argument value
384    pub value: ScssValue,
385}
386
387impl ScssArgument {
388    /// Traverses the argument with the given visitor.
389    pub fn traverse<V: ScssVisitor>(&self, visitor: &mut V) {
390        self.value.traverse(visitor);
391        visitor.visit_argument(self);
392    }
393
394    /// Mutably traverses the argument with the given visitor.
395    pub fn traverse_mut<V: ScssVisitorMut>(&mut self, visitor: &mut V) {
396        self.value.traverse_mut(visitor);
397        visitor.visit_argument_mut(self);
398    }
399}
400
401/// An import statement
402#[derive(Debug, Clone)]
403pub struct ScssImportStatement {
404    /// The source range of the import statement
405    pub span: Range<usize>,
406    /// The import path
407    pub path: String,
408}
409
410impl ScssImportStatement {
411    /// Traverses the import statement with the given visitor.
412    pub fn traverse<V: ScssVisitor>(&self, visitor: &mut V) {
413        visitor.visit_import_statement(self);
414    }
415
416    /// Mutably traverses the import statement with the given visitor.
417    pub fn traverse_mut<V: ScssVisitorMut>(&mut self, visitor: &mut V) {
418        visitor.visit_import_statement_mut(self);
419    }
420}
421
422/// A variable declaration
423#[derive(Debug, Clone)]
424pub struct ScssVariableDeclaration {
425    /// The source range of the variable declaration
426    pub span: Range<usize>,
427    /// The variable name
428    pub name: String,
429    /// The variable value
430    pub value: ScssValue,
431}
432
433impl ScssVariableDeclaration {
434    /// Traverses the variable declaration with the given visitor.
435    pub fn traverse<V: ScssVisitor>(&self, visitor: &mut V) {
436        self.value.traverse(visitor);
437        visitor.visit_variable_declaration(self);
438    }
439
440    /// Mutably traverses the variable declaration with the given visitor.
441    pub fn traverse_mut<V: ScssVisitorMut>(&mut self, visitor: &mut V) {
442        self.value.traverse_mut(visitor);
443        visitor.visit_variable_declaration_mut(self);
444    }
445}
446
447/// An if statement
448#[derive(Debug, Clone)]
449pub struct ScssIfStatement {
450    /// The source range of the if statement
451    pub span: Range<usize>,
452    /// The condition
453    pub condition: String,
454    /// The then block
455    pub then_block: ScssBlock,
456    /// The else block (optional)
457    pub else_block: Option<ScssBlock>,
458}
459
460impl ScssIfStatement {
461    /// Traverses the if statement with the given visitor.
462    pub fn traverse<V: ScssVisitor>(&self, visitor: &mut V) {
463        self.then_block.traverse(visitor);
464        if let Some(block) = &self.else_block {
465            block.traverse(visitor);
466        }
467        visitor.visit_if_statement(self);
468    }
469
470    /// Mutably traverses the if statement with the given visitor.
471    pub fn traverse_mut<V: ScssVisitorMut>(&mut self, visitor: &mut V) {
472        self.then_block.traverse_mut(visitor);
473        if let Some(block) = &mut self.else_block {
474            block.traverse_mut(visitor);
475        }
476        visitor.visit_if_statement_mut(self);
477    }
478}
479
480/// A for statement
481#[derive(Debug, Clone)]
482pub struct ScssForStatement {
483    /// The source range of the for statement
484    pub span: Range<usize>,
485    /// The variable name
486    pub variable: String,
487    /// The start value
488    pub start: String,
489    /// The end value
490    pub end: String,
491    /// Whether it's an inclusive range (through) or exclusive (to)
492    pub inclusive: bool,
493    /// The block
494    pub block: ScssBlock,
495}
496
497impl ScssForStatement {
498    /// Traverses the for statement with the given visitor.
499    pub fn traverse<V: ScssVisitor>(&self, visitor: &mut V) {
500        self.block.traverse(visitor);
501        visitor.visit_for_statement(self);
502    }
503
504    /// Mutably traverses the for statement with the given visitor.
505    pub fn traverse_mut<V: ScssVisitorMut>(&mut self, visitor: &mut V) {
506        self.block.traverse_mut(visitor);
507        visitor.visit_for_statement_mut(self);
508    }
509}
510
511/// An each statement
512#[derive(Debug, Clone)]
513pub struct ScssEachStatement {
514    /// The source range of the each statement
515    pub span: Range<usize>,
516    /// The variable names
517    pub variables: Vec<String>,
518    /// The list expression
519    pub list: String,
520    /// The block
521    pub block: ScssBlock,
522}
523
524impl ScssEachStatement {
525    /// Traverses the each statement with the given visitor.
526    pub fn traverse<V: ScssVisitor>(&self, visitor: &mut V) {
527        self.block.traverse(visitor);
528        visitor.visit_each_statement(self);
529    }
530
531    /// Mutably traverses the each statement with the given visitor.
532    pub fn traverse_mut<V: ScssVisitorMut>(&mut self, visitor: &mut V) {
533        self.block.traverse_mut(visitor);
534        visitor.visit_each_statement_mut(self);
535    }
536}
537
538/// A while statement
539#[derive(Debug, Clone)]
540pub struct ScssWhileStatement {
541    /// The source range of the while statement
542    pub span: Range<usize>,
543    /// The condition
544    pub condition: String,
545    /// The block
546    pub block: ScssBlock,
547}
548
549impl ScssWhileStatement {
550    /// Traverses the while statement with the given visitor.
551    pub fn traverse<V: ScssVisitor>(&self, visitor: &mut V) {
552        self.block.traverse(visitor);
553        visitor.visit_while_statement(self);
554    }
555
556    /// Mutably traverses the while statement with the given visitor.
557    pub fn traverse_mut<V: ScssVisitorMut>(&mut self, visitor: &mut V) {
558        self.block.traverse_mut(visitor);
559        visitor.visit_while_statement_mut(self);
560    }
561}
562
563/// A return statement
564#[derive(Debug, Clone)]
565pub struct ScssReturnStatement {
566    /// The source range of the return statement
567    pub span: Range<usize>,
568    /// The return value
569    pub value: Option<ScssValue>,
570}
571
572impl ScssReturnStatement {
573    /// Traverses the return statement with the given visitor.
574    pub fn traverse<V: ScssVisitor>(&self, visitor: &mut V) {
575        if let Some(value) = &self.value {
576            value.traverse(visitor);
577        }
578        visitor.visit_return_statement(self);
579    }
580
581    /// Mutably traverses the return statement with the given visitor.
582    pub fn traverse_mut<V: ScssVisitorMut>(&mut self, visitor: &mut V) {
583        if let Some(value) = &mut self.value {
584            value.traverse_mut(visitor);
585        }
586        visitor.visit_return_statement_mut(self);
587    }
588}
589
590/// A comment
591#[derive(Debug, Clone)]
592pub struct ScssComment {
593    /// The source range of the comment
594    pub span: Range<usize>,
595    /// The comment text
596    pub text: String,
597}
598
599impl ScssComment {
600    /// Traverses the comment with the given visitor.
601    pub fn traverse<V: ScssVisitor>(&self, visitor: &mut V) {
602        visitor.visit_comment(self);
603    }
604
605    /// Mutably traverses the comment with the given visitor.
606    pub fn traverse_mut<V: ScssVisitorMut>(&mut self, visitor: &mut V) {
607        visitor.visit_comment_mut(self);
608    }
609}
610
611/// An error node
612#[derive(Debug, Clone)]
613pub struct ScssError {
614    /// The source range of the error
615    pub span: Range<usize>,
616    /// The error message
617    pub message: String,
618}
619
620impl ScssError {
621    /// Traverses the error with the given visitor.
622    pub fn traverse<V: ScssVisitor>(&self, visitor: &mut V) {
623        visitor.visit_error(self);
624    }
625
626    /// Mutably traverses the error with the given visitor.
627    pub fn traverse_mut<V: ScssVisitorMut>(&mut self, visitor: &mut V) {
628        visitor.visit_error_mut(self);
629    }
630}
631
632/// Visitor trait for SCSS AST nodes.
633pub trait ScssVisitor {
634    /// Visits the root node.
635    fn visit_root(&mut self, _node: &ScssRoot) {}
636    /// Visits a rule set node.
637    fn visit_rule_set(&mut self, _node: &ScssRuleSet) {}
638    /// Visits a selector node.
639    fn visit_selector(&mut self, _node: &ScssSelector) {}
640    /// Visits a block node.
641    fn visit_block(&mut self, _node: &ScssBlock) {}
642    /// Visits a declaration node.
643    fn visit_declaration(&mut self, _node: &ScssDeclaration) {}
644    /// Visits a property node.
645    fn visit_property(&mut self, _node: &ScssProperty) {}
646    /// Visits a value node.
647    fn visit_value(&mut self, _node: &ScssValue) {}
648    /// Visits a mixin declaration node.
649    fn visit_mixin_declaration(&mut self, _node: &ScssMixinDeclaration) {}
650    /// Visits a function declaration node.
651    fn visit_function_declaration(&mut self, _node: &ScssFunctionDeclaration) {}
652    /// Visits a parameter node.
653    fn visit_parameter(&mut self, _node: &ScssParameter) {}
654    /// Visits an include statement node.
655    fn visit_include_statement(&mut self, _node: &ScssIncludeStatement) {}
656    /// Visits an argument node.
657    fn visit_argument(&mut self, _node: &ScssArgument) {}
658    /// Visits an import statement node.
659    fn visit_import_statement(&mut self, _node: &ScssImportStatement) {}
660    /// Visits a variable declaration node.
661    fn visit_variable_declaration(&mut self, _node: &ScssVariableDeclaration) {}
662    /// Visits an if statement node.
663    fn visit_if_statement(&mut self, _node: &ScssIfStatement) {}
664    /// Visits a for statement node.
665    fn visit_for_statement(&mut self, _node: &ScssForStatement) {}
666    /// Visits an each statement node.
667    fn visit_each_statement(&mut self, _node: &ScssEachStatement) {}
668    /// Visits a while statement node.
669    fn visit_while_statement(&mut self, _node: &ScssWhileStatement) {}
670    /// Visits a return statement node.
671    fn visit_return_statement(&mut self, _node: &ScssReturnStatement) {}
672    /// Visits a comment node.
673    fn visit_comment(&mut self, _node: &ScssComment) {}
674    /// Visits an error node.
675    fn visit_error(&mut self, _node: &ScssError) {}
676}
677
678/// Mutable visitor trait for SCSS AST nodes.
679pub trait ScssVisitorMut {
680    /// Visits the root node mutably.
681    fn visit_root_mut(&mut self, _node: &mut ScssRoot) {}
682    /// Visits a rule set node mutably.
683    fn visit_rule_set_mut(&mut self, _node: &mut ScssRuleSet) {}
684    /// Visits a selector node mutably.
685    fn visit_selector_mut(&mut self, _node: &mut ScssSelector) {}
686    /// Visits a block node mutably.
687    fn visit_block_mut(&mut self, _node: &mut ScssBlock) {}
688    /// Visits a declaration node mutably.
689    fn visit_declaration_mut(&mut self, _node: &mut ScssDeclaration) {}
690    /// Visits a property node mutably.
691    fn visit_property_mut(&mut self, _node: &mut ScssProperty) {}
692    /// Visits a value node mutably.
693    fn visit_value_mut(&mut self, _node: &mut ScssValue) {}
694    /// Visits a mixin declaration node mutably.
695    fn visit_mixin_declaration_mut(&mut self, _node: &mut ScssMixinDeclaration) {}
696    /// Visits a function declaration node mutably.
697    fn visit_function_declaration_mut(&mut self, _node: &mut ScssFunctionDeclaration) {}
698    /// Visits a parameter node mutably.
699    fn visit_parameter_mut(&mut self, _node: &mut ScssParameter) {}
700    /// Visits an include statement node mutably.
701    fn visit_include_statement_mut(&mut self, _node: &mut ScssIncludeStatement) {}
702    /// Visits an argument node mutably.
703    fn visit_argument_mut(&mut self, _node: &mut ScssArgument) {}
704    /// Visits an import statement node mutably.
705    fn visit_import_statement_mut(&mut self, _node: &mut ScssImportStatement) {}
706    /// Visits a variable declaration node mutably.
707    fn visit_variable_declaration_mut(&mut self, _node: &mut ScssVariableDeclaration) {}
708    /// Visits an if statement node mutably.
709    fn visit_if_statement_mut(&mut self, _node: &mut ScssIfStatement) {}
710    /// Visits a for statement node mutably.
711    fn visit_for_statement_mut(&mut self, _node: &mut ScssForStatement) {}
712    /// Visits an each statement node mutably.
713    fn visit_each_statement_mut(&mut self, _node: &mut ScssEachStatement) {}
714    /// Visits a while statement node mutably.
715    fn visit_while_statement_mut(&mut self, _node: &mut ScssWhileStatement) {}
716    /// Visits a return statement node mutably.
717    fn visit_return_statement_mut(&mut self, _node: &mut ScssReturnStatement) {}
718    /// Visits a comment node mutably.
719    fn visit_comment_mut(&mut self, _node: &mut ScssComment) {}
720    /// Visits an error node mutably.
721    fn visit_error_mut(&mut self, _node: &mut ScssError) {}
722}