aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/interpreterbase/operator.py
blob: 5dec8d0a8671517aca192f500a210dadc6b1bc9f (plain)
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
# SPDX-license-identifier: Apache-2.0

from enum import Enum

class MesonOperator(Enum):
    # Arithmetic
    PLUS = '+'
    MINUS = '-'
    TIMES = '*'
    DIV = '/'
    MOD = '%'

    UMINUS = 'uminus'

    # Logic
    NOT = 'not'

    # Should return the boolsche interpretation of the value (`'' == false` for instance)
    BOOL = 'bool()'

    # Comparison
    EQUALS = '=='
    NOT_EQUALS = '!='
    GREATER = '>'
    LESS = '<'
    GREATER_EQUALS = '>='
    LESS_EQUALS = '<='

    # Container
    IN = 'in'
    NOT_IN = 'not in'
    INDEX = '[]'