summaryrefslogtreecommitdiff
path: root/transitions/EXPRESSIONS
blob: 596b20ef8b4f40d21766410b83fab8eecc5f838c (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
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
{ "for host":
  { "vars": ["ARCH", "HOST_ARCH", "TARGET_ARCH"]
  , "expression":
    { "type": "let*"
    , "bindings":
      [ [ "BUILD_ARCH"
        , { "type": "var"
          , "name": "TARGET_ARCH"
          , "default": {"type": "var", "name": "ARCH"}
          }
        ]
      , [ "TARGET_ARCH"
        , { "type": "var"
          , "name": "HOST_ARCH"
          , "default": {"type": "var", "name": "ARCH"}
          }
        ]
      ]
    , "body": {"type": "env", "vars": ["BUILD_ARCH", "TARGET_ARCH"]}
    }
  }
, "target properties":
  { "vars": ["ARCH", "TARGET_ARCH", "ARCH_DISPATCH"]
  , "expression":
    { "type": "let*"
    , "bindings":
      [ [ "TARGET_ARCH"
        , { "type": "var"
          , "name": "TARGET_ARCH"
          , "default": {"type": "var", "name": "ARCH"}
          }
        ]
      ]
    , "body":
      { "type": "if"
      , "cond":
        { "type": "=="
        , "$1": {"type": "var", "name": "TARGET_ARCH"}
        , "$2": null
        }
      , "then": {"type": "empty_map"}
      , "else":
        { "type": "lookup"
        , "map":
          { "type": "var"
          , "name": "ARCH_DISPATCH"
          , "default": {"type": "empty_map"}
          }
        , "key": {"type": "var", "name": "TARGET_ARCH"}
        , "default": {"type": "empty_map"}
        }
      }
    }
  }
, "maybe for host":
  { "vars": ["ARCH", "HOST_ARCH", "TARGET_ARCH", "ARCH_DISPATCH"]
  , "imports":
    {"target properties": "target properties", "for host": "for host"}
  , "expression":
    { "type": "if"
    , "cond": {"type": "CALL_EXPRESSION", "name": "target properties"}
    , "then": {"type": "empty_map"}
    , "else": {"type": "CALL_EXPRESSION", "name": "for host"}
    }
  }
}