File: operators.t

package info (click to toggle)
golang-github-hashicorp-hcl-v2 2.14.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 3,120 kB
  • sloc: ruby: 205; makefile: 72; python: 43; sh: 11
file content (109 lines) | stat: -rw-r--r-- 2,037 bytes parent folder | download
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
result = {
  equality = {
    "==" = {
      exactly              = true
      not                  = false
      type_mismatch_number = false
      type_mismatch_bool   = false
    }
    "!=" = {
      exactly              = false
      not                  = true
      type_mismatch_number = true
      type_mismatch_bool   = true
    }
  }
  inequality = {
    "<" = {
      lt = true
      gt = false
      eq = false
    }
    "<=" = {
      lt = true
      gt = false
      eq = true
    }
    ">" = {
      lt = false
      gt = true
      eq = false
    }
    ">=" = {
      lt = false
      gt = true
      eq = true
    }
  }
  arithmetic = {
    add      = 5.5
    add_big  = 4.14159265358979323846264338327950288419716939937510582097494459
    sub      = 1.5
    sub_neg  = -1.5
    mul      = 9
    div      = 0.1
    mod      = 1
    mod_frac = 0.80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024
  }
  logical_binary = {
    "&&" = {
      tt = true
      tf = false
      ft = false
      ff = false
    }
    "||" = {
      tt = true
      tf = true
      ft = true
      ff = false
    }
  }
  logical_unary = {
    "!" = {
      t = false
      f = true
    }
  }
  conditional = {
    t = "a"
    f = "b"
  }
}
result_type = object({
  equality = map(object({
    exactly              = bool
    not                  = bool
    type_mismatch_number = bool
    type_mismatch_bool   = bool
  }))
  inequality = map(object({
    lt  = bool
    gt  = bool
    eq  = bool
  }))
  arithmetic = object({
    add      = number
    add_big  = number
    sub      = number
    sub_neg  = number
    mul      = number
    div      = number
    mod      = number
    mod_frac = number
  })
  logical_binary = map(object({
    tt  = bool
    tf  = bool
    ft  = bool
    ff  = bool
  }))
  logical_unary = map(object({
    t   = bool
    f   = bool
  }))
  conditional = object({
    t   = string
    f   = string
  })
})