Coverage Report

Created: 2025-07-12 06:05

/src/libsass/src/to_value.hpp
Line
Count
Source
1
#ifndef SASS_TO_VALUE_H
2
#define SASS_TO_VALUE_H
3
4
#include "operation.hpp"
5
#include "sass/values.h"
6
#include "ast_fwd_decl.hpp"
7
8
namespace Sass {
9
10
  class To_Value : public Operation_CRTP<Value*, To_Value> {
11
12
  private:
13
14
    Context& ctx;
15
16
  public:
17
18
    To_Value(Context& ctx)
19
336
    : ctx(ctx)
20
336
    { }
21
336
    ~To_Value() { }
22
    using Operation<Value*>::operator();
23
24
    Value* operator()(Argument*);
25
    Value* operator()(Boolean*);
26
    Value* operator()(Number*);
27
    Value* operator()(Color_RGBA*);
28
    Value* operator()(Color_HSLA*);
29
    Value* operator()(String_Constant*);
30
    Value* operator()(String_Quoted*);
31
    Value* operator()(Custom_Warning*);
32
    Value* operator()(Custom_Error*);
33
    Value* operator()(List*);
34
    Value* operator()(Map*);
35
    Value* operator()(Null*);
36
    Value* operator()(Function*);
37
38
    // convert to string via `To_String`
39
    Value* operator()(SelectorList*);
40
    Value* operator()(Binary_Expression*);
41
42
  };
43
44
}
45
46
#endif