4
4
5
5
import * as sassInternal from '../sass-internal' ;
6
6
7
+ import { ArgumentList } from '../argument-list' ;
7
8
import { Expression } from '.' ;
8
9
import { BinaryOperationExpression } from './binary-operation' ;
9
10
import { BooleanExpression } from './boolean' ;
10
11
import { ColorExpression } from './color' ;
12
+ import { FunctionExpression } from './function' ;
11
13
import { ListExpression } from './list' ;
12
14
import { MapExpression } from './map' ;
13
15
import { NumberExpression } from './number' ;
@@ -20,6 +22,12 @@ const visitor = sassInternal.createExpressionVisitor<Expression>({
20
22
visitStringExpression : inner => new StringExpression ( undefined , inner ) ,
21
23
visitBooleanExpression : inner => new BooleanExpression ( undefined , inner ) ,
22
24
visitColorExpression : inner => new ColorExpression ( undefined , inner ) ,
25
+ visitFunctionExpression : inner => new FunctionExpression ( undefined , inner ) ,
26
+ visitIfExpression : inner =>
27
+ new FunctionExpression ( {
28
+ name : 'if' ,
29
+ arguments : new ArgumentList ( undefined , inner . arguments ) ,
30
+ } ) ,
23
31
visitListExpression : inner => new ListExpression ( undefined , inner ) ,
24
32
visitMapExpression : inner => new MapExpression ( undefined , inner ) ,
25
33
visitNumberExpression : inner => new NumberExpression ( undefined , inner ) ,
0 commit comments