File: operators.hpp

package info (click to toggle)
golang-github-wellington-go-libsass 0.9.2%2Bgit20181130.4ef5b9d-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,128 kB
  • sloc: cpp: 28,607; ansic: 839; makefile: 44
file content (30 lines) | stat: -rw-r--r-- 1,336 bytes parent folder | download | duplicates (3)
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
#ifndef SASS_OPERATORS_H
#define SASS_OPERATORS_H

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

namespace Sass {

  namespace Operators {

    // equality operator using AST Node operator==
    bool eq(Expression_Obj, Expression_Obj);
    bool neq(Expression_Obj, Expression_Obj);
    // specific operators based on cmp and eq
    bool lt(Expression_Obj, Expression_Obj);
    bool gt(Expression_Obj, Expression_Obj);
    bool lte(Expression_Obj, Expression_Obj);
    bool gte(Expression_Obj, Expression_Obj);
    // arithmetic for all the combinations that matter
    Value_Ptr op_strings(Sass::Operand, Value&, Value&, struct Sass_Inspect_Options opt, const ParserState& pstate, bool delayed = false);
    Value_Ptr op_colors(enum Sass_OP, const Color&, const Color&, struct Sass_Inspect_Options opt, const ParserState& pstate, bool delayed = false);
    Value_Ptr op_numbers(enum Sass_OP, const Number&, const Number&, struct Sass_Inspect_Options opt, const ParserState& pstate, bool delayed = false);
    Value_Ptr op_number_color(enum Sass_OP, const Number&, const Color&, struct Sass_Inspect_Options opt, const ParserState& pstate, bool delayed = false);
    Value_Ptr op_color_number(enum Sass_OP, const Color&, const Number&, struct Sass_Inspect_Options opt, const ParserState& pstate, bool delayed = false);

  };

}

#endif