File: to_c.hpp

package info (click to toggle)
golang-github-wellington-go-libsass 0.9.2%2Bgit20181130.4ef5b9d-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,128 kB
  • sloc: cpp: 28,607; ansic: 839; makefile: 44
file content (39 lines) | stat: -rw-r--r-- 1,062 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef SASS_TO_C_H
#define SASS_TO_C_H

#include "ast_fwd_decl.hpp"
#include "operation.hpp"
#include "sass/values.h"

namespace Sass {

  class To_C : public Operation_CRTP<union Sass_Value*, To_C> {
    // override this to define a catch-all
    union Sass_Value* fallback_impl(AST_Node_Ptr n);

  public:

    To_C() { }
    ~To_C() { }

    union Sass_Value* operator()(Boolean_Ptr);
    union Sass_Value* operator()(Number_Ptr);
    union Sass_Value* operator()(Color_Ptr);
    union Sass_Value* operator()(String_Constant_Ptr);
    union Sass_Value* operator()(String_Quoted_Ptr);
    union Sass_Value* operator()(Custom_Warning_Ptr);
    union Sass_Value* operator()(Custom_Error_Ptr);
    union Sass_Value* operator()(List_Ptr);
    union Sass_Value* operator()(Map_Ptr);
    union Sass_Value* operator()(Null_Ptr);
    union Sass_Value* operator()(Arguments_Ptr);
    union Sass_Value* operator()(Argument_Ptr);

    // dispatch to fallback implementation
    union Sass_Value* fallback(AST_Node_Ptr x)
    { return fallback_impl(x); }
  };

}

#endif